Menu

Sofort and Pay now

Note: To learn about the features of Sofort/Pay now, there's an overviewhere

How to integrate Sofort/Pay now payments:

Direct payment request

  • For Sofort/Pay now payments the <shopperEmailAddress> is mandatory
  • We also recommend that you include the <statementNarrative>, explainedbelow

Here's an example payment request in Germany:

Copied!
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE paymentService PUBLIC "-//WorldPay//DTD WorldPay PaymentService v1//EN" "http://dtd.worldpay.com/paymentService_v1.dtd">
<paymentService merchantCode="YOUR_MERCHANT_CODE" version="1.4">
  <submit>
    <order orderCode="YOUR_ORDER_CODE"> <!--Use a unique order code each time-->
      <description>Description here</description>
      <amount currencyCode="EUR" value="100" exponent="2" />
      <orderContent>
        <![CDATA[ ]]>
      </orderContent>
      <paymentDetails>
        <SOFORT-SSL shopperCountryCode="DE">
          <successURL>http://www.worldpay.com/?successURL</successURL>
          <cancelURL>http://www.worldpay.com/?cancelURL</cancelURL>
          <pendingURL>http://www.worldpay.com/?pendingURL</pendingURL>
        </SOFORT-SSL>
      </paymentDetails>
      <shopper>
        <shopperEmailAddress>shopper@worldpay.com</shopperEmailAddress><!--Mandatory-->
      </shopper>
      <statementNarrative>SN12345</statementNarrative>
    </order>
  </submit>
</paymentService>

Hosted payment request

This example is for a payment request in Germany.

In the Hosted model we recommend that you supply the <shopperEmailAddress> and the statementNarrative, explainedbelow.

The merchant can redirect the shopper directly to the Sofort or Pay now payment pages by appending the following string to the end of the redirect URL provided in the XML response from Worldpay: &country=DE&preferredPaymentMethod=SOFORT-SSL

Copied!
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE paymentService PUBLIC "-//WorldPay//DTD WorldPay PaymentService v1//EN" "http://dtd.worldpay.com/paymentService_v1.dtd">
<paymentService version="1.4" merchantCode="YOUR_MERCHANT_CODE">
  <submit>
    <order orderCode="YOUR_ORDER_CODE" installationId="1234567"><!--Use a unique order code each time. Contact Worldpay if you haven't got an installationID-->
      <description>Test order</description>
      <amount value="100" currencyCode="EUR" exponent="2" />
      <orderContent>
        <![CDATA[ ]]>
      </orderContent>
      <paymentMethodMask>
        <include code="ALL" />
      </paymentMethodMask>
      <shopper>
        <shopperEmailAddress>shopper@worldpay.com</shopperEmailAddress><!--Recommended-->
      </shopper>
      <statementNarrative>SN12345</statementNarrative>
    </order>
  </submit>
</paymentService>

Statement Narrative

The statement narrative is a string that is:

  • Shown to the shopper as a dynamic descriptor on the Sofort or Pay now payment pages. See the Dynamic Descriptor picture below.
  • Shown on the shopper's bank account statement as a statement narrative. See the Statement Narrative picture below.

Best Practice: We recommend that you populate the statement narrative for Sofort because it:

  • Increases shopper confidence as it provides continuity throughout the shopper journey. Shoppers see the merchant's narrative on both the merchant site and on the Sofort/Pay now payment pages.
  • Provides additional information to the shopper on their Sofort/Pay now statement. This reduces the possibility of the shopper not recognising the transaction, making it less likely that they will query the payment at a later stage.

Narrative validation

statementNarrative can be up to seven characters long. These are the valid characters to include in the statement narrative:

  • Uppercase and lowercase letters a to z and A to Z
  • Numbers 0 to 9
  • Space
  • Full-stop/period
  • Hyphen

An example below of how the statementNarrative appears to the shopper on the Sofort or Pay now payment page, and on the shopper’s bank account statement:

Dynamic Descriptor

Sofort/Pay now Dynamic Descriptor

Statement Narrative - Shopper's Statement

Sofort/Pay now Statement Narrative - Shopper's Statement

Payment outcomes

Successful payment

Shopper pays
Event 1:The shopper successfully completes a payment for EUR 1.00 on the Sofort or Pay now. payment pages and Worldpay receives the asynchronous authorisation from Sofort or Pay now. within 5 seconds.
Behaviour:successURL is returned.
URL:successURL
URL Example:http://www.worldpay.com/?success&orderKey=ADMINCODE^MERCHANTCODE^Example_SOFORT_Banking_Order_Code&paymentStatus=AUTHORISED&paymentAmount=100&paymentCurrency=CNY&mac=eb20d74979804ebd8921c3b22a363309
Payment Status:The payment status changes to AUTHORISED.
Copied!
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE paymentService PUBLIC "-//WorldPay//DTD WorldPay PaymentService v1//EN "http://dtd.worldpay.com/paymentService_v1.dtd">
PUBLIC "-//WorldPay//DTD WorldPay PaymentService v1//EN" "http://dtd.worldpay.com/paymentService_v1.dtd">
<paymentService merchantCode="MERCHANT_CODE" version="1.4"> <!--Will contain the merchant code used in the request-->
  <notify>
    <orderStatusEvent orderCode="ORDER_CODE"> <!--Will contain the order code used in the request-->
      <payment>
        <paymentMethod>
          SOFORT-SSL
        </paymentMethod>
        <amount currencyCode="EUR" debitCreditIndicator="credit" exponent="2" value="100"/>
        <lastEvent>
          AUTHORISED
        </lastEvent>
        <balance accountType="IN_PROCESS_AUTHORISED">
          <amount currencyCode="EUR" debitCreditIndicator="credit" exponent="2" value="100"/>
        </balance>
        <riskScore value="1"/>
      </payment>
      <journal journalType="AUTHORISED">
        <bookingDate>
          <date dayOfMonth="27" month="08" year="2013"/>
        </bookingDate>
        <accountTx accountType="IN_PROCESS_AUTHORISED" batchId="23">
          <amount currencyCode="EUR" debitCreditIndicator="credit" exponent="2" value="100"/>
        </accountTx>
      </journal>
    </orderStatusEvent>
  </notify>
</paymentService>
Payment captured
Event 2:The payment is captured in WPG.
Behaviour:The automatic capture process runs in WPG to automatically capture the payment.
URL:No URL is returned to the shopper as the shopper journey is already complete.
URL Example:N/A
Payment Status:The payment status changes to CAPTURED.
Copied!
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE paymentService PUBLIC "-//WorldPay//DTD WorldPay PaymentService v1//EN" "http://dtd.worldpay.com/paymentService_v1.dtd">
<paymentService merchantCode="MERCHANT_CODE" version="1.4"> <!--Will contain the merchant code used in the request-->
  <notify>
    <orderStatusEvent orderCode="ORDER_CODE"> <!--Will contain the order code used in the request-->
      <payment>
        <paymentMethod>
          SOFORT-SSL
        </paymentMethod>
        <amount currencyCode="EUR" debitCreditIndicator="credit" exponent="2" value="100"/>
        <lastEvent>
          CAPTURED
        </lastEvent>
        <balance accountType="IN_PROCESS_CAPTURED">
          <amount currencyCode="EUR" debitCreditIndicator="credit" exponent="2" value="100"/>
        </balance>
        <riskScore value="1"/>
      </payment>
      <journal journalType="CAPTURED">
        <bookingDate>
          <date dayOfMonth="27" month="08" year="2013"/>
        </bookingDate>
        <accountTx accountType="IN_PROCESS_AUTHORISED" batchId="53">
          <amount currencyCode="EUR" debitCreditIndicator="debit" exponent="2" value="100"/>
        </accountTx>
        <accountTx accountType="IN_PROCESS_CAPTURED" batchId="66">
          <amount currencyCode="EUR" debitCreditIndicator="credit" exponent="2" value="100"/>
        </accountTx>
     </journal>
    </orderStatusEvent>
  </notify>
</paymentService>
Payment settled
Event 3:The payment is settled internally in WPG.
Behaviour:The payment is successfully settled internally in WPG. The settlement currency for the example Merchant Code below is GBP.
URL:No URL is returned to the shopper as the shopper journey is already complete.
URL Example:N/A
Payment Status:The payment status changes to SETTLED.
Copied!
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE paymentService PUBLIC "-//WorldPay//DTD WorldPay PaymentService v1//EN" "http://dtd.worldpay.com/paymentService_v1.dtd">
<paymentService merchantCode="MERCHANT_CODE" version="1.4"> <!--Will contain the merchant code used in the request-->
  <notify>
    <orderStatusEvent orderCode="ORDER_CODE"> <!--Will contain the order code used in the request-->
      <payment>
        <paymentMethod>
          SOFORT-SSL
        </paymentMethod>
        <amount currencyCode="EUR" debitCreditIndicator="credit" exponent="2" value="100"/>
        <lastEvent>
          SETTLED
        </lastEvent>
        <balance accountType="SETTLED_BIBIT_COMMISSION">
          <amount currencyCode="GBP" debitCreditIndicator="credit" exponent="2" value="4"/>
        </balance>
        <balance accountType="SETTLED_BIBIT_NET">
          <amount currencyCode="GBP" debitCreditIndicator="credit" exponent="2" value="80"/>
        </balance>
        <balance accountType="IN_PROCESS_CAPTURED">
          <amount currencyCode="EUR" debitCreditIndicator="debit" exponent="2" value="100"/>
        </balance>
        <riskScore value="1"/>
      </payment>
      <journal description="1 EUR = 0.83656 GBP" journalType="SETTLED">
        <bookingDate>
          <date dayOfMonth="03" month="09" year="2013"/>
        </bookingDate>
        <accountTx accountType="IN_PROCESS_CAPTURED" batchId="66">
          <amount currencyCode="EUR" debitCreditIndicator="debit" exponent="2" value="100"/>
        </accountTx>
        <accountTx accountType="SETTLED_BIBIT_COMMISSION">
          <amount currencyCode="GBP" debitCreditIndicator="credit" exponent="2" value="4"/>
        </accountTx>
        <accountTx accountType="SETTLED_BIBIT_NET" batchId="43">
          <amount currencyCode="GBP" debitCreditIndicator="credit" exponent="2" value="80"/>
        </accountTx>
      </journal>
    </orderStatusEvent>
  </notify>
</paymentService>

Invalid data entry

Invalid data
Event:The shopper provides an incorrect sort code/login credentials or TAN on the Sofort or Pay now. payment page
Behaviour:The credentials are validated on the Sofort or Pay now. website. The shopper remains on the Sofort or Pay now. website until the shopper either:
  • Types valid data.
  • Selects ‘Terminate the session’ or selects ‘Cancel and return to merchant’.
  • Closes down their web browser session.
URL:pendingURL
URL Example:http://www.worldpay.com/?pending&orderKey=ADMINCODE^MERCHANTCODE^Example_SOFORT_Banking_Order_Code&status=ERROR
No URL is returned if the shopper closes down their web browser session.
If the TAN is entered incorrectly, the shopper’s bank may lock the shopper’s account after the 3rd failed attempt.
Payment Status:The payment status remains at SHOPPER_REDIRECTED
Notification Example:No notification is generated

Payment time out

Time out
Event:The shoppers order has timed-out before the payment is submitted
Behaviour:A time-out error message is displayed on the Sofort or Pay now. website.
The shopper remains on the Sofort or Pay now. website until the shopper either:
  • Selects ‘Cancel and return to merchant’.
  • Closes down their web browser session.
URL:pendingURL
URL Example:http://www.worldpay.com/?pending&orderKey=ADMINCODE^MERCHANTCODE^Example_SOFORT_Banking_Order_Code&status=ERROR
No URL is returned if the shopper closes down their web browser session.
Payment Status:The payment status remains at SHOPPER_REDIRECTED
Notification Example:No notification is generated

Exception conditions

Authorisation + 5 seconds
Event 1:Worldpay receives the asynchronous authorisation from Sofort or Pay now. more than 5 seconds after the shopper has completed their journey.
Behaviour:pendingURL with status=OPEN is returned.
URL:pendingURL
URL Example:http://www.worldpay.com/?pending&orderKey=ADMINCODE^MERCHANTCODE^Example_SOFORT_Banking_Order_Code&status=OPEN
Payment Status:The payment status changes to AUTHORISED.
Copied!
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE paymentService PUBLIC "-//WorldPay//DTD WorldPay PaymentService v1//EN" "http://dtd.worldpay.com/paymentService_v1.dtd">
<paymentService merchantCode="MERCHANT_CODE" version="1.4"> <!--Will contain the merchant code used in the request-->
  <notify>
    <orderStatusEvent orderCode="ORDER_CODE"> <!--Will contain the order code used in the request-->
      <payment>
        <paymentMethod>
          SOFORT-SSL
        </paymentMethod>
        <amount currencyCode="EUR" debitCreditIndicator="credit" exponent="2" value="100"/>
        <lastEvent>
          AUTHORISED
        </lastEvent>
        <balance accountType="IN_PROCESS_AUTHORISED">
          <amount currencyCode="EUR" debitCreditIndicator="credit" exponent="2" value="100"/>
        </balance>
        <riskScore value="1"/>
      </payment>
      <journal journalType="AUTHORISED">
        <bookingDate>
          <date dayOfMonth="27" month="08" year="2013"/>
        </bookingDate>
        <accountTx accountType="IN_PROCESS_AUTHORISED" batchId="23">
          <amount currencyCode="EUR" debitCreditIndicator="credit" exponent="2" value="100"/>
        </accountTx>
      </journal>
    </orderStatusEvent>
  </notify>
</paymentService>
Error
Event 2:The payment cannot be processed due to technical issues at Sofort or Pay now.
Behaviour:pendingURL with status=ERROR is returned
URL:pendingURL
URL Example:http://www.worldpay.com/?pending&orderKey=ADMINCODE^MERCHANTCODE^Example_SOFORT_Banking_Order_Code&status=ERROR
Payment Status:The payment status remains at SHOPPER_REDIRECTED
Notification Example:No notification is generated
Invalid amount
Event 3:The Merchant submits a Direct order request that is above the maximum or below the minimum transaction amount for the Sofort or Pay now. payment method.
Behaviour:The Merchant’s system receives a synchronous error code 7 response. A response message of ‘Payment Method SOFORT-SSL is unknown; The Payment Method is not available.’ is returned.
URL:N/A
URL Example:N/A
Payment Status:An order with no payment status is created.
Copied!
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE paymentService PUBLIC "-//WorldPay//DTD WorldPay PaymentService v1//EN" "http://dtd.worldpay.com/paymentService_v1.dtd">
<paymentService merchantCode="MERCHANT CODE" version="1.4"> <!--Will contain the merchant code used in the request-->
  <reply>
    <orderStatus orderCode="ORDER_CODE"> <!--Will contain the order code used in the request-->
      <error code="7">
        <![CDATA[Payment Method SOFORT-SSL is unknown; The Payment Method is not available.]]>
      </error>
    </orderStatus>
  </reply>
</paymentService>
Invalid amount
Event 4:The Merchant submits an XML re-direct order request that is above the maximum or below the minimum transaction amount, for the Sofort or Pay now. payment method.
Behaviour:The Sofort or Pay now. payment method will not be available for the shopper to choose.
URL:N/A
URL Example:N/A
Payment Status:The order has no payment status
Notification Example:No notification is generated as the shopper is not able to choose the Sofort or Pay now. payment method.

Refunds

Refund request
Event 1:The merchant requests a refund of 1.00 EUR from the Merchant Interface (MAI).
Behaviour:The merchant requests a refund of the settled payment on the MI. The Merchants settlement currency in the example below is GBP.
URL:N/A
URL Example:N/A
Payment Status:The payment status changes to SENT_FOR_REFUND.
Copied!
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE paymentService PUBLIC "-//WorldPay//DTD WorldPay PaymentService v1//EN" "http://dtd.worldpay.com/paymentService_v1.dtd">
<paymentService merchantCode="MERCHANT_CODE" version="1.4"> <!--Will contain the merchant code used in the request-->
  <notify>
    <orderStatusEvent orderCode="ORDER_CODE"> <!--Will contain the order code used in the request-->
      <payment>
        <paymentMethod>
          SOFORT-SSL
        </paymentMethod>
        <amount currencyCode="EUR" debitCreditIndicator="credit" exponent="2" value="100"/>
        <lastEvent>
          SENT_FOR_REFUND
        </lastEvent>
        <riskScore value="1"/>
      </payment>
      <journal journalType="SENT_FOR_REFUND">
        <bookingDate>
          <date dayOfMonth="27" month="08" year="2013"/>
        </bookingDate>
        <accountTx accountType="IN_PROCESS_CAPTURED" batchId="66">
          <amount currencyCode="EUR" debitCreditIndicator="debit" exponent="2" value="100"/>
        </accountTx>
      </journal>
    </orderStatusEvent>
  </notify>
</paymentService>
Refund sent
Event 2:The refund request is successfully sent to Sofort or Pay now.
Behaviour:The Worldpay Payment Service successfully submits the refund request to Sofort or Pay now. The Merchants settlement currency in the below example is GBP. The Worldpay settlement currency in the below example is EUR.
URL:N/A
URL Example:N/A
Payment Status:The payment status changes to REFUNDED.
Copied!
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE paymentService PUBLIC "-//WorldPay//DTD WorldPay PaymentService v1//EN" "http://dtd.worldpay.com/paymentService_v1.dtd">
<paymentService merchantCode="MERCHANT_CODE" version="1.4"> <!--Will contain the merchant code used in the request-->
 <notify>
    <orderStatusEvent orderCode="ORDER_CODE"> <!--Will contain the order code used in the request-->
      <payment>
        <paymentMethod>
          SOFORT-SSL
        </paymentMethod>
        <amount currencyCode="EUR" debitCreditIndicator="credit" exponent="2" value="100"/>
        <lastEvent>
          REFUNDED
        </lastEvent>
        <balance accountType="SETTLED_BIBIT_COMMISSION">
          <amount currencyCode="GBP" debitCreditIndicator="credit" exponent="2" value="4"/>
        </balance>
        <balance accountType="SETTLED_BIBIT_NET">
          <amount currencyCode="GBP" debitCreditIndicator="debit" exponent="2" value="3"/>
        </balance>
        <riskScore value="1"/>
      </payment>
      <journal description="1 EUR = 0.83449 GBP" journalType="REFUNDED">
        <bookingDate>
          <date dayOfMonth="04" month="09" year="2013"/>
        </bookingDate>
        <accountTx accountType="IN_PROCESS_CAPTURED" batchId="66">
          <amount currencyCode="EUR" debitCreditIndicator="credit" exponent="2" value="100"/>
        </accountTx>
        <accountTx accountType="SETTLED_BIBIT_NET" batchId="43">
          <amount currencyCode="GBP" debitCreditIndicator="debit" exponent="2" value="83"/>
        </accountTx>
      </journal>
    </orderStatusEvent>
  </notify>
</paymentService>
Refund fails
Event 3:The refund fails.
Behaviour:The Worldpay Payment Service receives confirmation that the payment has not been successfully sent to the shopper’s bank account.
In the below example, the authorised amount is 1.00 EUR and the refund amount that has failed is 1.00 EUR. The Merchants settlement currency is GBP.
URL:N/A
URL Example:N/A
Payment Status:The payment status changes to REFUND_FAILED.
Copied!
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE paymentService PUBLIC "-//WorldPay//DTD WorldPay PaymentService v1//EN" "http://dtd.worldpay.com/paymentService_v1.dtd">
<paymentService merchantCode="MERCHANT_CODE" version="1.4"> <!--Will contain the merchant code used in the request-->
  <notify>
    <orderStatusEvent orderCode="ORDER_CODE"> <!--Will contain the order code used in the request-->
      <payment>
        <paymentMethod>
          SOFORT-SSL
        </paymentMethod>
        <amount currencyCode="EUR" debitCreditIndicator="credit" exponent="2" value="100"/>
        <lastEvent>
          REFUND_FAILED
        </lastEvent>
        <balance accountType="SETTLED_BIBIT_COMMISSION">
          <amount currencyCode="GBP" debitCreditIndicator="credit" exponent="2" value="4"/>
        </balance>
        <balance accountType="SETTLED_BIBIT_NET">
          <amount currencyCode="GBP" debitCreditIndicator="credit" exponent="2" value="80"/>
        </balance>
        <riskScore value="1"/>
      </payment>
      <journal description="Inverse booking. 1 EUR = 0.83449 GBP" journalType="REFUND_FAILED">
        <bookingDate>
          <date dayOfMonth="15" month="11" year="2013"/>
        </bookingDate>
        <accountTx accountType="SETTLED_BIBIT_NET" batchId="64">
          <amount currencyCode="GBP" debitCreditIndicator="credit" exponent="2" value="83"/>
        </accountTx>
      </journal>
    </orderStatusEvent>
  </notify>
</paymentService>

Transfer reports

Settled

The following is an example of a settled transaction in an XML transfer report for EUR 1.00 where the merchant's account settles in GBP:

Copied!
<?xml version="1.0" encoding="UTF-8"?>
<orderStatusEvent orderCode="ORDER_CODE"> <!--Will contain the order code used in the request-->
  <payment>
    <paymentMethod>
      SOFORT-SSL
    </paymentMethod>
    <amount currencyCode="EUR" debitCreditIndicator="credit" exponent="2" value="100"/>
    <lastEvent>
      SETTLED
    </lastEvent>
    <balance accountType="SETTLED_BIBIT_NET">
      <amount currencyCode="GBP" debitCreditIndicator="credit" exponent="2" value="80"/>
    </balance>
    <balance accountType="SETTLED_BIBIT_COMMISSION">
      <amount currencyCode="GBP" debitCreditIndicator="credit" exponent="2" value="4"/>
    </balance>
  </payment>
  <journal description="1 EUR = 0.83656 GBP" journalType="SETTLED">
    <bookingDate>
      <date dayOfMonth="3" hour="10" minute="28" month="9" second="29" year="2013"/>
    </bookingDate>
    <accountTx accountType="SETTLED_BIBIT_COMMISSION">
      <amount currencyCode="GBP" debitCreditIndicator="credit" exponent="2" value="4"/>
    </accountTx>
    <accountTx accountType="SETTLED_BIBIT_NET" batchId="43">
      <amount currencyCode="GBP" debitCreditIndicator="credit" exponent="2" value="80"/>
    </accountTx>
    <accountTx accountType="IN_PROCESS_CAPTURED" batchId="66">
      <amount currencyCode="EUR" debitCreditIndicator="debit" exponent="2" value="100"/>
    </accountTx>
  </journal>
</orderStatusEvent>

Refunded

The following is an example of a refunded transaction in an XML transfer report for EUR 1.00 where the merchant's account settles in GBP:

Copied!
<?xml version="1.0" encoding="UTF-8"?>
<orderStatusEvent orderCode="ORDER_CODE"> <!--Will contain the order code used in the request-->
  <payment>
    <paymentMethod>
      SOFORT-SSL
    </paymentMethod>
    <amount currencyCode="EUR" debitCreditIndicator="credit" exponent="2" value="100"/>
    <lastEvent>
      REFUNDED
    </lastEvent>
    <balance accountType="SETTLED_BIBIT_NET">
      <amount currencyCode="GBP" debitCreditIndicator="debit" exponent="2" value="3"/>
    </balance>
    <balance accountType="SETTLED_BIBIT_COMMISSION">
      <amount currencyCode="GBP" debitCreditIndicator="credit" exponent="2" value="4"/>
    </balance>
  </payment>
  <journal description="1 EUR = 0.83449 GBP" journalType="REFUNDED">
    <bookingDate>
      <date dayOfMonth="4" hour="6" minute="41" month="9" second="24" year="2013"/>
    </bookingDate>
    <accountTx accountType="SETTLED_BIBIT_NET" batchId="43">
      <amount currencyCode="GBP" debitCreditIndicator="debit" exponent="2" value="83"/>
    </accountTx>
    <accountTx accountType="IN_PROCESS_CAPTURED" batchId="66">
      <amount currencyCode="EUR" debitCreditIndicator="credit" exponent="2" value="100"/>
    </accountTx>
  </journal>
</orderStatusEvent>