Capture Order
Overview
Use the Capture Order endpoint to capture funds from orders after they have been authorized. These calls can specify whether or not to capture the full amount of the order as well as whether the order capture has been completed.
API Request
This endpoint uses MAC with SHA-256
Please read our API Authentication section to ensure you are crafting your request properly.
The capture amount (captureAmount
) can be specified. If no amount is specified, Skipify will capture 100% of authorized funds. If an amount is specified, a parameter specifying whether or not the order is completed (completeOrder
) must also be included.
It is possible to process multiple captures until the full amount of the order is captured or completeOrder
is set to true. When a partial capture is performed (i.e. the captureAmount
is less than the original total and completeOrder
is set to false
), a new authorization is performed for the remaining amount of the order so that the funds can be captured at a later time.
To Capture an order, send an API call to:
POST {{baseURL}}/orders/{{orderId}}/capture
Request Body Parameters
Parameter | Required? | Type | Description |
---|---|---|---|
captureAmount | No | integer | Amount to capture, in cents (ex: 5000 corresponds to $50). |
completeOrder | Yes, only if captureAmount is specified | boolean | True indicates you have no intention to capture additional funds, whereas false indicates that you will capture additional funds from this order in the future. |
subtotal | No | integer | Strictly for reporting purposes and has no effect on funds captured |
tax | No | integer | Strictly for reporting purposes and has no effect on funds captured |
shipping | No | integer | Strictly for reporting purposes and has no effect on funds captured |
orderDescription | No | string | Strictly for reporting purposes and has no effect on funds captured |
Request Body Example
{
"subtotal": 5000, // $50.00
"tax": 300, // $3.00
"shipping": 500, // $5.00
"orderDescription": "string",
"captureAmount": 5800, // $ 58.00
"completeOrder": boolean // True or False
}
API Response
Response Body Parameters
Response Parameter | Type | Description |
---|---|---|
status | string | Success or Failure |
errorCode | string, nullable | Error code from the payment gateway if failure occurs |
gatewayTransactionId | string, nullable | The Transaction ID received from the payment gateway |
gatewayResponse | string, nullable | Raw response from the payment gateway. We share this with you in case you need to contact the gateway directly |
newAuthorizationTransactionId | string, nullable | The Transaction ID received from the payment gateway for the new authorization if completeOrder on the request was sent as false |
newAuthorizationNetworkTransactionId | string, nullable | The Card Network ID received from the payment gateway for the new authorization if completeOrder on the request was sent as false |
gatewayResponseAuth | string, nullable | Raw response from the payment gateway for the new authorization if completeOrder on the request was sent as false |
Response Body Example
{
"status": "string",
"errorCode": "string",
"gatewayTransactionId": "string",
"gatewayResponse": "string",
// Below fields are NULL if CompleteOrder flag on request is set to false
"newAuthorizationTransactionId": "string",
"newAuthorizationNetworkTransactionId": "string",
"gatewayResponseAuth": "string",
}
API Reference
Our API Reference contains additional details about this endpoint and its use.
Updated 7 months ago