The Create Sofort Transaction request performs a transaction using the Sofort payment method.
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)
*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://eu.gcsip.nl/orb/orb?ACTION=DO_START&REF=000000410000209219850000100001&MAC=1t%2BHU%2BnF31pGekoVtt7Rpu5IXvapG3EI6AKpgz7eBYo%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://eu.gcsip.nl/orb/orb?ACTION=DO_START&REF=000000410000209225050000100001&MAC=C0giPlQoDFY54kvnkpcUfIFOJI0mCmYzNqlrBDR51y4%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://eu.gcsip.nl/orb/orb?ACTION=DO_START&REF=000000410000209217250000100001&MAC=KgD72WCtT%2FlPlAwbMtKWD7iK6ekRxezMxRX3pskHXPs%3D</sofort-url>
<order-id>20921725</order-id>
</sofort-transaction>
<processing-info>
<processing-status>PENDING</processing-status>
</processing-info>
</alt-transaction>
Example Descriptions
For details about the above examples, see:
- Create a basic Sofort transaction with a new shopper
- Create a Sofort transaction with a returning shopper
- Create a Sofort transaction with a Marketplace vendor
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
.
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>