{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/alt-transactions","auth":"optional","settings":"57ee593a21ceb20e0061959e","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 **[altTransaction](doc:alt-transaction)** object, with the following:\n\n `amount` *decimal* <span style=\"color:#F37500\">**required**</span>\n `currency` *string* <span style=\"color:#F37500\">**required**</span> must be a [supported](https://support.bluesnap.com/docs/sofort#supported-markets) currency\n `sofortTransaction` *object* <span style=\"color:#F37500\">**required**</span> (see [sofortTransaction](doc:soforttransaction))\n `payerInfo` *object* <span style=\"color:#F37500\">**required**</span> for a new shopper (see [payerInfo](doc:payer-info))\n `vaultedShopperId`* *integer* <span style=\"color:#F37500\">**required**</span> for a vaulted shopper\n `vendorsInfo` *object* optional (see [vendorsInfo](doc:vendorsinfo))\n `merchantTransactionId` *string* optional\n `transactionMetaData` *object* optional (see [transactionMetaData](doc:transaction-meta-data))\n `transactionFraudInfo` *object* optional (see [transactionFraudInfo](doc:transaction-fraud-info)) \n\n*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 `vaultedShopperId`\n `processingInfo` (see [processingInfo](doc:processing-info))\n `fraudResultInfo` (see [fraudResultInfo](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/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n \\\"amount\\\": 42,\\n \\\"currency\\\": \\\"GBP\\\",\\n \\\"payerInfo\\\": {\\n \\\"firstName\\\": \\\"John\\\",\\n \\\"lastName\\\": \\\"Doe\\\",\\n \\\"country\\\": \\\"uk\\\"\\n },\\n \\\"sofortTransaction\\\": {\\n \\\"returnUrl\\\": \\\"http://www.returnURL.com\\\"\\n }\\n}'\",\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/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n \\\"amount\\\": 57,\\n \\\"currency\\\": \\\"GBP\\\",\\n \\\"vaultedShopperId\\\": 29896125,\\n \\\"sofortTransaction\\\": {\\n \\\"language\\\": \\\"fr\\\",\\n \\\"returnUrl\\\": \\\"http://www.returnURL.com\\\"\\n }\\n}'\",\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/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n \\\"amount\\\": 50,\\n \\\"currency\\\": \\\"EUR\\\",\\n \\\"payerInfo\\\": {\\n \\\"firstName\\\": \\\"John\\\",\\n \\\"lastName\\\": \\\"Doe\\\",\\n \\\"country\\\": \\\"de\\\"\\n },\\n \\\"sofortTransaction\\\": {\\n \\\"returnUrl\\\": \\\"http://www.returnURL.com\\\"\\n },\\n \\\"vendorsInfo\\\": {\\n \\\"vendorInfo\\\": [\\n {\\n \\\"vendorId\\\": 837389\\n }\\n ]\\n }\\n}'\",\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\": \"{\\n \\\"amount\\\": 42,\\n \\\"currency\\\": \\\"GBP\\\",\\n \\\"payerInfo\\\": {\\n \\\"firstName\\\": \\\"John\\\",\\n \\\"lastName\\\": \\\"Doe\\\",\\n \\\"country\\\": \\\"uk\\\"\\n },\\n \\\"vaultedShopperId\\\": 29896125,\\n \\\"sofortTransaction\\\": {\\n \\\"sofortUrl\\\": \\\"https://eu.gcsip.nl/orb/orb?ACTION=DO_START&REF=000000410000209224930000100001&MAC=k4cr6oNG%2FYtDMwfKJWwveKOSA6V3xDS8j0qFWZD7IyA%3D\\\",\\n \\\"orderId\\\": 20922493\\n },\\n \\\"processingInfo\\\": {\\n \\\"processingStatus\\\": \\\"PENDING\\\"\\n }\\n}\",\n \"language\": \"json\",\n \"name\": \"Basic with new shopper\"\n },\n {\n \"code\": \"{\\n \\\"amount\\\": 57,\\n \\\"currency\\\": \\\"GBP\\\",\\n \\\"vaultedShopperId\\\": 29896125,\\n \\\"sofortTransaction\\\": {\\n \\\"language\\\": \\\"fr\\\",\\n \\\"sofortUrl\\\": \\\"https://eu.gcsip.nl/orb/orb?ACTION=DO_START&REF=000000410000209224950000100001&MAC=sl2YU%2FDhliWFMZwzXXzDSFbyKKuS2Ll%2FncE794IvTKg%3D\\\",\\n \\\"orderId\\\": 20922495\\n },\\n \\\"processingInfo\\\": {\\n \\\"processingStatus\\\": \\\"PENDING\\\"\\n }\\n}\",\n \"language\": \"json\",\n \"name\": \"Returning shopper & language code\"\n },\n {\n \"code\": \"{\\n \\\"vendorsInfo\\\": {\\n \\\"vendorInfo\\\": [\\n {\\n \\\"vendorId\\\": 837389,\\n \\\"commissionPercent\\\": 30\\n }\\n ]\\n },\\n \\\"amount\\\": 50,\\n \\\"currency\\\": \\\"EUR\\\",\\n \\\"payerInfo\\\": {\\n \\\"firstName\\\": \\\"John\\\",\\n \\\"lastName\\\": \\\"Doe\\\",\\n \\\"country\\\": \\\"de\\\"\\n },\\n \\\"vaultedShopperId\\\": 29896135,\\n \\\"sofortTransaction\\\": {\\n \\\"sofortUrl\\\": \\\"https://eu.gcsip.nl/orb/orb?ACTION=DO_START&REF=000000410000209217110000100001&MAC=0c0N2AF5tQLQ8VGYG0S2eNOIURDNh70FsQI5ingS2M8%3D\\\",\\n \\\"orderId\\\": 20921711\\n },\\n \\\"processingInfo\\\": {\\n \\\"processingStatus\\\": \\\"PENDING\\\"\\n }\\n}\",\n \"language\": \"json\",\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 `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. \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 `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. \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 `vendorId`. Additional vendors can be added to the transaction by including another vendor object within `vendorInfo`. \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 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.*\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"{\\n \\\"amount\\\": 42,\\n \\\"currency\\\": \\\"GBP\\\",\\n \\\"payerInfo\\\": {\\n \\\"firstName\\\": \\\"John\\\",\\n \\\"lastName\\\": \\\"Doe\\\",\\n \\\"country\\\": \\\"uk\\\"\\n },\\n \\\"sofortTransaction\\\": {\\n \\\"returnUrl\\\": \\\"http://www.returnURL.com\\\"\\n }\\n}\",\n \"language\": \"json\"\n }\n ]\n}\n[/block]","updates":[],"order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"603d5bd1309e0703644e9318","createdAt":"2020-12-01T22:40:42.095Z","user":"5ea72d649148ff00653f6bbc","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Sofort Transactions","slug":"sofort-transactions","order":7,"from_sync":false,"reference":false,"_id":"603d5bd1309e0703644e9278","createdAt":"2020-12-01T22:39:30.797Z","version":"603d5bd1309e0703644e931e","project":"57336fd5a6a9c40e00e13a0b","__v":0},"version":{"version":"8976-JSON","version_clean":"8976.0.0-JSON","codename":"3.37 Release","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["603d5bd1309e0703644e9266","603d5bd1309e0703644e9267","603d5bd1309e0703644e9268","603d5bd1309e0703644e9269","603d5bd1309e0703644e926a","603d5bd1309e0703644e926b","603d5bd1309e0703644e926c","603d5bd1309e0703644e926d","603d5bd1309e0703644e926e","603d5bd1309e0703644e926f","603d5bd1309e0703644e9270","603d5bd1309e0703644e9271","603d5bd1309e0703644e9272","603d5bd1309e0703644e9273","603d5bd1309e0703644e9274","603d5bd1309e0703644e9275","603d5bd1309e0703644e9276","603d5bd1309e0703644e9277","603d5bd1309e0703644e9278"],"_id":"603d5bd1309e0703644e931e","project":"57336fd5a6a9c40e00e13a0b","__v":0,"forked_from":"5ff39c12e2e8fa00503ad5e4","createdAt":"2018-04-24T15:22:41.561Z","releaseDate":"2018-04-24T15:22:41.561Z"},"project":"57336fd5a6a9c40e00e13a0b","__v":0,"parentDoc":null}
postCreate Sofort Transaction
Definition
Documentation
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)
transactionFraudInfo
object optional (see transactionFraudInfo)
*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
}
]
}
}'
{
"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"
}
}