Transactions API
Capture Transaction
Changed onInclude the transaction_id returned in the authorize transaction response to capture a transaction.
post/transactions/{transaction_id}/capture
Request
- Base URLhttps://sandbox.affirm.com/api/v1
- URLhttps://sandbox.affirm.com/api/v1/transactions/{transaction_id}/capture
- AuthHTTP basic
Path parameters
transaction_idstring required
Example:ABCD-1234
A unique ID representing the transaction’s loan or charge ID.
Headers
Idempotency-Keystring
Unique identifier 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. Note: If a request fails or times out, use the same idempotency key to retry the operation without risk of double-processing. For details, see the Idempotency section in About Split Capture.
Request body
Example request
{
"order_id": "order_125",
"reference_id": "W1X2Y3Z4",
"shipping_carrier": "USPS",
"shipping_confirmation": "C12345678901234",
"amount": 10000
}Response
HTTP 200 OK
Example response
{
"type": "capture",
"currency": "USD",
"created": "2019-01-01T00:00:00.000Z",
"amount": 20000,
"fee": 500,
"id": "ABCD-1234"
}Changes
- warning
removed the optional property
from the response with the status - warning
removed the optional property
from the response with the status
- warning