{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/alt-transactions","auth":"optional","settings":"","results":{"codes":[]},"params":[],"examples":{"codes":[]},"method":"post"},"next":{"description":"","pages":[]},"title":"Create Sofort Transaction","type":"endpoint","slug":"create-sofort-transaction","excerpt":"","body":"The Create Sofort Transaction request performs a transaction using the [Sofort payment method](/docs/sofort). \n\n<br>\n\n<a class=\"btn btn-success\" href=\"#section-api-explorer\" role=\"button\">Try it in the API Explorer</a>\n\n###Request Content\nSend an **[alt-transaction](doc:alt-transaction)** object, with the following:\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`amount` &nbsp;&nbsp;&nbsp; *decimal* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`currency` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span>&nbsp;&nbsp;&nbsp; must be a [supported](https://support.bluesnap.com/docs/sofort#supported-markets) currency\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`sofort-transaction` &nbsp;&nbsp;&nbsp; *object* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span> (see [sofort-transaction](doc:sofort-transaction))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`payer-info` &nbsp;&nbsp;&nbsp; *object* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span> for a new shopper (see [payerInfo](doc:payer-info))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`vaulted-shopper-id`&#42; &nbsp;&nbsp;&nbsp; *integer* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span> for a vaulted shopper\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`vendors-info` *object* &nbsp;&nbsp;&nbsp;optional (see [vendors-info](doc:vendors-info))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`merchant-transaction-id` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`transaction-meta-data` &nbsp;&nbsp;&nbsp; *object* &nbsp;&nbsp;&nbsp;optional (see [transaction-meta-data](doc:transaction-meta-data))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`transaction-fraud-info` &nbsp;&nbsp;&nbsp; *object* &nbsp;&nbsp;&nbsp;optional (see [transaction-fraud-info](doc:transaction-fraud-info))  \n\n&#42;The vaulted shopper's saved country must be [supported](https://support.bluesnap.com/docs/sofort#supported-markets) by Sofort. \n\n###Response Details\nIf successful, the response HTTP status code is 200 OK.\nThe response contains the request properties plus these additions:\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`vaulted-shopper-id`\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`processing-info`&nbsp;&nbsp;&nbsp;(see [processing-info](doc:processing-info))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`fraud-result-info`&nbsp;&nbsp;&nbsp;(see [fraud-result-info](doc:fraud-result-info))  \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/alt-transactions/ \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Accept: application/xml' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<alt-transaction xmlns=\\\"http://ws.plimus.com\\\">\\n  <amount>42.00</amount>\\n  <currency>EUR</currency>\\n  <payer-info>\\n    <first-name>John</first-name>\\n    <last-name>Doe</last-name>\\n    <country>de</country>\\n  </payer-info>\\n  <sofort-transaction>\\n    <return-url>http://www.returnURL.com</return-url>\\n  </sofort-transaction>\\n</alt-transaction>'\",\n      \"language\": \"curl\",\n      \"name\": \"Create Sofort Transaction: Basic with new shopper\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Accept: application/xml' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<alt-transaction xmlns=\\\"http://ws.plimus.com\\\">\\n  <amount>42.00</amount>\\n  <currency>GBP</currency>\\n  <vaulted-shopper-id>29896125</vaulted-shopper-id>\\n  <sofort-transaction>\\n    <language>fr</language>\\n    <return-url>http://www.returnURL.com</return-url>\\n  </sofort-transaction>\\n</alt-transaction>'\",\n      \"language\": \"curl\",\n      \"name\": \"with returning shopper & language code\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Accept: application/xml' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<alt-transaction xmlns=\\\"http://ws.plimus.com\\\">\\n  <amount>42.00</amount>\\n  <currency>EUR</currency>\\n  <payer-info>\\n    <first-name>John</first-name>\\n    <last-name>Doe</last-name>\\n    <country>de</country>\\n  </payer-info>\\n  <sofort-transaction>\\n    <return-url>http://www.returnURL.com</return-url>\\n  </sofort-transaction>\\n  <vendors-info>\\n    <vendor-info>\\n      <vendor-id>837389</vendor-id>\\n    </vendor-info>\\n  </vendors-info>\\n</alt-transaction>'\",\n      \"language\": \"curl\",\n      \"name\": \"with marketplace vendor\"\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<alt-transaction xmlns=\\\"http://ws.plimus.com\\\">\\n  <amount>42.00</amount>\\n  <currency>EUR</currency>\\n  <payer-info>\\n    <first-name>John</first-name>\\n    <last-name>Doe</last-name>\\n    <country>de</country>\\n  </payer-info>\\n  <vaulted-shopper-id>29896283</vaulted-shopper-id>\\n  <sofort-transaction>\\n    <sofort-url>https&#x3a;&#x2f;&#x2f;eu.gcsip.nl&#x2f;orb&#x2f;orb&#x3f;ACTION&#x3d;DO_START&#x26;REF&#x3d;000000410000209219850000100001&#x26;MAC&#x3d;1t&#x25;2BHU&#x25;2BnF31pGekoVtt7Rpu5IXvapG3EI6AKpgz7eBYo&#x25;3D</sofort-url>\\n    <order-id>20921985</order-id>\\n  </sofort-transaction>\\n  <processing-info>\\n    <processing-status>PENDING</processing-status>\\n  </processing-info>\\n</alt-transaction>\",\n      \"language\": \"xml\",\n      \"name\": \"Basic with new shopper\"\n    },\n    {\n      \"code\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\n<alt-transaction xmlns=\\\"http://ws.plimus.com\\\">\\n  <amount>42.00</amount>\\n  <currency>GBP</currency>\\n  <vaulted-shopper-id>29896125</vaulted-shopper-id>\\n  <sofort-transaction>\\n    <language>fr</language>\\n    <sofort-url>https&#x3a;&#x2f;&#x2f;eu.gcsip.nl&#x2f;orb&#x2f;orb&#x3f;ACTION&#x3d;DO_START&#x26;REF&#x3d;000000410000209225050000100001&#x26;MAC&#x3d;C0giPlQoDFY54kvnkpcUfIFOJI0mCmYzNqlrBDR51y4&#x25;3D</sofort-url>\\n    <order-id>20922505</order-id>\\n  </sofort-transaction>\\n  <processing-info>\\n    <processing-status>PENDING</processing-status>\\n  </processing-info>\\n</alt-transaction>\",\n      \"language\": \"xml\",\n      \"name\": \"Returning shopper & language code\"\n    },\n    {\n      \"code\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\n<alt-transaction xmlns=\\\"http://ws.plimus.com\\\">\\n  <vendors-info>\\n    <vendor-info>\\n      <vendor-id>837389</vendor-id>\\n      <commission-percent>30</commission-percent>\\n    </vendor-info>\\n  </vendors-info>\\n  <amount>42.00</amount>\\n  <currency>EUR</currency>\\n  <payer-info>\\n    <first-name>John</first-name>\\n    <last-name>Doe</last-name>\\n    <country>de</country>\\n  </payer-info>\\n  <vaulted-shopper-id>29896295</vaulted-shopper-id>\\n  <sofort-transaction>\\n    <sofort-url>https&#x3a;&#x2f;&#x2f;eu.gcsip.nl&#x2f;orb&#x2f;orb&#x3f;ACTION&#x3d;DO_START&#x26;REF&#x3d;000000410000209217250000100001&#x26;MAC&#x3d;KgD72WCtT&#x25;2FlPlAwbMtKWD7iK6ekRxezMxRX3pskHXPs&#x25;3D</sofort-url>\\n    <order-id>20921725</order-id>\\n  </sofort-transaction>\\n  <processing-info>\\n    <processing-status>PENDING</processing-status>\\n  </processing-info>\\n</alt-transaction>\",\n      \"language\": \"xml\",\n      \"name\": \"Marketplace vendor\"\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* [Create a basic Sofort transaction with a new shopper](#section-create-a-basic-sofort-transaction-with-a-new-shopper)\n* [Create a Sofort transaction with a returning shopper](#section-create-a-sofort-transaction-with-a-returning-shopper)\n* [Create a Sofort transaction with a Marketplace vendor](#section-create-a-sofort-transaction-with-a-marketplace-vendor)\n\n### Create a basic Sofort transaction with a new shopper\nThis example shows a basic request with a new shopper whose details are included within `payer-info`. The `return-url` property specifies where the shopper should be redirected after they complete their payment. A successful response will include `sofort-url`, which is where you'll need to direct the shopper so they can complete their purchase. \n\n### Create a Sofort transaction with a returning shopper\nThis example shows a request with a returning shopper whose ID is specified by the `vaulted-shopper-id` property. Note that the vaulted shopper's saved country must be supported by Sofort. Additionally, the request includes `language`, which specifies how the pages should be translated.  \n\n### Create a Sofort transaction with a Marketplace vendor\nThis example shows a request with a [Marketplace](/docs/marketplace-overview) vendor whose ID is specified by `vendor-id`. Additional vendors can be added to the transaction by including another `vendor-info` container within `vendors-info`. \n\n<br>\n\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 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\": \"<alt-transaction xmlns=\\\"http://ws.plimus.com\\\">\\n  <amount>42.00</amount>\\n  <currency>EUR</currency>\\n  <payer-info>\\n    <first-name>John</first-name>\\n    <last-name>Doe</last-name>\\n    <country>de</country>\\n  </payer-info>\\n  <sofort-transaction>\\n    <return-url>http://www.returnURL.com</return-url>\\n  </sofort-transaction>\\n</alt-transaction>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]","updates":[],"order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"60fed269718a45001c25b499","createdAt":"2020-12-16T03:12:22.749Z","user":"5ea72d649148ff00653f6bbc","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Sofort Transactions","slug":"sofort-transactions","order":7,"from_sync":false,"reference":false,"_id":"60fed269718a45001c25b3f3","createdAt":"2020-12-16T03:09:14.538Z","version":"60fed269718a45001c25b4a0","project":"57336fd5a6a9c40e00e13a0b","__v":0},"version":{"version":"8976-XML","version_clean":"8976.0.0-XML","codename":"3.39 Release","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["60fed269718a45001c25b3e0","60fed269718a45001c25b3e1","60fed269718a45001c25b3e2","60fed269718a45001c25b3e3","60fed269718a45001c25b3e4","60fed269718a45001c25b3e5","60fed269718a45001c25b3e6","60fed269718a45001c25b3e7","60fed269718a45001c25b3e8","60fed269718a45001c25b3e9","60fed269718a45001c25b3ea","60fed269718a45001c25b3eb","60fed269718a45001c25b3ec","60fed269718a45001c25b3ed","60fed269718a45001c25b3ee","60fed269718a45001c25b3ef","60fed269718a45001c25b3f0","60fed269718a45001c25b3f1","60fed269718a45001c25b3f2","60fed269718a45001c25b3f3"],"_id":"60fed269718a45001c25b4a0","project":"57336fd5a6a9c40e00e13a0b","__v":0,"forked_from":"60a664e29be3b00016c6d151","createdAt":"2018-04-24T15:24:22.608Z","releaseDate":"2018-04-24T15:24:22.608Z"},"project":"57336fd5a6a9c40e00e13a0b","__v":0,"parentDoc":null}

postCreate Sofort Transaction


Definition

{{ api_url }}{{ page_api_url }}

Documentation

The Create Sofort Transaction request performs a transaction using the Sofort payment method.


Try it in the API Explorer

Request Content

Send an alt-transaction object, with the following:

      amount     decimal    required
      currency     string    required    must be a supported currency
      sofort-transaction     object    required (see sofort-transaction)
      payer-info     object    required for a new shopper (see payerInfo)
      vaulted-shopper-id*     integer    required for a vaulted shopper
      vendors-info object    optional (see vendors-info)
      merchant-transaction-id     string    optional
      transaction-meta-data     object    optional (see transaction-meta-data)
      transaction-fraud-info     object    optional (see transaction-fraud-info)

*The vaulted shopper's saved country must be supported by Sofort.

Response Details

If successful, the response HTTP status code is 200 OK.
The response contains the request properties plus these additions:

      vaulted-shopper-id
      processing-info   (see processing-info)
      fraud-result-info   (see fraud-result-info)


Examples

Request Examples

curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \
-H 'Content-Type: application/xml' \
-H 'Accept: application/xml' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<alt-transaction xmlns="http://ws.plimus.com">
  <amount>42.00</amount>
  <currency>EUR</currency>
  <payer-info>
    <first-name>John</first-name>
    <last-name>Doe</last-name>
    <country>de</country>
  </payer-info>
  <sofort-transaction>
    <return-url>http://www.returnURL.com</return-url>
  </sofort-transaction>
</alt-transaction>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \
-H 'Content-Type: application/xml' \
-H 'Accept: application/xml' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<alt-transaction xmlns="http://ws.plimus.com">
  <amount>42.00</amount>
  <currency>GBP</currency>
  <vaulted-shopper-id>29896125</vaulted-shopper-id>
  <sofort-transaction>
    <language>fr</language>
    <return-url>http://www.returnURL.com</return-url>
  </sofort-transaction>
</alt-transaction>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \
-H 'Content-Type: application/xml' \
-H 'Accept: application/xml' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<alt-transaction xmlns="http://ws.plimus.com">
  <amount>42.00</amount>
  <currency>EUR</currency>
  <payer-info>
    <first-name>John</first-name>
    <last-name>Doe</last-name>
    <country>de</country>
  </payer-info>
  <sofort-transaction>
    <return-url>http://www.returnURL.com</return-url>
  </sofort-transaction>
  <vendors-info>
    <vendor-info>
      <vendor-id>837389</vendor-id>
    </vendor-info>
  </vendors-info>
</alt-transaction>'

Response Examples

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<alt-transaction xmlns="http://ws.plimus.com">
  <amount>42.00</amount>
  <currency>EUR</currency>
  <payer-info>
    <first-name>John</first-name>
    <last-name>Doe</last-name>
    <country>de</country>
  </payer-info>
  <vaulted-shopper-id>29896283</vaulted-shopper-id>
  <sofort-transaction>
    <sofort-url>https&#x3a;&#x2f;&#x2f;eu.gcsip.nl&#x2f;orb&#x2f;orb&#x3f;ACTION&#x3d;DO_START&#x26;REF&#x3d;000000410000209219850000100001&#x26;MAC&#x3d;1t&#x25;2BHU&#x25;2BnF31pGekoVtt7Rpu5IXvapG3EI6AKpgz7eBYo&#x25;3D</sofort-url>
    <order-id>20921985</order-id>
  </sofort-transaction>
  <processing-info>
    <processing-status>PENDING</processing-status>
  </processing-info>
</alt-transaction>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<alt-transaction xmlns="http://ws.plimus.com">
  <amount>42.00</amount>
  <currency>GBP</currency>
  <vaulted-shopper-id>29896125</vaulted-shopper-id>
  <sofort-transaction>
    <language>fr</language>
    <sofort-url>https&#x3a;&#x2f;&#x2f;eu.gcsip.nl&#x2f;orb&#x2f;orb&#x3f;ACTION&#x3d;DO_START&#x26;REF&#x3d;000000410000209225050000100001&#x26;MAC&#x3d;C0giPlQoDFY54kvnkpcUfIFOJI0mCmYzNqlrBDR51y4&#x25;3D</sofort-url>
    <order-id>20922505</order-id>
  </sofort-transaction>
  <processing-info>
    <processing-status>PENDING</processing-status>
  </processing-info>
</alt-transaction>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<alt-transaction xmlns="http://ws.plimus.com">
  <vendors-info>
    <vendor-info>
      <vendor-id>837389</vendor-id>
      <commission-percent>30</commission-percent>
    </vendor-info>
  </vendors-info>
  <amount>42.00</amount>
  <currency>EUR</currency>
  <payer-info>
    <first-name>John</first-name>
    <last-name>Doe</last-name>
    <country>de</country>
  </payer-info>
  <vaulted-shopper-id>29896295</vaulted-shopper-id>
  <sofort-transaction>
    <sofort-url>https&#x3a;&#x2f;&#x2f;eu.gcsip.nl&#x2f;orb&#x2f;orb&#x3f;ACTION&#x3d;DO_START&#x26;REF&#x3d;000000410000209217250000100001&#x26;MAC&#x3d;KgD72WCtT&#x25;2FlPlAwbMtKWD7iK6ekRxezMxRX3pskHXPs&#x25;3D</sofort-url>
    <order-id>20921725</order-id>
  </sofort-transaction>
  <processing-info>
    <processing-status>PENDING</processing-status>
  </processing-info>
</alt-transaction>

Back to Top


Example Descriptions

For details about the above examples, see:

Create a basic Sofort transaction with a new shopper

This example shows a basic request with a new shopper whose details are included within payer-info. The return-url property specifies where the shopper should be redirected after they complete their payment. A successful response will include sofort-url, which is where you'll need to direct the shopper so they can complete their purchase.

Create a Sofort transaction with a returning shopper

This example shows a request with a returning shopper whose ID is specified by the vaulted-shopper-id property. Note that the vaulted shopper's saved country must be supported by Sofort. Additionally, the request includes language, which specifies how the pages should be translated.

Create a Sofort transaction with a Marketplace vendor

This example shows a request with a Marketplace vendor whose ID is specified by vendor-id. Additional vendors can be added to the transaction by including another vendor-info container within vendors-info.


Back to Top


API Explorer

To test out a call, enter the request content 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.

<alt-transaction xmlns="http://ws.plimus.com">
  <amount>42.00</amount>
  <currency>EUR</currency>
  <payer-info>
    <first-name>John</first-name>
    <last-name>Doe</last-name>
    <country>de</country>
  </payer-info>
  <sofort-transaction>
    <return-url>http://www.returnURL.com</return-url>
  </sofort-transaction>
</alt-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 }}