Capture is a request that submits a previously authorized transaction for settlement (i.e. payment by the shopper). Note that each credit card company will only hold the authorization for a limited period (for example, 3-10 days, depending on the credit card scheme).
Auth Only required before Capture
Before you can send a transaction for capture, you must send it for authorization using the Auth Only request.
The capture will be performed based on the details that were in the Auth Only request (currency, credit card, etc.).
Request Content
Send a cardTransaction object, with the following:
cardTransactionType string required, value must be CAPTURE
transactionId string required, value must be the transaction ID from the Auth Only response
amount decimal optional default value is the full authorization amount
softDescriptor string optional
taxReference string optional
transactionMetaData object optional (see transactionMetaData)
vendorsInfo object optional applicable if using marketplace vendor(s) (see vendorsInfo)
level3Data object optional (see level3Data)
Response Details
If successful, the response HTTP status code is 200 OK and contains the cardTransaction object. The transactionId in the response will match the transactionId for the initial Auth Only.
Examples
Request Examples
curl -v -X PUT https://sandbox.bluesnap.com/services/2/transactions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"cardTransactionType": "CAPTURE",
"transactionId": "1011671985"
}'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/transactions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"cardTransactionType": "CAPTURE",
"transactionId": "1015593705",
"vendorsInfo": {
"vendorInfo": [
{"vendorId": 10398032}
]
}
}'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/transactions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"cardTransactionType": "CAPTURE",
"transactionId": "1016133355",
"amount": 75.0
}'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/transactions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"cardTransactionType": "CAPTURE",
"transactionId": "1016141063",
"amount": 65.0,
"vendorsInfo": {
"vendorInfo": [
{"vendorId": 10398032}
]
}
}'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/transactions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"cardTransactionType": "CAPTURE",
"transactionId": "45983212",
"taxReference": "55cb8e0a-6003-4690-a55b-6fdd86943a8e",
"amount": 10.63
}
Response Examples
{
"amount": 11,
"usdAmount": 11,
"currency": "USD",
"transactionApprovalDate": "09/29/2020",
"transactionApprovalTime": "13:08:47",
"vaultedShopperId": 1234,
"processingInfo": { "processingStatus": "SUCCESS" },
"softDescriptor": "BLS*DescTest",
"cardHolderInfo": {
"firstName": "test first name",
"lastName": "test last name",
"zip": "02453"
},
"creditCard": {
"cardLastFourDigits": "0026",
"cardSubType": "CREDIT",
"cardType": "VISA",
"cardCategory": "CLASSIC"
},
"cardTransactionType": "CAPTURE",
"transactionId": "1011671985"
}
{
"cardTransactionType": "CAPTURE",
"vendorInfo": {
"vendorId": 10398032,
"commissionPercent": 20
},
"vendorsInfo": {
"vendorInfo": [
{
"vendorId": 10398032,
"commissionPercent": 20
}
]
},
"transactionId": "1015593705",
"softDescriptor": "BLS*DescTest",
"amount": 11,
"currency": "USD",
"usdAmount": 11,
"transactionApprovalDate": "09/29/2020",
"transactionApprovalTime": "13:08:47",
"cardHolderInfo": {
"firstName": "test first name",
"lastName": "test last name",
"zip": "02453"
},
"vaultedShopperId": 22324271,
"creditCard": {
"cardLastFourDigits": "9299",
"cardType": "VISA",
"cardSubType": "CREDIT",
"cardCategory": "GOLD"
},
"processingInfo": {
"processingStatus": "SUCCESS",
"cvvResponseCode": "MA",
"avsResponseCodeZip": "U",
"avsResponseCodeAddress": "U",
"avsResponseCodeName": "U"
}
}
{
"cardTransactionType": "CAPTURE",
"transactionId": "1016133355",
"softDescriptor": "BLS*DescTest",
"amount": 75,
"openToCapture": 25,
"currency": "USD",
"usdAmount": 75,
"transactionApprovalDate": "09/29/2020",
"transactionApprovalTime": "13:08:47",
"cardHolderInfo": {
"firstName": "test first name",
"lastName": "test last name",
"zip": "123456"
},
"vaultedShopperId": 22483647,
"creditCard": {
"cardLastFourDigits": "9299",
"cardType": "VISA",
"cardSubType": "CREDIT",
"cardCategory": "GOLD"
},
"processingInfo": {
"processingStatus": "SUCCESS",
"cvvResponseCode": "MA",
"avsResponseCodeZip": "U",
"avsResponseCodeAddress": "U",
"avsResponseCodeName": "U"
}
}
{
"cardTransactionType": "CAPTURE",
"vendorInfo": {
"vendorId": 10398032,
"commissionPercent": 90.2
},
"vendorsInfo": {
"vendorInfo": [
{
"vendorId": 10398032,
"commissionPercent": 90.2
}
]
},
"transactionId": "1016141063",
"softDescriptor": "BLS*DescTest",
"amount": 65,
"openToCapture": 15,
"currency": "USD",
"usdAmount": 65,
"transactionApprovalDate": "09/29/2020",
"transactionApprovalTime": "13:08:47",
"cardHolderInfo": {
"firstName": "test first name",
"lastName": "test last name",
"zip": "123456"
},
"vaultedShopperId": 22484023,
"creditCard": {
"cardLastFourDigits": "9299",
"cardType": "VISA",
"cardSubType": "CREDIT",
"cardCategory": "GOLD"
},
"processingInfo": {
"processingStatus": "SUCCESS",
"cvvResponseCode": "MA",
"avsResponseCodeZip": "U",
"avsResponseCodeAddress": "U",
"avsResponseCodeName": "U"
}
}
##Example Descriptions For details about the above examples, see: * [Basic Capture](#section-basic-capture) * [Capture with vendors info](#section-capture-with-vendors-info) * [Capture with amount](#section-capture-with-amount) * [Capture with amount and vendors info](#section-capture-with-amount-and-vendors-info)
Basic Capture
The example above shows a Capture request for the full authorization amount, where the transaction ID received for the initial Auth Only for this transaction was 1011671985.
Capture with vendors info
This example shows a Capture request for the full authorization amount, with a marketplace vendor. By including vendorsInfo in the request, the vendor (or vendors) will be linked to the transaction at the capture step. For more information, visit the Marketplace Guide.
Capture with amount
This example shows a Capture request for a partial amount (i.e. a partial capture). The full authorization amount is $100, the captured amount is $75 (indicated by amount in the request), and the remaining authorization amount available for capture is $25 (indicated by openToCapture in the response).
Notes:
- To have partial captures enabled, contact your Implementation Specialist or Merchant Support.
- Once a partial capture has been processed, the remaining authorization amount cannot be voided (reversed).
Capture with amount and vendors info
This example shows a partial capture with a marketplace vendor. The full authorization amount is $80, the captured amount is $65 (indicated by amount in the request), the vendor's commission rate for the capture is 90.2% (the vendor's default commission rate), and the remaining authorization amount available for capture is $15 (indicated by openToCapture in the response).
Back to Top
API Explorer
To test out a call, enter the request content below and then click Try it!
Tip: Use the JSON code below as a starting point. You can enter different parameters to see how your test scenario would work. The request headers, including authorization, are already built in for you in this test area, so you should not include them here.
{
"cardTransactionType": "CAPTURE",
"transactionId": 1011671985
}
