{"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&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;`sofortTransaction` &nbsp;&nbsp;&nbsp; *object* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span> (see [sofortTransaction](doc:soforttransaction))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`payerInfo` &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;`vaultedShopperId`&#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;`vendorsInfo` *object* &nbsp;&nbsp;&nbsp;optional (see [vendorsInfo](doc:vendorsinfo))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`merchantTransactionId` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`transactionMetaData` &nbsp;&nbsp;&nbsp; *object* &nbsp;&nbsp;&nbsp;optional (see [transactionMetaData](doc:transaction-meta-data))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`transactionFraudInfo` &nbsp;&nbsp;&nbsp; *object* &nbsp;&nbsp;&nbsp;optional (see [transactionFraudInfo](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;`vaultedShopperId`\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`processingInfo`&nbsp;&nbsp;&nbsp;(see [processingInfo](doc:processing-info))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`fraudResultInfo`&nbsp;&nbsp;&nbsp;(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":"5fc6c66a5a73b6079e5b4a3a","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":"5fc6c6226f585a06ba4b9746","createdAt":"2020-12-01T22:39:30.797Z","version":"5fc6c6094cb8fa066b0d2ea3","project":"57336fd5a6a9c40e00e13a0b","__v":0},"version":{"version":"8976-JSON","version_clean":"8976.0.0-JSON","codename":"3.36 Release","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5fc6c6094cb8fa066b0d2df1","5fc6c6094cb8fa066b0d2df2","5fc6c6094cb8fa066b0d2df3","5fc6c6094cb8fa066b0d2df4","5fc6c6094cb8fa066b0d2df5","5fc6c6094cb8fa066b0d2df6","5fc6c6094cb8fa066b0d2df7","5fc6c6094cb8fa066b0d2df8","5fc6c6094cb8fa066b0d2df9","5fc6c6094cb8fa066b0d2dfa","5fc6c6094cb8fa066b0d2dfb","5fc6c6094cb8fa066b0d2dfc","5fc6c6094cb8fa066b0d2dfd","5fc6c6094cb8fa066b0d2dfe","5fc6c6094cb8fa066b0d2dff","5fc6c6094cb8fa066b0d2e00","5fc6c6094cb8fa066b0d2e01","5fc6c6094cb8fa066b0d2e02","5fc6c6226f585a06ba4b9746"],"_id":"5fc6c6094cb8fa066b0d2ea3","project":"57336fd5a6a9c40e00e13a0b","__v":1,"forked_from":"5f43d7db37d54d01d8ef0876","createdAt":"2018-04-24T15:22:41.561Z","releaseDate":"2018-04-24T15:22:41.561Z"},"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 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
      }
    ]
  }
}'

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"
  }
}

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 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.


Back to Top


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"
  }
}

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 }}