{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/batch-transactions/:batch-id","auth":"optional","settings":"","examples":{"codes":[]},"method":"get","results":{"codes":[{"code":"","language":"text"}]},"params":[{"name":"batch-id","type":"string","default":"","desc":"batch ID sent in the Create Batch Transaction request","required":true,"in":"path","ref":"","_id":"56953ff3fe18811700c9bfcc"}]},"next":{"description":"","pages":[]},"title":"Retrieve Batch Transaction","type":"endpoint","slug":"retrieve-batch-transaction","excerpt":"","body":"[block:html]\n{\n  \"html\": \"<script>\\n  // hide body textbox of API Explorer\\n $(document).ready(function() {\\n  $(\\\"textarea[placeholder='Body Content']\\\").hide();  \\n }); \\n</script>\"\n}\n[/block]\nRetrieve is a request that gets details about a submitted batch transaction, such as the callback URL, and the details of each transaction within the batch.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"The retrieve batch call will not have an up-to-date status of each ACH transaction (approved or declined by the bank). For this information, you use IPNs or do a retrieve on a per-transaction basis.\",\n  \"title\": \"Note\"\n}\n[/block]\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\nEnter the `batch-id` into the web service URL, in the format:\n`services/2/batch-transactions/{batch-id}`\n\nFor example:\n`services/2/batch-transactions/567890`\n\n###Response Details\nIf successful, the response HTTP status code is 200 OK.\nThe response contains the retrieved `batch-transaction` resource (see [batch-transaction](doc:batch-transaction)) with the request properties plus these additions:\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`transaction-count`: number of transactions within the batch\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`transaction-id`: ID for each transaction in the batch\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`processing-info`: processing status for the entire batch and for each transaction in the batch\n\n<hr>\n\n##Examples\n\n###Request Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -v -X GET https://sandbox.bluesnap.com/services/2/batch-transactions/567892 \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='\",\n      \"language\": \"curl\",\n      \"name\": \"Retrieve Batch Transaction Request\"\n    }\n  ]\n}\n[/block]\n###Response Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HTTP/ 1.1 200 OK\\n\\n<batch-transaction xmlns=\\\"http://ws.plimus.com\\\">\\n    <batch-id>567892</batch-id>\\n    <callback-url>http&#x3a;&#x2f;&#x2f;example.com&#x2f;batch_callback</callback-url>\\n    <transaction-count>3</transaction-count>\\n    <card-transaction>\\n        <card-transaction-type>AUTH_CAPTURE</card-transaction-type>\\n        <merchant-transaction-id>566</merchant-transaction-id>\\n        <transaction-id>1029337513</transaction-id>\\n        <recurring-transaction>ECOMMERCE</recurring-transaction>\\n        <soft-descriptor>DescTest txn1</soft-descriptor>\\n        <amount>11</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        </card-holder-info>\\n        <credit-card>\\n            <card-last-four-digits>1881</card-last-four-digits>\\n            <card-type>VISA</card-type>\\n            <expiration-month>7</expiration-month>\\n            <expiration-year>2023</expiration-year>\\n        </credit-card>\\n        <transaction-meta-data/>\\n        <processing-info>\\n            <processing-status>SUCCESS</processing-status>\\n            <authorization-code>654321</authorization-code>\\n        </processing-info>\\n    </card-transaction>\\n    <alt-transaction>\\n        <transaction-id>1029337515</transaction-id>\\n        <soft-descriptor>ABC COMPANY</soft-descriptor>\\n        <amount>100</amount>\\n        <currency>USD</currency>\\n        <payer-info>\\n            <first-name>John</first-name>\\n            <last-name>Doe</last-name>\\n            <zip>12345</zip>\\n            <phone>1234567890</phone>\\n        </payer-info>\\n        <vaulted-shopper-id>26818793</vaulted-shopper-id>\\n        <ecp-transaction>\\n            <account-number>4099999992</account-number>\\n            <routing-number>011075150</routing-number>\\n            <account-type>CONSUMER_CHECKING</account-type>\\n            <public-account-number>99992</public-account-number>\\n            <public-routing-number>75150</public-routing-number>\\n        </ecp-transaction>\\n        <processing-info>\\n            <processing-status>PENDING</processing-status>\\n        </processing-info>\\n    </alt-transaction>\\n    <alt-transaction>\\n        <transaction-id>1029337517</transaction-id>\\n        <soft-descriptor>SepaPapi</soft-descriptor>\\n        <amount>20</amount>\\n        <currency>EUR</currency>\\n        <payer-info>\\n            <first-name>John</first-name>\\n            <last-name>Doe</last-name>\\n            <country>it</country>\\n            <state>ca</state>\\n            <address>blue lane 21</address>\\n            <city>london</city>\\n            <zip>45353434</zip>\\n            <phone>23123133213</phone>\\n        </payer-info>\\n        <vaulted-shopper-id>26818795</vaulted-shopper-id>\\n        <sepa-direct-debit-transaction>\\n            <bic>PBNKDEFFXXX</bic>\\n            <iban-first-four>DE09</iban-first-four>\\n            <iban-last-four>7891</iban-last-four>\\n            <mandate-id>Mys229845</mandate-id>\\n            <mandate-date>09-Mar-20</mandate-date>\\n            <pre-notification-text>The amount of 20.00 EUR will be collected using SEPA Direct Debit with Mandate Mys229845 from your bank account IBAN DE09XXXXXX7891 in the next few days. Please ensure sufficient funds in your account.</pre-notification-text>\\n        </sepa-direct-debit-transaction>\\n        <processing-info>\\n            <processing-status>PENDING</processing-status>\\n        </processing-info>\\n    </alt-transaction>\\n    <processing-info>\\n        <processing-status>COMPLETED</processing-status>\\n    </processing-info>\\n</batch-transaction>\",\n      \"language\": \"xml\",\n      \"name\": \"Retrieve Batch Transaction Response: 200 OK\"\n    }\n  ]\n}\n[/block]\n<hr>\n\n##Example Description\nAbove is an example request. Note that no XML content is required in the request body. All relevant info is included in the request URL. You simply need to include the batch ID in the request URL. The batch ID is the unique ID sent in the the `batch-id` property in the [Create Batch Transaction](doc:create-batch-transaction) request.\n\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 batch ID (e.g *567890*) in the `batch-id` field. This will automatically insert the ID into the request URL. Leave the Body Content field empty.","updates":[],"order":1,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5f43d7f192d43e01ff6f1169","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Batch Transactions","slug":"batch-payment-transaction-service","order":7,"from_sync":false,"reference":true,"_id":"5f43d7f192d43e01ff6f1115","version":"5f43d7f192d43e01ff6f11c2","project":"57336fd5a6a9c40e00e13a0b","createdAt":"2015-10-19T18:30:57.575Z","__v":0},"project":"57336fd5a6a9c40e00e13a0b","user":"560d5913af97231900938124","parentDoc":null,"version":{"version":"8976-XML","version_clean":"8976.0.0-XML","codename":"3.35 Release","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5f43d7f192d43e01ff6f1110","5f43d7f192d43e01ff6f1111","5f43d7f192d43e01ff6f1112","5f43d7f192d43e01ff6f1113","5f43d7f192d43e01ff6f1114","5f43d7f192d43e01ff6f1115","5f43d7f192d43e01ff6f1116","5f43d7f192d43e01ff6f1117","5f43d7f192d43e01ff6f1118","5f43d7f192d43e01ff6f1119","5f43d7f192d43e01ff6f111a","5f43d7f192d43e01ff6f111b","5f43d7f192d43e01ff6f111c","5f43d7f192d43e01ff6f111d","5f43d7f192d43e01ff6f111e","5f43d7f192d43e01ff6f111f","5f43d7f192d43e01ff6f1120","5f43d7f192d43e01ff6f1121","5f47e410bd05ef0011069965"],"_id":"5f43d7f192d43e01ff6f11c2","project":"57336fd5a6a9c40e00e13a0b","__v":1,"forked_from":"5ed5174637c3c607440c0a3c","createdAt":"2018-04-24T15:24:22.608Z","releaseDate":"2018-04-24T15:24:22.608Z"},"createdAt":"2016-01-22T13:00:00.982Z","githubsync":"","__v":3}

getRetrieve Batch Transaction


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

batch-id:
required
string
batch ID sent in the Create Batch Transaction request

Documentation

Retrieve is a request that gets details about a submitted batch transaction, such as the callback URL, and the details of each transaction within the batch.

Note

The retrieve batch call will not have an up-to-date status of each ACH transaction (approved or declined by the bank). For this information, you use IPNs or do a retrieve on a per-transaction basis.

Try it in the API Explorer

Request Content

Enter the batch-id into the web service URL, in the format:
services/2/batch-transactions/{batch-id}

For example:
services/2/batch-transactions/567890

Response Details

If successful, the response HTTP status code is 200 OK.
The response contains the retrieved batch-transaction resource (see batch-transaction) with the request properties plus these additions:
      transaction-count: number of transactions within the batch
      transaction-id: ID for each transaction in the batch
      processing-info: processing status for the entire batch and for each transaction in the batch


Examples

Request Example

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

Response Example

HTTP/ 1.1 200 OK

<batch-transaction xmlns="http://ws.plimus.com">
    <batch-id>567892</batch-id>
    <callback-url>http&#x3a;&#x2f;&#x2f;example.com&#x2f;batch_callback</callback-url>
    <transaction-count>3</transaction-count>
    <card-transaction>
        <card-transaction-type>AUTH_CAPTURE</card-transaction-type>
        <merchant-transaction-id>566</merchant-transaction-id>
        <transaction-id>1029337513</transaction-id>
        <recurring-transaction>ECOMMERCE</recurring-transaction>
        <soft-descriptor>DescTest txn1</soft-descriptor>
        <amount>11</amount>
        <currency>USD</currency>
        <card-holder-info>
            <first-name>test first name</first-name>
            <last-name>test last name</last-name>
        </card-holder-info>
        <credit-card>
            <card-last-four-digits>1881</card-last-four-digits>
            <card-type>VISA</card-type>
            <expiration-month>7</expiration-month>
            <expiration-year>2023</expiration-year>
        </credit-card>
        <transaction-meta-data/>
        <processing-info>
            <processing-status>SUCCESS</processing-status>
            <authorization-code>654321</authorization-code>
        </processing-info>
    </card-transaction>
    <alt-transaction>
        <transaction-id>1029337515</transaction-id>
        <soft-descriptor>ABC COMPANY</soft-descriptor>
        <amount>100</amount>
        <currency>USD</currency>
        <payer-info>
            <first-name>John</first-name>
            <last-name>Doe</last-name>
            <zip>12345</zip>
            <phone>1234567890</phone>
        </payer-info>
        <vaulted-shopper-id>26818793</vaulted-shopper-id>
        <ecp-transaction>
            <account-number>4099999992</account-number>
            <routing-number>011075150</routing-number>
            <account-type>CONSUMER_CHECKING</account-type>
            <public-account-number>99992</public-account-number>
            <public-routing-number>75150</public-routing-number>
        </ecp-transaction>
        <processing-info>
            <processing-status>PENDING</processing-status>
        </processing-info>
    </alt-transaction>
    <alt-transaction>
        <transaction-id>1029337517</transaction-id>
        <soft-descriptor>SepaPapi</soft-descriptor>
        <amount>20</amount>
        <currency>EUR</currency>
        <payer-info>
            <first-name>John</first-name>
            <last-name>Doe</last-name>
            <country>it</country>
            <state>ca</state>
            <address>blue lane 21</address>
            <city>london</city>
            <zip>45353434</zip>
            <phone>23123133213</phone>
        </payer-info>
        <vaulted-shopper-id>26818795</vaulted-shopper-id>
        <sepa-direct-debit-transaction>
            <bic>PBNKDEFFXXX</bic>
            <iban-first-four>DE09</iban-first-four>
            <iban-last-four>7891</iban-last-four>
            <mandate-id>Mys229845</mandate-id>
            <mandate-date>09-Mar-20</mandate-date>
            <pre-notification-text>The amount of 20.00 EUR will be collected using SEPA Direct Debit with Mandate Mys229845 from your bank account IBAN DE09XXXXXX7891 in the next few days. Please ensure sufficient funds in your account.</pre-notification-text>
        </sepa-direct-debit-transaction>
        <processing-info>
            <processing-status>PENDING</processing-status>
        </processing-info>
    </alt-transaction>
    <processing-info>
        <processing-status>COMPLETED</processing-status>
    </processing-info>
</batch-transaction>


Example Description

Above is an example request. Note that no XML content is required in the request body. All relevant info is included in the request URL. You simply need to include the batch ID in the request URL. The batch ID is the unique ID sent in the the batch-id property in the Create Batch Transaction request.



Back to Top


API Explorer (for request based on Transaction ID)

To test out a call, enter an existing batch ID (e.g 567890) in the batch-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 }}