{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/transactions","auth":"optional","examples":{"codes":[]},"method":"put","results":{"codes":[{"code":"","language":"text"}]},"settings":"57ee593a21ceb20e0061959e","params":[]},"next":{"description":"","pages":[]},"title":"Capture","type":"endpoint","slug":"capture","excerpt":"","body":"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).\n[block:callout]\n{\n \"type\": \"success\",\n \"title\": \"Auth Only required before Capture\",\n \"body\": \"Before you can send a transaction for capture, you must send it for authorization using the [Auth Only](doc:auth-only) request. \\n\\nThe capture will be performed based on the details that were in the Auth Only request (currency, credit card, etc.).\"\n}\n[/block]\n<a class=\"btn btn-success\" href=\"#section-api-explorer\" role=\"button\">Try it in the API Explorer</a>\n\n###Request Content\n\nSend a **[cardTransaction](doc:card-transaction)** object, with the following:\n\n `cardTransactionType` *string* <span style=\"color:#F37500\">**required**</span>, value must be **CAPTURE**\n `transactionId` *string* <span style=\"color:#F37500\">**required**</span>, value must be the transaction ID from the [Auth Only](doc:auth-only) response\n `amount` *decimal* optional default value is the full authorization amount\n `softDescriptor` *string* optional\n `transactionMetaData` *object* optional (see [transactionMetaData](doc:transaction-meta-data))\n `vendorsInfo` *object* optional applicable if using marketplace vendor(s) (see [vendorsInfo](doc:vendorsinfo))\n `level3Data` *object* optional (see [level3Data](doc:level3data))\n\n###Response Details\n\nIf successful, the response HTTP status code is 200 OK and contains the [**cardTransaction**](doc:card-transaction) object. The `transactionId` in the response will match the `transactionId` for the initial [Auth Only](doc:auth-only).\n\n<hr>\n\n##Examples\n\n###Request Examples\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/transactions \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n \\\"cardTransactionType\\\": \\\"CAPTURE\\\",\\n \\\"transactionId\\\": \\\"1011671985\\\"\\n}'\",\n \"language\": \"curl\",\n \"name\": \"Capture: Basic\"\n },\n {\n \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/transactions \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n \\\"cardTransactionType\\\": \\\"CAPTURE\\\",\\n \\\"transactionId\\\": \\\"1015593705\\\",\\n \\\"vendorsInfo\\\": {\\n \\\"vendorInfo\\\": [\\n {\\\"vendorId\\\": 10398032}\\n ]\\n }\\n}'\",\n \"language\": \"curl\",\n \"name\": \"with vendors info\"\n },\n {\n \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/transactions \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n \\\"cardTransactionType\\\": \\\"CAPTURE\\\",\\n \\\"transactionId\\\": \\\"1016133355\\\",\\n \\\"amount\\\": 75.0\\n}'\",\n \"language\": \"curl\",\n \"name\": \"with amount\"\n },\n {\n \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/transactions \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n \\\"cardTransactionType\\\": \\\"CAPTURE\\\",\\n \\\"transactionId\\\": \\\"1016141063\\\",\\n \\\"amount\\\": 65.0,\\n \\\"vendorsInfo\\\": {\\n \\\"vendorInfo\\\": [\\n {\\\"vendorId\\\": 10398032}\\n ]\\n }\\n}'\",\n \"language\": \"curl\",\n \"name\": \"with amount and vendors info\"\n }\n ]\n}\n[/block]\n###Response Examples \n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"{\\n \\\"amount\\\": 11,\\n \\\"usdAmount\\\": 11,\\n \\\"currency\\\": \\\"USD\\\",\\n \\\"transactionApprovalDate\\\": \\\"09/29/2020\\\",\\n \\\"transactionApprovalTime\\\": \\\"13:08:47\\\",\\n \\\"vaultedShopperId\\\": 1234,\\n \\\"processingInfo\\\": { \\\"processingStatus\\\": \\\"SUCCESS\\\" },\\n \\\"softDescriptor\\\": \\\"BLS*DescTest\\\",\\n \\\"cardHolderInfo\\\": {\\n \\\"firstName\\\": \\\"test first name\\\",\\n \\\"lastName\\\": \\\"test last name\\\",\\n \\\"zip\\\": \\\"02453\\\"\\n },\\n \\\"creditCard\\\": {\\n \\\"cardLastFourDigits\\\": \\\"0026\\\",\\n \\\"cardSubType\\\": \\\"CREDIT\\\",\\n \\\"cardType\\\": \\\"VISA\\\",\\n \\\"cardCategory\\\": \\\"CLASSIC\\\"\\n },\\n \\\"cardTransactionType\\\": \\\"CAPTURE\\\",\\n \\\"transactionId\\\": \\\"1011671985\\\"\\n}\",\n \"language\": \"json\",\n \"name\": \"200 OK - Basic\"\n },\n {\n \"code\": \"{\\n \\\"cardTransactionType\\\": \\\"CAPTURE\\\",\\n \\\"vendorInfo\\\": {\\n \\\"vendorId\\\": 10398032,\\n \\\"commissionPercent\\\": 20\\n },\\n \\\"vendorsInfo\\\": {\\n \\\"vendorInfo\\\": [\\n {\\n \\\"vendorId\\\": 10398032,\\n \\\"commissionPercent\\\": 20\\n }\\n ]\\n },\\n \\\"transactionId\\\": \\\"1015593705\\\",\\n \\\"softDescriptor\\\": \\\"BLS*DescTest\\\",\\n \\\"amount\\\": 11,\\n \\\"currency\\\": \\\"USD\\\",\\n \\\"usdAmount\\\": 11,\\n \\\"transactionApprovalDate\\\": \\\"09/29/2020\\\",\\n \\\"transactionApprovalTime\\\": \\\"13:08:47\\\",\\n \\\"cardHolderInfo\\\": {\\n \\\"firstName\\\": \\\"test first name\\\",\\n \\\"lastName\\\": \\\"test last name\\\",\\n \\\"zip\\\": \\\"02453\\\"\\n },\\n \\\"vaultedShopperId\\\": 22324271,\\n \\\"creditCard\\\": {\\n \\\"cardLastFourDigits\\\": \\\"9299\\\",\\n \\\"cardType\\\": \\\"VISA\\\",\\n \\\"cardSubType\\\": \\\"CREDIT\\\",\\n \\\"cardCategory\\\": \\\"GOLD\\\"\\n },\\n \\\"processingInfo\\\": {\\n \\\"processingStatus\\\": \\\"SUCCESS\\\",\\n \\\"cvvResponseCode\\\": \\\"MA\\\",\\n \\\"avsResponseCodeZip\\\": \\\"U\\\",\\n \\\"avsResponseCodeAddress\\\": \\\"U\\\",\\n \\\"avsResponseCodeName\\\": \\\"U\\\"\\n }\\n}\",\n \"language\": \"json\",\n \"name\": \"with vendors info\"\n },\n {\n \"code\": \"{\\n \\\"cardTransactionType\\\": \\\"CAPTURE\\\",\\n \\\"transactionId\\\": \\\"1016133355\\\",\\n \\\"softDescriptor\\\": \\\"BLS*DescTest\\\",\\n \\\"amount\\\": 75,\\n \\\"openToCapture\\\": 25,\\n \\\"currency\\\": \\\"USD\\\",\\n \\\"usdAmount\\\": 75,\\n \\\"transactionApprovalDate\\\": \\\"09/29/2020\\\",\\n \\\"transactionApprovalTime\\\": \\\"13:08:47\\\",\\n \\\"cardHolderInfo\\\": {\\n \\\"firstName\\\": \\\"test first name\\\",\\n \\\"lastName\\\": \\\"test last name\\\",\\n \\\"zip\\\": \\\"123456\\\"\\n },\\n \\\"vaultedShopperId\\\": 22483647,\\n \\\"creditCard\\\": {\\n \\\"cardLastFourDigits\\\": \\\"9299\\\",\\n \\\"cardType\\\": \\\"VISA\\\",\\n \\\"cardSubType\\\": \\\"CREDIT\\\",\\n \\\"cardCategory\\\": \\\"GOLD\\\"\\n },\\n \\\"processingInfo\\\": {\\n \\\"processingStatus\\\": \\\"SUCCESS\\\",\\n \\\"cvvResponseCode\\\": \\\"MA\\\",\\n \\\"avsResponseCodeZip\\\": \\\"U\\\",\\n \\\"avsResponseCodeAddress\\\": \\\"U\\\",\\n \\\"avsResponseCodeName\\\": \\\"U\\\"\\n }\\n}\",\n \"language\": \"json\",\n \"name\": \"with amount\"\n },\n {\n \"code\": \"{\\n \\\"cardTransactionType\\\": \\\"CAPTURE\\\",\\n \\\"vendorInfo\\\": {\\n \\\"vendorId\\\": 10398032,\\n \\\"commissionPercent\\\": 90.2\\n },\\n \\\"vendorsInfo\\\": {\\n \\\"vendorInfo\\\": [\\n {\\n \\\"vendorId\\\": 10398032,\\n \\\"commissionPercent\\\": 90.2\\n }\\n ]\\n },\\n \\\"transactionId\\\": \\\"1016141063\\\",\\n \\\"softDescriptor\\\": \\\"BLS*DescTest\\\",\\n \\\"amount\\\": 65,\\n \\\"openToCapture\\\": 15,\\n \\\"currency\\\": \\\"USD\\\",\\n \\\"usdAmount\\\": 65,\\n \\\"transactionApprovalDate\\\": \\\"09/29/2020\\\",\\n \\\"transactionApprovalTime\\\": \\\"13:08:47\\\",\\n \\\"cardHolderInfo\\\": {\\n \\\"firstName\\\": \\\"test first name\\\",\\n \\\"lastName\\\": \\\"test last name\\\",\\n \\\"zip\\\": \\\"123456\\\"\\n },\\n \\\"vaultedShopperId\\\": 22484023,\\n \\\"creditCard\\\": {\\n \\\"cardLastFourDigits\\\": \\\"9299\\\",\\n \\\"cardType\\\": \\\"VISA\\\",\\n \\\"cardSubType\\\": \\\"CREDIT\\\",\\n \\\"cardCategory\\\": \\\"GOLD\\\"\\n },\\n \\\"processingInfo\\\": {\\n \\\"processingStatus\\\": \\\"SUCCESS\\\",\\n \\\"cvvResponseCode\\\": \\\"MA\\\",\\n \\\"avsResponseCodeZip\\\": \\\"U\\\",\\n \\\"avsResponseCodeAddress\\\": \\\"U\\\",\\n \\\"avsResponseCodeName\\\": \\\"U\\\"\\n }\\n}\",\n \"language\": \"json\",\n \"name\": \"with amount and vendors info\"\n }\n ]\n}\n[/block]\n<hr>\n \n##Example Descriptions\nFor details about the above examples, see:\n* [Basic Capture](#section-basic-capture)\n* [Capture with vendors info](#section-capture-with-vendors-info)\n* [Capture with amount](#section-capture-with-amount)\n* [Capture with amount and vendors info](#section-capture-with-amount-and-vendors-info)\n\n###Basic Capture\nThe example above shows a Capture request for the full authorization amount, where the transaction ID received for the initial [Auth Only](doc:auth-only) for this transaction was **1011671985**.\n\n###Capture with vendors info\nThis 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](/docs/processing-transactions). \n\n###Capture with amount \nThis 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). \n\n**Notes:** \n* To have partial captures enabled, contact your [Implementation Specialist](https://bluesnap.zendesk.com/hc/en-us/requests/new?ticket_form_id=360000248073) or [Merchant Support](https://bluesnap.zendesk.com/hc/en-us/requests/new?ticket_form_id=360000127087).\n* Once a partial capture has been processed, the remaining authorization amount cannot be voided (reversed). \n\n###Capture with amount and vendors info\nThis 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).\n\n<br>\n<a class=\"btn btn-primary\" href=\"#\" role=\"button\">Back to Top</a>\n\n<hr>\n\n##API Explorer\nTo test out a call, enter the request content below and then click **Try it!**\n\n**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.*\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"{\\n \\\"cardTransactionType\\\": \\\"CAPTURE\\\",\\n \\\"transactionId\\\": 1011671985\\n}\",\n \"language\": \"json\"\n }\n ]\n}\n[/block]","updates":["5cf2ebd683e0140043d27e7e","60a17a98c91823004ee1a783"],"order":2,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"628531cd1258c8003f6dd231","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Card/Wallet Transactions","slug":"payment-transaction-service","order":1,"from_sync":false,"reference":true,"_id":"628531cd1258c8003f6dd1c0","version":"628531cd1258c8003f6dd27d","project":"57336fd5a6a9c40e00e13a0b","createdAt":"2015-10-15T15:28:41.796Z","__v":0},"user":"560d5913af97231900938124","project":"57336fd5a6a9c40e00e13a0b","parentDoc":null,"version":{"version":"8976-JSON","version_clean":"8976.0.0-JSON","codename":"3.42 Release","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["628531cd1258c8003f6dd1bf","628531cd1258c8003f6dd1c0","628531cd1258c8003f6dd1c1","628531cd1258c8003f6dd1c2","628531cd1258c8003f6dd1c3","628531cd1258c8003f6dd1c4","628531cd1258c8003f6dd1c5","628531cd1258c8003f6dd1c6","628531cd1258c8003f6dd1c7","628531cd1258c8003f6dd1c8","628531cd1258c8003f6dd1c9","628531cd1258c8003f6dd1ca","628531cd1258c8003f6dd1cb","628531cd1258c8003f6dd1cc","628531cd1258c8003f6dd1cd","628531cd1258c8003f6dd1ce","628531cd1258c8003f6dd1cf","628531cd1258c8003f6dd1d0","628531cd1258c8003f6dd1d1","628531cd1258c8003f6dd1d2"],"_id":"628531cd1258c8003f6dd27d","project":"57336fd5a6a9c40e00e13a0b","__v":0,"forked_from":"622783372cd60c003782d77e","createdAt":"2018-04-24T15:22:41.561Z","releaseDate":"2018-04-24T15:22:41.561Z"},"createdAt":"2015-10-21T17:17:37.750Z","githubsync":"","__v":2}
putCapture
Definition
Documentation
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
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}
]
}
}'
{
"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
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).
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
}