Learn more about Split Capture and the Transactions API, including the authorization, capture, void, refund, update, and read endpoints.
Country Availability
USA
Canada
Overview
Split Capture uses the Transactions API which represents Affirm loans issued to the end-user. You can use the Transactions API to interact with transactions via the Transactions object to change the state of a transaction, update metadata, or retrieve details.
Authorizing a transaction occurs after a user completes the Affirm checkout flow and returns to the merchant site. Authorizing the charge generates a transaction_id that will be used to reference it moving forward. You must authorize a transaction to fully create it.
Endpoint
<https://api.affirm.com/api/v1/transactions>
Header parameters
Parameter
Idempotency-Key* stringREQUIRED: Unique identifiers pre-generated by the client and used by the server to recognize successive calls to the same endpoint. This is required for Split Capture and encouraged for single transaction functionality.
Body parameters
Parameters
transaction_id* stringREQUIRED: Unique token used for authorization. Received to the user_confirmation_url
order_id* string
Optional_: Identifies the order within the merchant's order management system that this transaction corresponds to. Only returned in the response if included in the request.
reference_id* string
Optional_: A unique identifier that may be associated with each transaction event and reconciled with the system of record used by the merchant.
Idempotency-Key* stringREQUIRED: Unique identifiers pre-generated by the client and used by the server to recognize successive calls to the same endpoint. This is required for Split Capture and encouraged for single transaction functionality.
Path parameters
Parameters
transaction_id* stringREQUIRED: A unique identifier representing the transaction. The value is an alphanumeric string of 9 or 12 characters in length, depending on whether it represents an installment loan or a lease, respectively.
Body parameters
Parameters
amount* int32REQUIRED: Pass the amount to be captured. If you want to capture $50.80, the amount value would be 5080.
order_id* string
Optional_: Identifies the order within the merchant's order management system that this transaction corresponds to. Only returned in the response if included in the request.
reference_id* string
Optional_: A unique identifier that may be associated with each transaction event and reconciled with the system of record used by the merchant.
shipping_carrier* string
Optional_: The shipping carrier (e.g. “USPS”) used to ship the items.
Idempotency-Key* stringREQUIRED: Unique identifiers pre-generated by the client and used by the server to recognize successive calls to the same endpoint. This is required for Split Capture and encouraged for single transaction functionality.
Path parameters
Parameters
transaction_id* stringREQUIRED: A unique identifier representing the transaction. The value is an alphanumeric string of 9 or 12 characters in length, depending on whether it represents an installment loan or a lease, respectively.
Body parameters
Parameters
amount* int32REQUIRED: Pass the amount to be voided. If you want to void $50.80, the amount value would be 5080.
reference_id* string
Optional_: A unique identifier that may be associated with each transaction event and reconciled with the system of record used by the merchant.
Idempotency-Key* stringREQUIRED: Unique identifiers pre-generated by the client and used by the server to recognize successive calls to the same endpoint. This is required for Split Capture and encouraged for single transaction functionality.
Path parameters
Parameters
transaction_id* stringREQUIRED: A unique identifier representing the transaction. The value is an alphanumeric string of 9 or 12 characters in length, depending on whether it represents an installment loan or a lease, respectively.
Body parameters
Parameters
amount* int32REQUIRED: Pass the amount to be refunded. If you want to refund $50.80, the amount value would be 5080.
reference_id* string
Optional_: A unique identifier that may be associated with each transaction event and reconciled with the system of record used by the merchant.
transaction_id* stringREQUIRED: A unique identifier representing the transaction. The value is an alphanumeric string of 9 or 12 characters in length, depending on whether it represents an installment loan or a lease, respectively.
Body parameters
Parameters
order_id* string
Optional_: Identifies the order within the merchant's order management system that this transaction corresponds to. Only returned in the response if included in the request.
reference_id* string
Optional_: A unique identifier that may be associated with each transaction event and reconciled with the system of record used by the merchant.
shipping* string
Optional_: A Contact object containing the shipping information of the customer.
shipping_carrier* string
Optional_: The shipping carrier (e.g. “USPS”) used to ship the items.
Read the transaction information, current transaction status, and checkout data for one or more transactions. This is useful for updating your records or order management system with current transaction states before performing actions on them. It also allows you to keep your system in sync with Affirm if your staff manually manages loans in the merchant dashboard.
transaction_id* stringREQUIRED: A unique identifier representing the transaction. The value is an alphanumeric string of 9 or 12 characters in length, depending on whether it represents an installment loan or a lease, respectively.
Query parameters
Parameters
expand* string A comma-separated set of related objects to expand in the response. Valid values are: events
Request
curl https://sandbox.affirm.com/api/v1/transactions/{transaction_id} \
-X GET \
-u "<public_api_key>:<private_api_key>"