{"_id":"59df6a523b756800107b2034","category":{"_id":"59df6a523b756800107b2020","version":"59df6a523b756800107b201e","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"},"parentDoc":null,"user":"560d5913af97231900938124","project":"57336fd5a6a9c40e00e13a0b","version":{"_id":"59df6a523b756800107b201e","project":"57336fd5a6a9c40e00e13a0b","__v":1,"createdAt":"2017-10-12T13:12:50.128Z","releaseDate":"2017-10-12T13:12:50.128Z","categories":["59df6a523b756800107b201f","59df6a523b756800107b2020","59df6a523b756800107b2021","59df6a523b756800107b2022","59df6a523b756800107b2023","59df6a523b756800107b2024","59df6a523b756800107b2025","59df6a523b756800107b2026","59df6a523b756800107b2027","59df6a523b756800107b2028","59df6a523b756800107b2029","59df6a523b756800107b202a","59df6a523b756800107b202b","59df6a523b756800107b202c","59df6a523b756800107b202d","59df6a523b756800107b202e"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"3.23 Release","version_clean":"8976.0.0-XML","version":"8976-XML"},"__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-10-21T17:22:56.883Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"method":"get","results":{"codes":[{"language":"text","code":""}]},"settings":"","auth":"optional","params":[{"_id":"56953ff3fe18811700c9bfcc","ref":"","in":"path","required":true,"desc":"transaction ID received in the response from BlueSnap","default":"","type":"string","name":"transaction-id"}],"url":"/transactions/:transaction-id"},"isReference":true,"order":4,"body":"Retrieve is a request that gets details about a past transaction, such as the transaction type, amount, cardholder or vaulted shopper, credit card, processing info, and so on.\n\n<a class=\"btn btn-success\" href=\"#section-api-explorer-for-request-based-on-transaction-id-\" role=\"button\">Try it in the API Explorer</a>\n\n###Request Content\nNo content is required in the request body. Enter the relevant IDs in the request URL, as follows:\n\n**Retrieve based on Transaction ID**\nEnter the `transaction-id` into the web service URL, in the format:\n`services/2/transactions/{transaction-id}`\n\nFor example:\n`services/2/transactions/1011582369`\n\n**Retrieve based on Merchant Transaction ID and Merchant ID**\nEnter the `merchant-transaction-id` and `merchant-id` into the web service URL, in the format:\n`services/2/transactions/{merchant-transaction-id},{merchant-id}`\n\nFor example:\n`services/2/transactions/3,456`\n\n###Response Details\nIf successful, the response HTTP status code is 200 OK.\nThe response contains the retrieved `card-transaction` resource (see [card-transaction](doc:card-transaction)).\nIf you passed metadata in the original transaction request, this metadata will also be retrieved.\n\n<hr>\n\n##Examples\n\n###Request Examples\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -v -X GET https://sandbox.bluesnap.com/services/2/transactions/1011582369 \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='\",\n      \"language\": \"curl\",\n      \"name\": \"Retrieve Request: by transaction ID\"\n    },\n    {\n      \"code\": \"curl -v -X GET https://sandbox.bluesnap.com/services/2/transactions/3,456 \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='\",\n      \"language\": \"curl\",\n      \"name\": \"by Merchant Transaction ID and Merchant ID\"\n    }\n  ]\n}\n[/block]\n###Response Examples\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\n<card-transaction xmlns=\\\"http://ws.plimus.com\\\">\\n   <card-transaction-type>AUTH_ONLY</card-transaction-type>\\n   <merchant-transaction-id>3</merchant-transaction-id>\\n   <transaction-id>1011582369</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   <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        <cvv-response-code>ND</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\": \"Retrieve Response: 200 OK\"\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>AUTH_ONLY</card-transaction-type>\\n    <transaction-id>38500790</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    <avs-response-code>G</avs-response-code>\\n    <card-holder-info>\\n        <first-name>test first name</first-name>\\n        <last-name>test last name</last-name>\\n      \\t<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    <transaction-meta-data>\\n        <meta-data>\\n            <meta-key>shippingAmount</meta-key>\\n            <meta-value>10.00</meta-value>\\n            <meta-description>Shipping Amount</meta-description>\\n        </meta-data>\\n        <meta-data>\\n            <meta-key>stateTaxAmount</meta-key>\\n            <meta-value>20.00</meta-value>\\n            <meta-description>State Tax Amount</meta-description>\\n        </meta-data>\\n        <meta-data>\\n            <meta-key>cityTaxAmount</meta-key>\\n            <meta-value>20.00</meta-value>\\n            <meta-description>City Tax Amount</meta-description>\\n        </meta-data>\\n    </transaction-meta-data>\\n    <processing-info>\\n        <processing-status>SUCCESS</processing-status>\\n        <cvv-response-code>MA</cvv-response-code>\\n        <avs-response-code-zip>M</avs-response-code-zip>\\n        <avs-response-code-address>M</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\": \"200 OK - with metadata\"\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>REFUND</card-transaction-type>\\n    <merchant-transaction-id>1234567890123456</merchant-transaction-id>\\n    <transaction-id>38417916</transaction-id>\\n    <recurring-transaction>ECOMMERCE</recurring-transaction>\\n    <soft-descriptor>BLS&#x2a;DescTest1234567</soft-descriptor>\\n    <amount>99.99</amount>\\n    <currency>EUR</currency>\\n    <card-holder-info>\\n        <first-name>John</first-name>\\n        <last-name>Doe</last-name>\\n        <country>fr</country>\\n        <zip>756543</zip>\\n        <phone>1413555666</phone>\\n    </card-holder-info>\\n    <vaulted-shopper-id>19490030</vaulted-shopper-id>\\n    <credit-card>\\n        <card-last-four-digits>1111</card-last-four-digits>\\n        <card-type>VISA</card-type>\\n    </credit-card>\\n    <processing-info>\\n        <processing-status>SUCCESS</processing-status>\\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    <refunds>\\n        <refund>\\n            <amount>55.55</amount>\\n            <currency>EUR</currency>\\n            <date>2016-09-13</date>\\n        </refund>\\n        <refund>\\n            <amount>44.44</amount>\\n            <currency>EUR</currency>\\n            <date>2016-09-13</date>\\n        </refund>\\n    </refunds>\\n</card-transaction>\",\n      \"language\": \"xml\",\n      \"name\": \"200 OK - with refunds\"\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>AUTH_ONLY</card-transaction-type>\\n   <vendor-info>\\n   \\t\\t<vendor-id>397808</vendor-id>\\n      <commission-percent>30</commission-percent>\\n    </vendor-info>  \\n   <merchant-transaction-id>3</merchant-transaction-id>\\n   <transaction-id>1011582369</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   <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     \\t<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        <cvv-response-code>ND</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\": \"200 OK - with vendor ID\"\n    }\n  ]\n}\n[/block]\n<hr>\n\n##Example Descriptions\n \n###Retrieve based on Transaction ID\nThis is a retrieval based on the `transaction-id`, which is the ID of the relevant transaction (received in the response for the original transaction).\n\n###Retrieve based on Merchant Transaction ID and Merchant ID\nThis is a retrieval based on the `merchant-transaction-id` and `merchant-id`. It is applicable to merchants who pass their own Merchant Transaction IDs with each transaction.\n\n###Response for transaction with refunds\nIf one or more refunds (including partial refunds) have been applied to the transaction, the `card-transaction-type` value will be **REFUND**. The refund details appear in the [refunds](doc:refunds) element.\n\n<br>\n<a class=\"btn btn-primary\" href=\"#\" role=\"button\">Back to Top</a>\n\n<hr>\n\n##API Explorer (for request based on Transaction ID)\nTo test out a call, enter an existing transaction ID (e.g *1011582369*) in the `transaction-id` field. This will automatically insert the ID into the request URL. Leave the Body Content field empty.","excerpt":"","slug":"retrieve","type":"get","title":"Retrieve"}

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

transaction-id:
required
string
transaction ID received in the response from BlueSnap

Documentation

Retrieve is a request that gets details about a past transaction, such as the transaction type, amount, cardholder or vaulted shopper, credit card, processing info, and so on.

Try it in the API Explorer

Request Content

No content is required in the request body. Enter the relevant IDs in the request URL, as follows:

Retrieve based on Transaction ID
Enter the transaction-id into the web service URL, in the format:
services/2/transactions/{transaction-id}

For example:
services/2/transactions/1011582369

Retrieve based on Merchant Transaction ID and Merchant ID
Enter the merchant-transaction-id and merchant-id into the web service URL, in the format:
services/2/transactions/{merchant-transaction-id},{merchant-id}

For example:
services/2/transactions/3,456

Response Details

If successful, the response HTTP status code is 200 OK.
The response contains the retrieved card-transaction resource (see card-transaction).
If you passed metadata in the original transaction request, this metadata will also be retrieved.


Examples

Request Examples

curl -v -X GET https://sandbox.bluesnap.com/services/2/transactions/1011582369 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='
curl -v -X GET https://sandbox.bluesnap.com/services/2/transactions/3,456 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='

Response Examples

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<card-transaction xmlns="http://ws.plimus.com">
   <card-transaction-type>AUTH_ONLY</card-transaction-type>
   <merchant-transaction-id>3</merchant-transaction-id>
   <transaction-id>1011582369</transaction-id>
   <recurring-transaction>ECOMMERCE</recurring-transaction>
   <soft-descriptor>BLS&#x2a;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>
        <cvv-response-code>ND</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>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<card-transaction xmlns="http://ws.plimus.com">
    <card-transaction-type>AUTH_ONLY</card-transaction-type>
    <transaction-id>38500790</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>
    <avs-response-code>G</avs-response-code>
    <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>
    <transaction-meta-data>
        <meta-data>
            <meta-key>shippingAmount</meta-key>
            <meta-value>10.00</meta-value>
            <meta-description>Shipping Amount</meta-description>
        </meta-data>
        <meta-data>
            <meta-key>stateTaxAmount</meta-key>
            <meta-value>20.00</meta-value>
            <meta-description>State Tax Amount</meta-description>
        </meta-data>
        <meta-data>
            <meta-key>cityTaxAmount</meta-key>
            <meta-value>20.00</meta-value>
            <meta-description>City Tax Amount</meta-description>
        </meta-data>
    </transaction-meta-data>
    <processing-info>
        <processing-status>SUCCESS</processing-status>
        <cvv-response-code>MA</cvv-response-code>
        <avs-response-code-zip>M</avs-response-code-zip>
        <avs-response-code-address>M</avs-response-code-address>
        <avs-response-code-name>U</avs-response-code-name>
    </processing-info>
</card-transaction>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<card-transaction xmlns="http://ws.plimus.com">
    <card-transaction-type>REFUND</card-transaction-type>
    <merchant-transaction-id>1234567890123456</merchant-transaction-id>
    <transaction-id>38417916</transaction-id>
    <recurring-transaction>ECOMMERCE</recurring-transaction>
    <soft-descriptor>BLS&#x2a;DescTest1234567</soft-descriptor>
    <amount>99.99</amount>
    <currency>EUR</currency>
    <card-holder-info>
        <first-name>John</first-name>
        <last-name>Doe</last-name>
        <country>fr</country>
        <zip>756543</zip>
        <phone>1413555666</phone>
    </card-holder-info>
    <vaulted-shopper-id>19490030</vaulted-shopper-id>
    <credit-card>
        <card-last-four-digits>1111</card-last-four-digits>
        <card-type>VISA</card-type>
    </credit-card>
    <processing-info>
        <processing-status>SUCCESS</processing-status>
        <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>
    <refunds>
        <refund>
            <amount>55.55</amount>
            <currency>EUR</currency>
            <date>2016-09-13</date>
        </refund>
        <refund>
            <amount>44.44</amount>
            <currency>EUR</currency>
            <date>2016-09-13</date>
        </refund>
    </refunds>
</card-transaction>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<card-transaction xmlns="http://ws.plimus.com">
   <card-transaction-type>AUTH_ONLY</card-transaction-type>
   <vendor-info>
   		<vendor-id>397808</vendor-id>
      <commission-percent>30</commission-percent>
    </vendor-info>  
   <merchant-transaction-id>3</merchant-transaction-id>
   <transaction-id>1011582369</transaction-id>
   <recurring-transaction>ECOMMERCE</recurring-transaction>
   <soft-descriptor>BLS&#x2a;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>
        <cvv-response-code>ND</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

Retrieve based on Transaction ID

This is a retrieval based on the transaction-id, which is the ID of the relevant transaction (received in the response for the original transaction).

Retrieve based on Merchant Transaction ID and Merchant ID

This is a retrieval based on the merchant-transaction-id and merchant-id. It is applicable to merchants who pass their own Merchant Transaction IDs with each transaction.

Response for transaction with refunds

If one or more refunds (including partial refunds) have been applied to the transaction, the card-transaction-type value will be REFUND. The refund details appear in the refunds element.



Back to Top


API Explorer (for request based on Transaction ID)

To test out a call, enter an existing transaction ID (e.g 1011582369) in the transaction-id field. This will automatically insert the ID into the request URL. Leave the Body Content field empty.


User Information

Try It Out


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