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
Limits on Payment Links
PayLink is different than Expedited Guest Checkout or The Skipify Button in that it accepts payments from both registered Skipify users as well as guests. For guest payments, Skipify does not store customer data, so it is not always possible for Skipify to process order captures, voids or refunds for those orders via the Skipify API.
However, the payment gateway responses are shared with you after order completion so that you can contact the gateway directly to process your any voids, captures or refunds. The payment processor gateway response is provided through Skipify's webhooks. Simply subscribe to the ORDER_PAYMENT_SUCCEEDED or the ORDER_PAYMENT_FAILED webhooks; data received via these webhooks include a
gatewayTransactionId
that you can reference to communicate with your payment processor.Alternatively, you can retrieve order details using the Skipify orderId (using the GET endpoint), available in the request bodies from the ORDER_PAYMENT_SUCCEEDED and the ORDER_PAYMENT_FAILED webhooks.
Note that Order details only include lists of gateway transactions processed for the order through Skipify. Currently, Skipify guest payments processed via Express can be captured or voided using Skipify's API, but Express refunds & RAFT captures, voids, and refunds for unrecognized users cannot currently be processed using Skipify's API.
Because of these limitations on guest/unregistered customers, we recommend that you do not use Skipify's endpoints for capture, refund and void for your PayLink integration, and instead utilize the webhook structure described above.
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 | Yes | 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 5 months ago