Sofort
Sofort
Sofort is a payment method that arranges transactions between the online shop and the customer’s banking account. After selection, all transfer data will be handed over automatically so the consumer only needs to log into the bank account using the account number, PIN and to authorize the transaction, so the information will be sent to the bank in encrypted form.
Integration, Registration and Setup
To integrate and offer the payment method Sofort to the consumers in the online shop some requirements needed to be fulfilled:
-
Registering and setting up an account for Sofort.
-
Use the specific response parameters as defined below in the payment process of the online shop.
-
Visual presentation of the online shop branding guidlines.
Commands
Pre Transaction Commands
The first step is to generate a unique order number with the command CREATEORDER.
Transaction Commands
INITIATEPAYMENT
Request Parameters
Required Parameters | Optional Parameters |
---|---|
Optional request parameters CUSTOMERSTATEMENT
and ORDERREFERENCE
, are more restricted about their length and allowed characters than usual.
Initialization example
Sofort payment method can be initialized if the merchant sends SOFORTUEBERWEISUNG for parameter INITTYPE.
|
-
Send a request.
Example of Request for InitiationCOMMAND=INITIATEPAYMENT& MERCHANTKEY=43gADp5.UOZxPTet6O8o8K6o-7RefQB3BO21OMu4chB65LJUI_& INITTYPE=SOFORTUEBERWEISUNG& ORDERNUMBER=15924224& LANGUAGE=en& AMOUNT=1& CURRENCY=EUR& APPLICATIONTYPE=S& SERVICEURL=http://yourimprint.com/& CUSTOMERSTATEMENT=eh3462t3hg346& SUCCESSURL=https://yoursuccessurl.com& ORDERDESCRIPTION=Test& FAILUREURL=https://yourfailureurl.com& IP_ADDRESS=77.238.209.2&
-
The response looks like this:
Example of Response for Initiationheader=Content-Type%3A+text%2Fhtml%0D%0A& body=%3Chtml%3E%3Chead%3E%3Cmeta+http-equiv%3D%22refresh%22+content%3D%220%3BURL%3Dhttps%3A%2F%2Fwww.sofort.com%2Fpayment%2Fgo%2Ff9af541b717c84cb0277bc15596f057da7805b47%22%3E%3C%2Fhead%3E%3C%2Fhtml%3E& version=qtillserver+3.23.0.48& status=0
-
Decode the text with URL Decoder. Use Notepad ++ or some other URL Decoder. After decoding the response should look like this.
header=Content-Type: text/html &body=<html><head><meta http-equiv="refresh" content="0;URL=https://www.sofort.com/payment/go/f9af541b717c84cb0277bc15596f057da7805b47"></head></html>&version=qtillserver 3.23.0.48&status=0
-
Beautify code (delete everything above and below html tag, and replace every "+" with empty space).
<html> <head> <meta http-equiv="refresh" content="0;URL=https://www.sofort.com/payment/go/f9af541b717c84cb0277bc15596f057da7805b47"> </head> </html>
-
Execute the HTML, and the Sofort mask should be seen in a browser. Enter specific test data for Sofort payment method. After that, the merchant will be redirected to the
successUrl
(which is invalid in this example).
VERIFYPAYMENT
Response Parameters
Required Parameters | Optional Parameters | ||
---|---|---|---|
|
|||
|
Required Parameters | Optional Parameters | ||
---|---|---|---|
|
|||
|
Verifying payment example
-
Send a request.
Request ParametersMERCHANTKEY=43gADp5.UOZxPTet6O8o8K6o-7RefQB3BO21OMu4chB65LJUI_& COMMAND=VERIFYPAYMENT& APPLICATIONTYPE=S& ORDERNUMBER=15924224& LANGUAGE=en&
-
The response looks like this:
Response Parametersorder.1.amount=1.00& payment.1.1.paymentNumber=15924224& payment.1.1.senderIBAN=DE06000000000023456789& payment.1.1.senderBankNumber=88888888& payment.1.1.timeModified=09.11.2022+08%3A04%3A56& payment.1.1.paymentType=SOFORTBANKING& order.1.merchantNumber=840& payment.1.1.senderAccountOwner=Max+Mustermann& order.1.depositAmount=1.00& payment.1.1.approvalCode=28978-473003-636B4EA5-B0BC& payment.1.1.providerReferenceNumber=28978-473003-636B4EA5-B0BC& payment.1.1.orderNumber=15924224& order.1.approveAmount=0& order.1.credits=0& payment.1.1.merchantNumber=840& order.1.payments=1& version=qtillserver+3.23.0.48& order.1.refundAmount=0& payment.1.1.currency=EUR& order.1.state=ORDERED& orders=1& payment.1.1.batchNumber=300000636& order.1.acquirer=SOFORT& order.1.brand=sofortueberweisung& status=0& payment.1.1.depositAmount=1.00& order.1.orderText=Test& order.1.contractNumber=28978%2F473003& payment.1.1.senderAccountNumber=23456789& payment.1.1.state=payment_deposited& order.1.customerStatement=eh3462t3hg346& order.1.providerContractNumber=72ee7187-cf31-4aae-9773-20d6bec114af& payment.1.1.senderBIC=SFRTDE20XXX& payment.1.1.securityCriteria=1& order.1.timeModified=09.11.2022+08%3A04%3A56& order.1.orderNumber=15924224& payment.1.1.gatewayReferenceNumber=15924224& payment.1.1.approveAmount=1.00& order.1.currency=EUR& payment.1.1.senderBankName=Demo+Bank& order.1.timeCreated=09.11.2022+07%3A54%3A28& order.1.orderDescription=Test& payment.1.1.timeCreated=09.11.2022+08%3A04%3A56& order.1.paymentType=SOFORTBANKING
Post Transaction Commands
GETORDERDETAILS
Response Parameters
Required Parameters | Optional Parameters | ||
---|---|---|---|
|
|||
|
Required Parameters | Optional Parameters | ||
---|---|---|---|
|
|||
|
Getting order details example
-
Send a request.
Request ParametersMERCHANTKEY=43gADp5.UOZxPTet6O8o8K6o-7RefQB3BO21OMu4chB65LJUI_& COMMAND=GETORDERDETAILS& ORDERNUMBER=15924224& ADMIN_PASSWORD=9p3a0m5f& APPLICATIONTYPE=S&
-
The response looks like this:
Response Parametersorder.1.amount=1.00& payment.1.1.paymentNumber=15924224& payment.1.1.senderIBAN=DE06000000000023456789& payment.1.1.timeModified=09.11.2022+08%3A04%3A56& payment.1.1.senderBankNumber=88888888& payment.1.1.paymentType=SOFORTBANKING& order.1.merchantNumber=840& payment.1.1.senderAccountOwner=Max+Mustermann& order.1.depositAmount=1.00& payment.1.1.approvalCode=28978-473003-636B4EA5-B0BC& payment.1.1.providerReferenceNumber=28978-473003-636B4EA5-B0BC& payment.1.1.orderNumber=15924224& order.1.approveAmount=0& order.1.credits=0& payment.1.1.merchantNumber=840& order.1.payments=1& version=qtillserver+3.23.0.48& order.1.state=ORDERED& payment.1.1.currency=EUR& order.1.refundAmount=0& orders=1& order.1.brand=sofortueberweisung& order.1.acquirer=SOFORT& payment.1.1.batchNumber=300000636& status=0& payment.1.1.depositAmount=1.00& order.1.orderText=Test& order.1.contractNumber=28978%2F473003& payment.1.1.senderAccountNumber=23456789& payment.1.1.state=payment_deposited& order.1.customerStatement=eh3462t3hg346& order.1.providerContractNumber=72ee7187-cf31-4aae-9773-20d6bec114af& order.1.orderNumber=15924224& order.1.timeModified=09.11.2022+08%3A04%3A56& payment.1.1.senderBIC=SFRTDE20XXX& payment.1.1.securityCriteria=1& payment.1.1.gatewayReferenceNumber=15924224& objectsTotal=1& payment.1.1.approveAmount=1.00& order.1.currency=EUR& payment.1.1.senderBankName=Demo+Bank& order.1.timeCreated=09.11.2022+07%3A54%3A28& order.1.orderDescription=Test& payment.1.1.timeCreated=09.11.2022+08%3A04%3A56& order.1.paymentType=SOFORTBANKING
DEPOSIT
The transaction is automatically deposited by using the command INITIATEPAYMENT, in this case, the command DEPOSIT isn’t used.
|
RECURPAYMENT
The backend operation RECURPAYMENT is only possible via payment method SEPA Direct Debit, i.e. SEPA Direct Debit should be supported to do recurring payments for Sofort. |
Recurring payment example
-
Send a request.
Request ParametersCOMMAND=RECURPAYMENT& MERCHANTKEY=43gADp5.UOZxPTet6O8o8K6o-7RefQB3BO21OMu4chB65LJUI_& ORDERNUMBER=7995859& CONSUMER_MERCHANT_CRM_ID=13423072& SOURCEORDERNUMBER=15924224& AMOUNT=1& CURRENCY=EUR& ORDERDESCRIPTION=Test:0000& ADMIN_PASSWORD=9p3a0m5f& APPLICATIONTYPE=S&
-
The response looks like this:
Response Parametersversion=qtillserver+3.23.0.48& status=0
Query Commands
For every payment method commands QUERYORDERS, QUERYCREDITS, and QUERYBATCHES are used.
Order Flow Diagram

To interpret this diagram, the successful completion of a NEW PAYMENT is assumed. Starting from this command it’s possible to carry out the commands RECURPAYMENT. SEPA Direct Debit has to be supported for recurring payments for Sofort.
For an explanation of the different status descriptions included in this diagram have a look at payment.<n>.<m>.state and order.<n>.state which are response parameters of command GETORDERDETAILS.
|
For an explanation of the different status descriptions included in this diagram have a look at payment.<n>.<m>.state and order.<n>.state which are response parameters of command GETORDERDETAILS.
|
All possible commands for specific acquirers are found here. |
Defining Display Options
When the consumer selects the payment method Sofort, a pop-up will open by default to enter the relevant consumer’s payment details. Since many consumers have pop-up blockers enabled, to allow consumers to proceed with the checkout even if pop-up blockers are enabled, QENTA offers the option to open Sofort as a page. Contact our integration specialists to enable this feature.