{"_id":"59df6a553b756800107b205d","category":{"_id":"59df6a523b756800107b2024","version":"59df6a523b756800107b201e","project":"57336fd5a6a9c40e00e13a0b","__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-10-19T18:30:57.575Z","from_sync":false,"order":5,"slug":"batch-payment-transaction-service","title":"Batch Transactions"},"project":"57336fd5a6a9c40e00e13a0b","user":"560d5913af97231900938124","parentDoc":null,"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":"2016-01-21T19:34:10.183Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"method":"post","results":{"codes":[{"code":"","language":"text"}]},"settings":"","auth":"optional","params":[],"url":"/batch-transactions"},"isReference":true,"order":0,"body":"The Create Batch Transaction request enables you to process multiple transactions at once, including credit card transactions (Auth Capture only) and PayPal recurring transactions.\n\nThe request includes multiple `card-transaction` and/or `alt-transaction` resources, along with a unique batch ID that you define, and a callback URL where you would like the status of the batch transaction to be sent after processing. \n\nThe API sends an immediate response to the Create Batch Transaction request and then the individual transactions in the request are processed. Once all transactions are processed, BlueSnap sends the full batch result to the callback URL you provided in the request. Some of the transactions may be successfully processed and some may be failed. However, as long as the batch file was successfully processed, the callback status of the batch will be `completed`. For an example of the batch result that is sent to your callback URL after the transactions have been processed, see [Example Batch Result](/v2.0/docs/batch-processing-tutorial#section-example-batch-result).\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Transaction limit per batch\",\n  \"body\": \"There is a limit of 2000 transactions per batch.\"\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`batch-transaction` *container* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span>, contains the following properties (see [batch-transaction](doc:batch-transaction)):\n&nbsp;&nbsp;&nbsp;`batch-id` *string* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span>\n&nbsp;&nbsp;&nbsp;`callback-url` *string* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span>\n&nbsp;&nbsp;&nbsp;`card-transaction` *container* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required** for credit card transactions</span> (see [card-transaction](doc:card-transaction))\n&nbsp;&nbsp;&nbsp;`alt-transaction` *container* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required** for PayPal transactions</span> (see [alt-transaction](doc:alt-transaction))\n\n###Response Details\nIf successful, the response HTTP status code is 201 Created.\nNote that if an error occurs, the error format is slightly different from other error types. See [Batch transaction errors](doc:batch-errors).\nFor an example of the batch result that is sent to your callback URL after the transactions have been processed, see [Example Batch Result](/v2.0/docs/batch-processing-tutorial#section-example-batch-result).\n\n<hr>\n\n##Examples\n\n###Request Examples\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/batch-transactions \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<batch-transaction xmlns=\\\"http://ws.plimus.com\\\">\\n  <batch-id>567890</batch-id>\\n  <callback-url>http://example.com/batch_callback</callback-url>\\n  <card-transaction>\\n    <card-transaction-type>AUTH_CAPTURE</card-transaction-type>\\n    <merchant-transaction-id>566</merchant-transaction-id>\\n    <recurring-transaction>RECURRING</recurring-transaction>\\n    <amount>20.00</amount>\\n    <currency>USD</currency>\\n    <card-holder-info>\\n      <first-name>Joe</first-name>\\n      <last-name>Example</last-name>\\n    </card-holder-info>\\n    <credit-card>\\n      <card-number>4263982640269299</card-number>\\n      <expiration-month>02</expiration-month>\\n      <expiration-year>2018</expiration-year>\\n    </credit-card>\\n  </card-transaction>\\n    <card-transaction>\\n    <card-transaction-type>AUTH_CAPTURE</card-transaction-type>\\n    <merchant-transaction-id>567</merchant-transaction-id>\\n    <recurring-transaction>ECOMMERCE</recurring-transaction>\\n    <amount>25.00</amount>\\n    <currency>USD</currency>\\n    <card-holder-info>\\n      <first-name>Jane</first-name>\\n      <last-name>Shopper</last-name>\\n    </card-holder-info>\\n    <credit-card>\\n      <card-number>4111111111111111</card-number>\\n      <expiration-month>07</expiration-month>\\n      <expiration-year>2019</expiration-year>\\n    </credit-card>\\n  </card-transaction>\\n</batch-transaction>'\",\n      \"language\": \"curl\",\n      \"name\": \"Create Batch Transaction Request: basic\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/batch-transactions \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<batch-transaction xmlns=\\\"http://ws.plimus.com\\\">\\n   <batch-id>unique_0130076552988</batch-id>\\n   <callback-url>http://localhost:8080/jsp/batch_callback.jsp</callback-url>\\n   <card-transaction>\\n      <card-transaction-type>AUTH_CAPTURE</card-transaction-type>\\n      <merchant-transaction-id>566</merchant-transaction-id>\\n      <recurring-transaction>RECURRING</recurring-transaction>\\n      <soft-descriptor>DescTest txn1</soft-descriptor>\\n      <amount>11.00</amount>\\n      <currency>USD</currency>\\n      <vaulted-shopper-id>19567060</vaulted-shopper-id>\\n    </card-transaction>\\n    <card-transaction>\\n      <card-transaction-type>AUTH_CAPTURE</card-transaction-type>\\n      <merchant-transaction-id>567</merchant-transaction-id>\\n      <recurring-transaction>ECOMMERCE</recurring-transaction>\\n      <amount>11.00</amount>\\n      <currency>USD</currency>\\n      <vaulted-shopper-id>20773559</vaulted-shopper-id>\\n      <credit-card>\\n         <card-last-four-digits>9299</card-last-four-digits>\\n      <card-type>VISA</card-type>\\n   </credit-card>\\n   </card-transaction>\\n</batch-transaction>'\",\n      \"language\": \"curl\",\n      \"name\": \"with vaulted shoppers\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/batch-transactions \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<batch-transaction xmlns=\\\"http://ws.plimus.com\\\">\\n   <batch-id>shachaf_014</batch-id>\\n   <callback-url>http://localhost:8080/jsp/batch_callback.jsp</callback-url>\\n   <alt-transaction>\\n      <amount>100.00</amount>\\n      <currency>USD</currency>\\n      <paypal-transaction>\\n         <paypal-subscription-id>1234567</paypal-subscription-id>\\n      </paypal-transaction>\\n   </alt-transaction>\\n</batch-transaction>\",\n      \"language\": \"curl\",\n      \"name\": \"with PayPal recurring subscription payment\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/batch-transactions \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<batch-transaction xmlns=\\\"http://ws.plimus.com\\\">\\n  <batch-id>12345</batch-id>\\n  <callback-url>http://example.com/batch_callback</callback-url>\\n  <card-transaction>\\n    <card-transaction-type>AUTH_CAPTURE</card-transaction-type>\\n    <merchant-transaction-id>566</merchant-transaction-id>\\n    <recurring-transaction>RECURRING</recurring-transaction>\\n    <amount>20.00</amount>\\n    <currency>USD</currency>\\n    <card-holder-info>\\n      <first-name>Joe</first-name>\\n      <last-name>Example</last-name>\\n    </card-holder-info>\\n    <credit-card>\\n       <encrypted-card-number>$bsjs_1_0_3$B23uuxq8drUwOYZm3wZi+Qm69V5GPEt8PEio+Edwcm8akczQSK7odgLQH/Au+VqOCsGspW1Q9mPyQIzGLSZLVToAQVfq5C1ld+2ogIIsDL32Hd6IojboLyVlYT1FvPQoDyz19K6N0CUHh5uk0kCLuHSUyjvoJH38ojHZifbJSm/7S5vAtiuC3BJt2z8k9nauQaAXkbyoAYwrS1yDpqOt2k2lGhKcmdQ4ImDR0RL8m8xig6sFrki9oqo3Mju/M5r7wXXVTf7TMtWiQbzdfREOxKUnviXJZpncdHqVjj5GvPYun2qgopKVKr8F5+yd19TVW2gvA1kXBkXonFL9159Gxg==$zckJgo2i8jXDiAHwVVHBKypXFnWqF2e+6luBkmtQQRKniDXyXaalRVKLtYscBaGd$W7Ojqk1Q2iOJVeGL39RAsZTtfup3f1deSzvxrvC9rXA=</encrypted-card-number>\\n      <card-type>VISA</card-type>\\n      <expiration-month>07</expiration-month>\\n      <expiration-year>2016</expiration-year>\\n  </card-transaction>\\n  <card-transaction>\\n    <card-transaction-type>AUTH_CAPTURE</card-transaction-type>\\n    <merchant-transaction-id>567</merchant-transaction-id>\\n    <recurring-transaction>ECOMMERCE</recurring-transaction>\\n    <amount>25.00</amount>\\n    <currency>USD</currency>\\n    <card-holder-info>\\n      <first-name>Jane</first-name>\\n      <last-name>Shopper</last-name>\\n    </card-holder-info>\\n    <credit-card>\\n       <encrypted-card-number>$bsjs_1_0_3$B23uuxq8drUwOYZm3wZi+Qm69V5GPEt8PEio+Edwcm8akczQSK7odgLQH/Au+VqOCsGspW1Q9mPyQIzGLSZLVToAQVfq5C1ld+2ogIIsDL32Hd6IojboLyVlYT1FvPQoDyz19K6N0CUHh5uk0kCLuHSUyjvoJH38ojHZifbJSm/7S5vAtiuC3BJt2z8k9nauQaAXkbyoAYwrS1yDpqOt2k2lGhKcmdQ4ImDR0RL8m8xig6sFrki9oqo3Mju/M5r7wXXVTf7TMtWiQbzdfREOxKUnviXJZpncdHqVjj5GvPYun2qgopKVKr8F5+yd19TVW2gvA1kXBkXonFL9159Gxg==$zckJgo2i8jXDiAHwVVHBKypXFnWqF2e+6luBkmtQQRKniDXyXaalRVKLtYscBaGd$W7Ojqk1Q2iOJVeGL39RAsZTtfup3f1deSzvxrvC9rXA=</encrypted-card-number>\\n      <card-type>VISA</card-type>\\n      <expiration-month>07</expiration-month>\\n      <expiration-year>2016</expiration-year>\\n    </credit-card>\\n  </card-transaction>\\n</batch-transaction>'\",\n      \"language\": \"curl\",\n      \"name\": \"with encrypted card details\"\n    }\n  ]\n}\n[/block]\n###Response Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HTTP/ 1.1 201 Created\",\n      \"language\": \"http\",\n      \"name\": \"Create Batch Transaction Response: 201 Created\"\n    }\n  ]\n}\n[/block]\n<a class=\"btn btn-primary\" href=\"#\" role=\"button\">Back to Top</a>\n\n<hr>\n\n##Example Descriptions\nFor details about the above examples, see:\n  * [Basic Create Batch Transaction](create-batch-transaction#section-basic-create-batch-transaction)\n  * [Create Batch Transaction with vaulted shoppers](create-batch-transaction#section-create-batch-transaction-with-vaulted-shoppers)\n  * [Create Batch Transaction with PayPal recurring subscription payment](create-batch-transaction#section-create-batch-transaction-with-paypal-recurring-subscription-payment)\n  * [Create Batch Transaction with encrypted card details](create-batch-transaction#section-create-batch-transaction-with-encrypted-card-details)\n \n###Basic Create Batch Transaction\nThis example shows a basic Create Batch Transaction request, containing two `card-transaction` resources with the required fields to process a credit card payment. \n\nNote that within each `card-transaction` resource you can use any of the options available for a single [Auth Capture](doc:auth-capture) or [Create PayPal Transaction](doc:create-paypal-transaction) (recurring subscription payment only) request, such as using a vaulted shopper, sending encrypted card information, including metadata, and so on. \n\n###Create Batch Transaction with vaulted shoppers\nTo perform a Create Batch Transaction request with existing vaulted shoppers, you'll need to include the `vaulted-shopper-id` property within the `card-transaction` or `alt-transaction` resources in your request.\n\nRemember to include the card's last four digits if multiple cards are saved for the shopper.\n\nAbove is an example of a request with a vaulted shopper ID within each `card-transaction` resource.\n\n###Create Batch Transaction with PayPal recurring subscription payment\nTo perform batch transactions with PayPal payments for subscriptions, you will need to send the  `alt-transaction` resource in your request, and include in it the `paypal-transaction` resource, with the `paypal-subscription-id` element.\n\nThe request should contain only one transaction per unique `paypal-subscription-id`.\n\nOn the right is an example of a request with one PayPal subscription transaction.\n\nFor more information, see [Merchant-managed PayPal subscriptions](/v2.0/docs/subscription-management#section-processing-merchant-managed-paypal-subscription-payments).\n\n###Create Batch Transaction with encrypted card details\nYour PCI compliance requirements and API permission level may require that you send credit card data in encrypted format only. To do this, you'll need to include the `encrypted-card-number` and `encrypted-security-code` properties within the `card-transaction` resources in your request.\n\nOn the right is an example of a request with encrypted credit card numbers within each `card-transaction` resource.\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!**\nIn order to get a successful response, you must enter a unique batch ID in the `batch-id` property.\n\n**Tip**: Copy the XML portion from one of the example requests above, or use the XML code below as a starting point. You can enter different parameters and  test credit card numbers 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\": \"<batch-transaction xmlns=\\\"http://ws.plimus.com\\\">\\n  <batch-id>567890</batch-id>\\n  <callback-url>http://example.com/batch_callback</callback-url>\\n  <card-transaction>\\n    <card-transaction-type>AUTH_CAPTURE</card-transaction-type>\\n    <merchant-transaction-id>566</merchant-transaction-id>\\n    <recurring-transaction>RECURRING</recurring-transaction>\\n    <amount>20.00</amount>\\n    <currency>USD</currency>\\n    <card-holder-info>\\n      <first-name>Joe</first-name>\\n      <last-name>Example</last-name>\\n    </card-holder-info>\\n    <credit-card>\\n      <card-number>4263982640269299</card-number>\\n      <expiration-month>02</expiration-month>\\n      <expiration-year>2018</expiration-year>\\n    </credit-card>\\n  </card-transaction>\\n    <card-transaction>\\n    <card-transaction-type>AUTH_CAPTURE</card-transaction-type>\\n    <merchant-transaction-id>567</merchant-transaction-id>\\n    <recurring-transaction>ECOMMERCE</recurring-transaction>\\n    <amount>25.00</amount>\\n    <currency>USD</currency>\\n    <card-holder-info>\\n      <first-name>Jane</first-name>\\n      <last-name>Shopper</last-name>\\n    </card-holder-info>\\n    <credit-card>\\n      <card-number>4111111111111111</card-number>\\n      <expiration-month>07</expiration-month>\\n      <expiration-year>2019</expiration-year>\\n    </credit-card>\\n  </card-transaction>\\n</batch-transaction>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"create-batch-transaction","type":"post","title":"Create Batch Transaction"}

postCreate Batch Transaction


Definition

{{ api_url }}{{ page_api_url }}

Documentation

The Create Batch Transaction request enables you to process multiple transactions at once, including credit card transactions (Auth Capture only) and PayPal recurring transactions.

The request includes multiple card-transaction and/or alt-transaction resources, along with a unique batch ID that you define, and a callback URL where you would like the status of the batch transaction to be sent after processing.

The API sends an immediate response to the Create Batch Transaction request and then the individual transactions in the request are processed. Once all transactions are processed, BlueSnap sends the full batch result to the callback URL you provided in the request. Some of the transactions may be successfully processed and some may be failed. However, as long as the batch file was successfully processed, the callback status of the batch will be completed. For an example of the batch result that is sent to your callback URL after the transactions have been processed, see Example Batch Result.

Transaction limit per batch

There is a limit of 2000 transactions per batch.

Try it in the API Explorer

Request Content

batch-transaction container    required, contains the following properties (see batch-transaction):
   batch-id string    required
   callback-url string    required
   card-transaction container    required for credit card transactions (see card-transaction)
   alt-transaction container    required for PayPal transactions (see alt-transaction)

Response Details

If successful, the response HTTP status code is 201 Created.
Note that if an error occurs, the error format is slightly different from other error types. See Batch transaction errors.
For an example of the batch result that is sent to your callback URL after the transactions have been processed, see Example Batch Result.


Examples

Request Examples

curl -v -X POST https://sandbox.bluesnap.com/services/2/batch-transactions \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<batch-transaction xmlns="http://ws.plimus.com">
  <batch-id>567890</batch-id>
  <callback-url>http://example.com/batch_callback</callback-url>
  <card-transaction>
    <card-transaction-type>AUTH_CAPTURE</card-transaction-type>
    <merchant-transaction-id>566</merchant-transaction-id>
    <recurring-transaction>RECURRING</recurring-transaction>
    <amount>20.00</amount>
    <currency>USD</currency>
    <card-holder-info>
      <first-name>Joe</first-name>
      <last-name>Example</last-name>
    </card-holder-info>
    <credit-card>
      <card-number>4263982640269299</card-number>
      <expiration-month>02</expiration-month>
      <expiration-year>2018</expiration-year>
    </credit-card>
  </card-transaction>
    <card-transaction>
    <card-transaction-type>AUTH_CAPTURE</card-transaction-type>
    <merchant-transaction-id>567</merchant-transaction-id>
    <recurring-transaction>ECOMMERCE</recurring-transaction>
    <amount>25.00</amount>
    <currency>USD</currency>
    <card-holder-info>
      <first-name>Jane</first-name>
      <last-name>Shopper</last-name>
    </card-holder-info>
    <credit-card>
      <card-number>4111111111111111</card-number>
      <expiration-month>07</expiration-month>
      <expiration-year>2019</expiration-year>
    </credit-card>
  </card-transaction>
</batch-transaction>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/batch-transactions \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<?xml version="1.0" encoding="UTF-8"?>
<batch-transaction xmlns="http://ws.plimus.com">
   <batch-id>unique_0130076552988</batch-id>
   <callback-url>http://localhost:8080/jsp/batch_callback.jsp</callback-url>
   <card-transaction>
      <card-transaction-type>AUTH_CAPTURE</card-transaction-type>
      <merchant-transaction-id>566</merchant-transaction-id>
      <recurring-transaction>RECURRING</recurring-transaction>
      <soft-descriptor>DescTest txn1</soft-descriptor>
      <amount>11.00</amount>
      <currency>USD</currency>
      <vaulted-shopper-id>19567060</vaulted-shopper-id>
    </card-transaction>
    <card-transaction>
      <card-transaction-type>AUTH_CAPTURE</card-transaction-type>
      <merchant-transaction-id>567</merchant-transaction-id>
      <recurring-transaction>ECOMMERCE</recurring-transaction>
      <amount>11.00</amount>
      <currency>USD</currency>
      <vaulted-shopper-id>20773559</vaulted-shopper-id>
      <credit-card>
         <card-last-four-digits>9299</card-last-four-digits>
      <card-type>VISA</card-type>
   </credit-card>
   </card-transaction>
</batch-transaction>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/batch-transactions \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<?xml version="1.0" encoding="UTF-8"?>
<batch-transaction xmlns="http://ws.plimus.com">
   <batch-id>shachaf_014</batch-id>
   <callback-url>http://localhost:8080/jsp/batch_callback.jsp</callback-url>
   <alt-transaction>
      <amount>100.00</amount>
      <currency>USD</currency>
      <paypal-transaction>
         <paypal-subscription-id>1234567</paypal-subscription-id>
      </paypal-transaction>
   </alt-transaction>
</batch-transaction>
curl -v -X POST https://sandbox.bluesnap.com/services/2/batch-transactions \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<batch-transaction xmlns="http://ws.plimus.com">
  <batch-id>12345</batch-id>
  <callback-url>http://example.com/batch_callback</callback-url>
  <card-transaction>
    <card-transaction-type>AUTH_CAPTURE</card-transaction-type>
    <merchant-transaction-id>566</merchant-transaction-id>
    <recurring-transaction>RECURRING</recurring-transaction>
    <amount>20.00</amount>
    <currency>USD</currency>
    <card-holder-info>
      <first-name>Joe</first-name>
      <last-name>Example</last-name>
    </card-holder-info>
    <credit-card>
       <encrypted-card-number>$bsjs_1_0_3$B23uuxq8drUwOYZm3wZi+Qm69V5GPEt8PEio+Edwcm8akczQSK7odgLQH/Au+VqOCsGspW1Q9mPyQIzGLSZLVToAQVfq5C1ld+2ogIIsDL32Hd6IojboLyVlYT1FvPQoDyz19K6N0CUHh5uk0kCLuHSUyjvoJH38ojHZifbJSm/7S5vAtiuC3BJt2z8k9nauQaAXkbyoAYwrS1yDpqOt2k2lGhKcmdQ4ImDR0RL8m8xig6sFrki9oqo3Mju/M5r7wXXVTf7TMtWiQbzdfREOxKUnviXJZpncdHqVjj5GvPYun2qgopKVKr8F5+yd19TVW2gvA1kXBkXonFL9159Gxg==$zckJgo2i8jXDiAHwVVHBKypXFnWqF2e+6luBkmtQQRKniDXyXaalRVKLtYscBaGd$W7Ojqk1Q2iOJVeGL39RAsZTtfup3f1deSzvxrvC9rXA=</encrypted-card-number>
      <card-type>VISA</card-type>
      <expiration-month>07</expiration-month>
      <expiration-year>2016</expiration-year>
  </card-transaction>
  <card-transaction>
    <card-transaction-type>AUTH_CAPTURE</card-transaction-type>
    <merchant-transaction-id>567</merchant-transaction-id>
    <recurring-transaction>ECOMMERCE</recurring-transaction>
    <amount>25.00</amount>
    <currency>USD</currency>
    <card-holder-info>
      <first-name>Jane</first-name>
      <last-name>Shopper</last-name>
    </card-holder-info>
    <credit-card>
       <encrypted-card-number>$bsjs_1_0_3$B23uuxq8drUwOYZm3wZi+Qm69V5GPEt8PEio+Edwcm8akczQSK7odgLQH/Au+VqOCsGspW1Q9mPyQIzGLSZLVToAQVfq5C1ld+2ogIIsDL32Hd6IojboLyVlYT1FvPQoDyz19K6N0CUHh5uk0kCLuHSUyjvoJH38ojHZifbJSm/7S5vAtiuC3BJt2z8k9nauQaAXkbyoAYwrS1yDpqOt2k2lGhKcmdQ4ImDR0RL8m8xig6sFrki9oqo3Mju/M5r7wXXVTf7TMtWiQbzdfREOxKUnviXJZpncdHqVjj5GvPYun2qgopKVKr8F5+yd19TVW2gvA1kXBkXonFL9159Gxg==$zckJgo2i8jXDiAHwVVHBKypXFnWqF2e+6luBkmtQQRKniDXyXaalRVKLtYscBaGd$W7Ojqk1Q2iOJVeGL39RAsZTtfup3f1deSzvxrvC9rXA=</encrypted-card-number>
      <card-type>VISA</card-type>
      <expiration-month>07</expiration-month>
      <expiration-year>2016</expiration-year>
    </credit-card>
  </card-transaction>
</batch-transaction>'

Response Example

Back to Top


Example Descriptions

For details about the above examples, see:

Basic Create Batch Transaction

This example shows a basic Create Batch Transaction request, containing two card-transaction resources with the required fields to process a credit card payment.

Note that within each card-transaction resource you can use any of the options available for a single Auth Capture or Create PayPal Transaction (recurring subscription payment only) request, such as using a vaulted shopper, sending encrypted card information, including metadata, and so on.

Create Batch Transaction with vaulted shoppers

To perform a Create Batch Transaction request with existing vaulted shoppers, you'll need to include the vaulted-shopper-id property within the card-transaction or alt-transaction resources in your request.

Remember to include the card's last four digits if multiple cards are saved for the shopper.

Above is an example of a request with a vaulted shopper ID within each card-transaction resource.

Create Batch Transaction with PayPal recurring subscription payment

To perform batch transactions with PayPal payments for subscriptions, you will need to send the alt-transaction resource in your request, and include in it the paypal-transaction resource, with the paypal-subscription-id element.

The request should contain only one transaction per unique paypal-subscription-id.

On the right is an example of a request with one PayPal subscription transaction.

For more information, see Merchant-managed PayPal subscriptions.

Create Batch Transaction with encrypted card details

Your PCI compliance requirements and API permission level may require that you send credit card data in encrypted format only. To do this, you'll need to include the encrypted-card-number and encrypted-security-code properties within the card-transaction resources in your request.

On the right is an example of a request with encrypted credit card numbers within each card-transaction resource.



Back to Top


API Explorer

To test out a call, enter the XML portion of the request below and then click Try it!
In order to get a successful response, you must enter a unique batch ID in the batch-id property.

Tip: Copy the XML portion from one of the example requests above, or use the XML code below as a starting point. You can enter different parameters and test credit card numbers 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.

<batch-transaction xmlns="http://ws.plimus.com">
  <batch-id>567890</batch-id>
  <callback-url>http://example.com/batch_callback</callback-url>
  <card-transaction>
    <card-transaction-type>AUTH_CAPTURE</card-transaction-type>
    <merchant-transaction-id>566</merchant-transaction-id>
    <recurring-transaction>RECURRING</recurring-transaction>
    <amount>20.00</amount>
    <currency>USD</currency>
    <card-holder-info>
      <first-name>Joe</first-name>
      <last-name>Example</last-name>
    </card-holder-info>
    <credit-card>
      <card-number>4263982640269299</card-number>
      <expiration-month>02</expiration-month>
      <expiration-year>2018</expiration-year>
    </credit-card>
  </card-transaction>
    <card-transaction>
    <card-transaction-type>AUTH_CAPTURE</card-transaction-type>
    <merchant-transaction-id>567</merchant-transaction-id>
    <recurring-transaction>ECOMMERCE</recurring-transaction>
    <amount>25.00</amount>
    <currency>USD</currency>
    <card-holder-info>
      <first-name>Jane</first-name>
      <last-name>Shopper</last-name>
    </card-holder-info>
    <credit-card>
      <card-number>4111111111111111</card-number>
      <expiration-month>07</expiration-month>
      <expiration-year>2019</expiration-year>
    </credit-card>
  </card-transaction>
</batch-transaction>

User Information

Try It Out


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