SOFORT

Learn how to process Sofort transactions with BlueSnap's Payment API.

Sofort is a popular online, real-time banking method in Europe. This payment method enables shoppers to complete their purchases in their bank's portal, giving them greater comfort and security in the checkout process. Sofort is supported in these countries.

📘

Coming soon!

Watch for Klarna to replace Sofort.

Enable Sofort Payments

To process Sofort transactions, you must enable the Sofort method on your BlueSnap account:

  1. Log into the Merchant Portal, and go to Checkout Page > Payment Methods.
  2. Select Show in the menu next to Real-Time Bank Transfer.
  3. Select Submit.

Transaction Processing

The following steps describe how BlueSnap processes a Sofort transaction:

  1. Create a page for your shopper to enter their personal information.

  2. Send a Create Sofort Transaction request to BlueSnap from your server. As part of the required parameters, provide a returnUrl where you would like BlueSnap to send your shopper after they complete their purchase.

  3. The API response includes sofortUrl. This is where you need to direct your shopper so they can complete their purchase.

  4. Your shopper selects their bank and country, then enters their bank details and select their account. After they complete their purchase, they get redirected back to your returnUrl. You can parse the query string of your URL to get the transaction results.

📘

Note

The transaction is in pending status until your shopper completes their purchase. At this point, the status changes to approved or failed.

Return URL Query String Parameters

Before redirecting your shopper to your return URL, BlueSnap appends the following query string parameters. You can parse the query string to get the transaction results and determine which page to display to the shopper. For example, if the transaction was successful, you can display a confirmation page.

Parameter NameTypeDescription
STATUSstringThe status of the transaction. Possible values:

- SUCCESS
- PENDING
ORDER-IDintegerBlueSnap identifier for the order.
TRANSACTION-IDstringBlueSnap identifier for the approved transaction. Only returned if STATUS is SUCCESS
MTIstringThe Merchant Transaction ID. Only returned if the value was included in the Create Sofort Transaction request.

Sandbox Testing

You can use the following table to test various scenarios in the sandbox environment. To run a test case, append the firstName column value to the payerInfo.firstName value in the test request. For example, the following value tests the approval scenario:

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 '
{
  ...
  "payerInfo": {
    "firstName": "John_APPROVE",
    ...
  },
  ...
}'
ScenariofirstNameResult
Approval_APPROVESUCCESS transaction status.
Rejection_REJECTFAIL transaction status.
Delayed approval_DELAYAPPENDING transaction status that changes to SUCCESS within 15 minutes.
Delayed rejection_DELAYRJPENDING transaction status that changes to FAIL within 15 minutes.