Capture
For some payment methods, a second step is required in order to completed the payment.
In the first step an authorization is made. The payment details of the shopper are verified, and the funds are reserved.
In the second step the reserved funds are transferred from the shopper to your account.
Payments are captured immediately after authorization by default. For payment methods that support separate authorization and capture, you can also capture the payment later. The reserved amount can be partially or fully captured depending on the payment method was used.
Capture a payment
You can find below an example of how to capture a transaction and the generated response:
curl --request POST \
--url https://gateway.paybyrd.com/api/v2/capture/4faa13cd-f6ff-414e-b5bd-b61d1e72e418 \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-api-key: 5E37D19C-F99C-445F-8B77-1463EFC66C7B' \
--data '{"amount":"10.00"}'
{
"sourceTransaction": {
"capturedAmount": "10.00",
"remainingAmount": "0.00",
"transactionId": "4faa13cd-f6ff-414e-b5bd-b61d1e72e418",
"amount": "10.00"
},
"code": "BYRD200",
"description": "Operation successfully completed",
"transactionId": "c16ce479-319d-4e7b-a966-7735c34b2cc5",
"amount": "10.00"
}
See the full API reference here.
Updated over 3 years ago