Capture
When the customer completes the order with Tandym as the payment method, the capture API has to be called.
The capture model
The capture model contains all the information required for capturing an authorized payment.
Properties
- Name
orderid
- Type
- string
- Description
The unique id of the order
- Name
transaction_receipt
- Type
- string
- Description
The transaction receipt of the order
- Name
currency
- Type
- string
- Description
The merchant's configured currency (USD only)
- Name
amounttotal
- Type
- number
- Description
The total amount of the order (in cents)
POST/custom/capture
Create a capture
This endpoint allows you to initiate a payment capture on an authorized payment.
Required attributes
- Name
orderid
- Type
- string
- Description
The unique id of the order
- Name
transaction_receipt
- Type
- string
- Description
The transaction receipt of the order
- Name
currency
- Type
- string
- Description
The merchant's configured currency (USD only)
- Name
amounttotal
- Type
- number
- Description
The total amount of the order (in cents)
Request
POST
/custom/capturecurl -X POST https://stagingapi.platform.poweredbytandym.com/custom/capture \
-H 'content-type:application/json' \
-H 'apiKey:{YOURPAY_API_KEY}' \
-H 'secret:{YOURPAY_API_SECRET}' \
-d '{
"orderid":557,
"transaction_receipt":"2c42b592-e172-4fde-8bc1-3d456008b014",
"currency":"USD",
"amounttotal":200,
}'
Success Response
{
"captured": 1
}
Error Response
{
"captured": 0,
"errorcode": "CAPTURE_UNSUCCESSFUL",
"errormessage": "Capture is not successful!"
}