Capture Full Recurring Payment

Creates and immediately captures a recurring payment using a billing agreement token. This endpoint combines authorization and capture into a single step. *Deprecated. For new integrations, see [Grants](https://afterpay.docs.buildwithfern.com/afterpay-online-developer/api-reference/reference/grants/start-grant-approval).*

Authentication

AuthorizationBasic

Basic authentication of the form Basic <base64(username:password)>.

Headers

User-AgentstringRequired
AcceptstringOptionalDefaults to application/json

Request

The request containing the payment details to process
requestIdstringRequiredformat: "uuid"<=64 characters
A unique identifier for the request, used for idempotency
paymentMethodobjectRequired
amountobjectRequired
The total amount of the payment
consumerobjectOptional

The consumer data model is used for gathering essential user information. It captures details such as the individual’s first name, represented by givenNames, and their last name, captured under surname. In addition, it stores the user’s contact number under phoneNumber and their email address under email. These fields collectively provide indispensable contact and identification details for a user.

billingobjectOptional

This data model is used for storing an individual’s contact information. Mandatory fields such as name, line1, area1, region, postcode, and countryCode help in capturing vital information about a user’s location.

The line2 and area2 fields provide additional space for extended addresses, while phoneNumber can be used to store the user’s contact number.

Important Note

The area1, area2 and region properties feature localized terminology based on country. Refer to the property descriptions for insights on each country’s specific usage

shippingobjectOptional

This data model is used for storing an individual’s contact information. Mandatory fields such as name, line1, area1, region, postcode, and countryCode help in capturing vital information about a user’s location.

The line2 and area2 fields provide additional space for extended addresses, while phoneNumber can be used to store the user’s contact number.

Important Note

The area1, area2 and region properties feature localized terminology based on country. Refer to the property descriptions for insights on each country’s specific usage

courierobjectOptional

Essential information for tracking a shipment. The shippedAt key represents the date and time when the item was shipped. This value follows the ISO 8601 standard format for date and time representations.

The name field indicates the courier service employed to handle the shipment (e.g. FEDEX, UPS). For orders that are picked up in-store (also known as Buy-Online-Pickup-Instore), please use “INSTORE_PICKUP” as the name field value.

The tracking key represents a unique tracking number provided by the courier service to monitor the shipment’s progress. It’s a valuable tool for customers and businesses to track and trace their packages.

The priority field tracks the shipping speed or service level associated with the delivery.

itemslist of objectsOptional
discountslist of objectsOptional
descriptionstringOptional<=256 characters
merchantobjectOptional
merchantReferencestringOptional<=128 characters

The reference/order ID in the merchant’s system

shippingAmountobjectOptional
The shipping cost amount
taxAmountobjectOptional
The tax amount
custommap from strings to anyOptional

Custom key-value pairs for merchant use

paymentScheduleChecksumstringOptional
Payment schedule validation checksum
enrichmentsobjectOptional

Response

| Status | Description | | ----- | ----- | | `APPROVED` | If payment is approved by Afterpay, returns a Payment object in response, with a status of "APPROVED". | | `DECLINED` | If payment is declined by Afterpay, for example, if expired payment method, returns a Payment object in response, with a status of "DECLINED". Please advise the consumer to contact the Afterpay Customer Service team for more information. |
idstring
The unique, permanent, Afterpay generated Order ID.
tokenstring
The token obtained from the checkout call
statusenum
represents the status of the order
Allowed values:
createdstring
The UTC timestamp of when the payment was completed.
originalAmountobject
Total amount charged to the customer for the order.
openToCaptureAmountobject
Remaining amount that can be captured. Will always be zero for Immediate Payment Flow orders.
paymentStateenumRead-only
is the current state for capturing payments
merchantReferencestring

is the merchant’s order id/reference that the payment corresponds to.

refundslist of objects

An array of refunds. Note: in response to a Capture Full Payment call, this array will always be empty, since refunds cannot occur until payment is captured.

orderDetailsobject
The details of the order bound to the payment.
eventslist of objects
One or more payment events that have occurred against the order.
agreementslist of objects

List of billing agreements created if any (field omitted if empty)

Errors

402
Payment Required Error
415
Unsupported Media Type Error
422
Unprocessable Entity Error