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:
- Log into the Merchant Portal, and go to Checkout Page > Payment Methods.
- Select Show in the menu next to Real-Time Bank Transfer.
- Select Submit.
Transaction Processing
The following steps describe how BlueSnap processes a Sofort transaction:
-
Create a page for your shopper to enter their personal information.
-
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. -
The API response includes
sofortUrl
. This is where you need to direct your shopper so they can complete their purchase. -
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 Name | Type | Description |
---|---|---|
STATUS | string | The status of the transaction. Possible values: - SUCCESS - PENDING |
ORDER-ID | integer | BlueSnap identifier for the order. |
TRANSACTION-ID | string | BlueSnap identifier for the approved transaction. Only returned if STATUS is SUCCESS |
MTI | string | The 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",
...
},
...
}'
Scenario | firstName | Result |
---|---|---|
Approval | _APPROVE | SUCCESS transaction status. |
Rejection | _REJECT | FAIL transaction status. |
Delayed approval | _DELAYAP | PENDING transaction status that changes to SUCCESS within 15 minutes. |
Delayed rejection | _DELAYRJ | PENDING transaction status that changes to FAIL within 15 minutes. |