The Create Sofort Transaction request performs a transaction using the Sofort payment method.
Request Content
Send an altTransaction object, with the following:
amount
decimal required
currency
string required must be a supported currency
sofortTransaction
object required (see sofortTransaction)
payerInfo
object required for a new shopper (see payerInfo)
vaultedShopperId
* integer required for a vaulted shopper
vendorsInfo
object optional (see vendorsInfo)
merchantTransactionId
string optional
transactionMetaData
object optional (see transactionMetaData)
*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:
vaultedShopperId
processingInfo
(see processingInfo)
fraudResultInfo
(see fraudResultInfo)
Examples
Request Examples
curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"amount": 42,
"currency": "GBP",
"payerInfo": {
"firstName": "John",
"lastName": "Doe",
"country": "uk"
},
"sofortTransaction": {
"returnUrl": "http://www.returnURL.com"
}
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"amount": 57,
"currency": "GBP",
"vaultedShopperId": 29896125,
"sofortTransaction": {
"language": "fr",
"returnUrl": "http://www.returnURL.com"
}
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"amount": 50,
"currency": "EUR",
"payerInfo": {
"firstName": "John",
"lastName": "Doe",
"country": "de"
},
"sofortTransaction": {
"returnUrl": "http://www.returnURL.com"
},
"vendorsInfo": {
"vendorInfo": [
{
"vendorId": 837389
}
]
}
}'
Response Examples
{
"amount": 42,
"currency": "GBP",
"payerInfo": {
"firstName": "John",
"lastName": "Doe",
"country": "uk"
},
"vaultedShopperId": 29896125,
"sofortTransaction": {
"sofortUrl": "https://eu.gcsip.nl/orb/orb?ACTION=DO_START&REF=000000410000209224930000100001&MAC=k4cr6oNG%2FYtDMwfKJWwveKOSA6V3xDS8j0qFWZD7IyA%3D",
"orderId": 20922493
},
"processingInfo": {
"processingStatus": "PENDING"
}
}
{
"amount": 57,
"currency": "GBP",
"vaultedShopperId": 29896125,
"sofortTransaction": {
"language": "fr",
"sofortUrl": "https://eu.gcsip.nl/orb/orb?ACTION=DO_START&REF=000000410000209224950000100001&MAC=sl2YU%2FDhliWFMZwzXXzDSFbyKKuS2Ll%2FncE794IvTKg%3D",
"orderId": 20922495
},
"processingInfo": {
"processingStatus": "PENDING"
}
}
{
"vendorsInfo": {
"vendorInfo": [
{
"vendorId": 837389,
"commissionPercent": 30
}
]
},
"amount": 50,
"currency": "EUR",
"payerInfo": {
"firstName": "John",
"lastName": "Doe",
"country": "de"
},
"vaultedShopperId": 29896135,
"sofortTransaction": {
"sofortUrl": "https://eu.gcsip.nl/orb/orb?ACTION=DO_START&REF=000000410000209217110000100001&MAC=0c0N2AF5tQLQ8VGYG0S2eNOIURDNh70FsQI5ingS2M8%3D",
"orderId": 20921711
},
"processingInfo": {
"processingStatus": "PENDING"
}
}
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 payerInfo
. The returnUrl
property specifies where the shopper should be redirected after they complete their payment. A successful response will include sofortUrl
, which is where you'll need to direct the shopper to 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 vaultedShopperId
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 vendorId
. Additional vendors can be added to the transaction by including another vendor object within vendorInfo
.
API Explorer
To test out a call, enter the request content below and then click Try it!
Tip: Use the JSON 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.
{
"amount": 42,
"currency": "GBP",
"payerInfo": {
"firstName": "John",
"lastName": "Doe",
"country": "uk"
},
"sofortTransaction": {
"returnUrl": "http://www.returnURL.com"
}
}