- METHOD TYPEReal-Time Bank Transfer
- PAYMENTS
- PAYOUTS
- REFUNDS
- RECURRING
Introduction
Sofort is now part of Klarna, streamlining payments for a superior and more efficient checkout experience. For more information, see the Klarna Pay Now APM guide.
Supported Countries
- Austria
- Belgium
- France
- Germany
- Italy
- Netherlands
- Slovakia
- Spain
- Switzerland
Supported Currencies
- CHF
- EUR
Payment (Deposit) Flow
Follow these steps to perform a payment using Nuvei REST API integration:
1. Generate a sessionToken
Press here for details.
2. Send a /payment
Request
Perform the payment by sending a /payment
request with its mandatory parameters including:
userTokenId
amount
currency
paymentOption.alternativePaymentMethod
class containing:paymentMethod
: “apmgw_Sofort“
deviceDetails
class containing:ipAddress
billingAddress
class containing:firstName
,lastName
,country
,email
userDetails
class containing:firstName
,lastName
,country
,email
Example /payment
Request
{ "sessionToken":"<sessionToken from /getSessionToken>", "merchantId":"<your merchantId>", "merchantSiteId":"<your merchantSiteId>", "clientRequestId":"<unique request ID in merchant system>", "amount":"200", "currency":"EUR", "userTokenId":"<unique customer identifier in merchant system>", "clientUniqueId":"<unique transaction ID in merchant system>", "paymentOption":{ "alternativePaymentMethod":{ "paymentMethod":"apmgw_Sofort" } }, "deviceDetails":{ "ipAddress":"<customer's IP address>" }, "billingAddress": { "firstName": "John", "lastName": "Smith", "country": "DE", "email": "[email protected]" }, "userDetails":{ "firstName": "John", "lastName": "Smith", "country": "DE", "email": "[email protected]" }, "timeStamp":"<YYYYMMDDHHmmss>", "checksum":"<calculated checksum>" }
The response generates and returns a redirect URL (redirectUrl
) to redirect the customer to the payment page, as well as a UPO (userPaymentOptionId
) for use in future transactions.
Example /payment
Response
{ "orderId":"341413598", "userTokenId":"Usertoken01", "paymentOption":{ "redirectUrl":"https://apitest.nuvei.com/Home?PaymentToken=F355F191C8B97D1D3B8453B283258C66.13560826", "userPaymentOptionId":"83246818", }, "transactionStatus":"REDIRECT", "sessionToken":"f43d774a-a180-4935-bbc1-1315bb4dc203", "internalRequestId":549917488, "status":"SUCCESS", "errCode":0, "reason":"", "merchantId":"2439523627382132721", "merchantSiteId":"224428", "version":"1.0", "clientRequestId":"20221104131500" }
After the transaction is processed, Nuvei sends a Direct Merchant Notification (DMN) that includes the result of the transaction to the URL provided in urlDetails.notificationUrl
, which Nuvei recommends including in the /payment
request.
Payout (Withdrawal) Flow
You have two options to perform a payout:
- Use the
apmgw_Sofort
UPO for processing the payouts as described below. - Collect account details from the deposit and use them via another payment method such as SEPA Payouts; for example, take the IBAN from the DMN and create a SEPA Payouts
/payout
request.
Send a /payout
request and include the userPaymentOptionId
, which contains the user’s previously stored APM account details. Press here for an example.
After the transaction is processed, Nuvei sends a DMN that includes the result of the transaction to urlDetails.notificationUrl
, which Nuvei recommends including in the /payout
request.
User Experience
- The user is redirected to the Klarna website.
- The user enters the name of the bank, BLZ, IBAN, or BIC, and selects the bank.
- The user enters a username and password.
- The user selects a bank account.
- The user confirms the order using a TAN (or similar authentication).
- A confirmation message appears.
Testing
Bank code: 88888888
Account number: 1234
PIN: 1234
TAN: 12345