{"_id":"59a45d447ee621000fc9d3e3","category":{"_id":"59a45d447ee621000fc9d3b9","version":"59a45d437ee621000fc9d3b7","project":"57336fd5a6a9c40e00e13a0b","__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-10-15T15:28:41.796Z","from_sync":false,"order":1,"slug":"payment-transaction-service","title":"Card Transactions"},"user":"560d5913af97231900938124","parentDoc":null,"project":"57336fd5a6a9c40e00e13a0b","version":{"_id":"59a45d437ee621000fc9d3b7","project":"57336fd5a6a9c40e00e13a0b","__v":1,"createdAt":"2017-08-28T18:13:23.840Z","releaseDate":"2017-08-28T18:13:23.840Z","categories":["59a45d447ee621000fc9d3b8","59a45d447ee621000fc9d3b9","59a45d447ee621000fc9d3ba","59a45d447ee621000fc9d3bb","59a45d447ee621000fc9d3bc","59a45d447ee621000fc9d3bd","59a45d447ee621000fc9d3be","59a45d447ee621000fc9d3bf","59a45d447ee621000fc9d3c0","59a45d447ee621000fc9d3c1","59a45d447ee621000fc9d3c2","59a45d447ee621000fc9d3c3","59a45d447ee621000fc9d3c4","59a45d447ee621000fc9d3c5","59a45d447ee621000fc9d3c6","59a45d447ee621000fc9d3c7"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"3.22.1","version_clean":"8976.0.0-XML","version":"8976-XML"},"__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-10-21T17:17:37.750Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"method":"put","results":{"codes":[{"language":"text","code":""}]},"settings":"","auth":"optional","params":[],"url":"/transactions"},"isReference":true,"order":3,"body":"Capture is a request that submits a previously authorized transaction for settlement (i.e. payment by the shopper).\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 (amount, 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`card-transaction` *container* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span>, contains the following properties (see [card-transaction](doc:card-transaction)):\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`card-transaction-type` *string* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span>, value must be **CAPTURE**\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`transaction-id` *string* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span>, value must be the transaction ID from [Auth Only](doc:auth-only) response\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`vendor-info` *container*&nbsp;&nbsp;&nbsp;optional&nbsp;&nbsp;&nbsp; applicable if using marketplace vendor (see [vendor-info](doc:vendor-info))\n\n###Response Details\nIf successful, the response HTTP status code is 200 OK and contains the [**card-transaction**](doc:card-transaction) container. The `transaction-id` in the response will match the `transaction-id`for the initial [Auth Only](doc:auth-only).\n\n\n<hr>\n\n##Example\n\n###Request Example\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/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<card-transaction xmlns=\\\"http://ws.plimus.com\\\">\\n   <card-transaction-type>CAPTURE</card-transaction-type>\\n   <transaction-id>1011671985</transaction-id>\\n</card-transaction>'\",\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/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<card-transaction xmlns=\\\"http://ws.plimus.com\\\">\\n   <card-transaction-type>CAPTURE</card-transaction-type>\\n   <transaction-id>1014628859</transaction-id>\\n  <vendor-info>\\n    <vendor-id>10398032</vendor-id>\\n    <commission-percent>30</commission-percent>\\n  </vendor-info>\\n</card-transaction>'\",\n      \"language\": \"curl\",\n      \"name\": \"with vendor info\"\n    }\n  ]\n}\n[/block]\n###Response Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HTTP/ 1.1 200 OK\\n\\n<card-transaction xmlns=\\\"http://ws.plimus.com\\\">\\n   <card-transaction-type>CAPTURE</card-transaction-type>\\n   <transaction-id>1011671985</transaction-id>\\n   <recurring-transaction>ECOMMERCE</recurring-transaction>\\n   <soft-descriptor>BLS*DescTest</soft-descriptor>\\n   <amount>11.00</amount>\\n   <currency>USD</currency>\\n   <vaulted-shopper-id>1234</vaulted-shopper-id>\\n   <card-holder-info>\\n      <first-name>test first name</first-name>\\n      <last-name>test last name</last-name>\\n      <zip>123456</zip>\\n   </card-holder-info>\\n   <credit-card>\\n      <card-last-four-digits>0026</card-last-four-digits>\\n      <card-type>VISA</card-type>\\n      <card-sub-type>CREDIT</card-sub-type>\\n      <card-category>CLASSIC</card-category>\\n   </credit-card>\\n   <processing-info>\\n      <processing-status>SUCCESS</processing-status>\\n   </processing-info>\\n</card-transaction>\",\n      \"language\": \"xml\",\n      \"name\": \"200 OK - Basic\"\n    },\n    {\n      \"code\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\n<card-transaction xmlns=\\\"http://ws.plimus.com\\\">\\n  <card-transaction-type>CAPTURE</card-transaction-type>\\n  <vendor-info>\\n    <vendor-id>10398032</vendor-id>\\n    <commission-percent>20</commission-percent>\\n  </vendor-info>\\n  <transaction-id>1014628859</transaction-id>\\n  <recurring-transaction>ECOMMERCE</recurring-transaction>\\n  <soft-descriptor>BLS&#x2a;DescTest</soft-descriptor>\\n  <amount>11.00</amount>\\n  <currency>USD</currency>\\n  <card-holder-info>\\n    <first-name>test first name</first-name>\\n    <last-name>test last name</last-name>\\n    <zip>123456</zip>\\n  </card-holder-info>\\n  <vaulted-shopper-id>22028907</vaulted-shopper-id>\\n  <credit-card>\\n    <card-last-four-digits>9299</card-last-four-digits>\\n    <card-type>VISA</card-type>\\n    <card-sub-type>CREDIT</card-sub-type>\\n    <card-category>GOLD</card-category>\\n  </credit-card>\\n  <processing-info>\\n    <processing-status>SUCCESS</processing-status>\\n    <cvv-response-code>MA</cvv-response-code>\\n    <avs-response-code-zip>U</avs-response-code-zip>\\n    <avs-response-code-address>U</avs-response-code-address>\\n    <avs-response-code-name>U</avs-response-code-name>\\n  </processing-info>\\n</card-transaction>\",\n      \"language\": \"xml\",\n      \"name\": \"with vendor info\"\n    }\n  ]\n}\n[/block]\n<hr>\n\n##Example Descriptions\n\n###Capture: Basic\nThe example above shows a Capture request, where the transaction ID received for the initial [Auth Only](doc:auth-only) for this transaction was **1011671985**.\n\n###Capture: with vendor info\nThis example shows a Capture request with a marketplace vendor. By including `vendor-id` inside `vendor-info` in the request, the vendor will be linked to the transaction at the capture step. For more information, visit the [Marketplace Guide](/v1.0/docs/processing-transactions). \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 XML portion of the request below and then click **Try it!**\n\n**Tip:** Use the XML 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\": \"<card-transaction xmlns=\\\"http://ws.plimus.com\\\">\\n   <card-transaction-type>CAPTURE</card-transaction-type>\\n   <transaction-id>1011671985</transaction-id>\\n</card-transaction>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"capture","type":"put","title":"Capture"}

Definition

{{ api_url }}{{ page_api_url }}

Documentation

Capture is a request that submits a previously authorized transaction for settlement (i.e. payment by the shopper).

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 (amount, currency, credit card, etc.).

Try it in the API Explorer

Request Content

card-transaction container    required, contains the following properties (see card-transaction):
      card-transaction-type string    required, value must be CAPTURE
      transaction-id string    required, value must be the transaction ID from Auth Only response
      vendor-info container   optional    applicable if using marketplace vendor (see vendor-info)

Response Details

If successful, the response HTTP status code is 200 OK and contains the card-transaction container. The transaction-id in the response will match the transaction-idfor the initial Auth Only.


Example

Request Example

curl -v -X PUT https://sandbox.bluesnap.com/services/2/transactions \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<card-transaction xmlns="http://ws.plimus.com">
   <card-transaction-type>CAPTURE</card-transaction-type>
   <transaction-id>1011671985</transaction-id>
</card-transaction>'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/transactions \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<card-transaction xmlns="http://ws.plimus.com">
   <card-transaction-type>CAPTURE</card-transaction-type>
   <transaction-id>1014628859</transaction-id>
  <vendor-info>
    <vendor-id>10398032</vendor-id>
    <commission-percent>30</commission-percent>
  </vendor-info>
</card-transaction>'

Response Example

HTTP/ 1.1 200 OK

<card-transaction xmlns="http://ws.plimus.com">
   <card-transaction-type>CAPTURE</card-transaction-type>
   <transaction-id>1011671985</transaction-id>
   <recurring-transaction>ECOMMERCE</recurring-transaction>
   <soft-descriptor>BLS*DescTest</soft-descriptor>
   <amount>11.00</amount>
   <currency>USD</currency>
   <vaulted-shopper-id>1234</vaulted-shopper-id>
   <card-holder-info>
      <first-name>test first name</first-name>
      <last-name>test last name</last-name>
      <zip>123456</zip>
   </card-holder-info>
   <credit-card>
      <card-last-four-digits>0026</card-last-four-digits>
      <card-type>VISA</card-type>
      <card-sub-type>CREDIT</card-sub-type>
      <card-category>CLASSIC</card-category>
   </credit-card>
   <processing-info>
      <processing-status>SUCCESS</processing-status>
   </processing-info>
</card-transaction>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<card-transaction xmlns="http://ws.plimus.com">
  <card-transaction-type>CAPTURE</card-transaction-type>
  <vendor-info>
    <vendor-id>10398032</vendor-id>
    <commission-percent>20</commission-percent>
  </vendor-info>
  <transaction-id>1014628859</transaction-id>
  <recurring-transaction>ECOMMERCE</recurring-transaction>
  <soft-descriptor>BLS&#x2a;DescTest</soft-descriptor>
  <amount>11.00</amount>
  <currency>USD</currency>
  <card-holder-info>
    <first-name>test first name</first-name>
    <last-name>test last name</last-name>
    <zip>123456</zip>
  </card-holder-info>
  <vaulted-shopper-id>22028907</vaulted-shopper-id>
  <credit-card>
    <card-last-four-digits>9299</card-last-four-digits>
    <card-type>VISA</card-type>
    <card-sub-type>CREDIT</card-sub-type>
    <card-category>GOLD</card-category>
  </credit-card>
  <processing-info>
    <processing-status>SUCCESS</processing-status>
    <cvv-response-code>MA</cvv-response-code>
    <avs-response-code-zip>U</avs-response-code-zip>
    <avs-response-code-address>U</avs-response-code-address>
    <avs-response-code-name>U</avs-response-code-name>
  </processing-info>
</card-transaction>


Example Descriptions

Capture: Basic

The example above shows a Capture request, where the transaction ID received for the initial Auth Only for this transaction was 1011671985.

Capture: with vendor info

This example shows a Capture request with a marketplace vendor. By including vendor-id inside vendor-info in the request, the vendor will be linked to the transaction at the capture step. For more information, visit the Marketplace Guide.



Back to Top


API Explorer

To test out a call, enter the XML portion of the request below and then click Try it!

Tip: Use the XML 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.

<card-transaction xmlns="http://ws.plimus.com">
   <card-transaction-type>CAPTURE</card-transaction-type>
   <transaction-id>1011671985</transaction-id>
</card-transaction>

User Information

Try It Out


put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}