- METHOD TYPEReal-Time Bank Transfer
- PAYMENTS
- PAYOUTS
- REFUNDS
- RECURRING
Introduction
Klarna is a global leader in flexible payment solutions. Klarna Debit Risk provides high-risk partners a fast, secure bank transfer product with high acceptance rates via Pay Now.
Supported Countries
- Austria
- Germany
- United Kingdom
Supported Currencies
- EUR
- GBP
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 urlDetails.notificationUrl
, which Nuvei recommends including in the /payment
request.
User Experience
- The user is redirected to Klarna, confirms the payment details, and presses Pay with Klarna.
- The user signs in to the online bank.
- The user provides the one-time password (OTP) and confirms the payment.
- If the user entered the correct details, the transaction is completed and the merchant receives a notification with the success status.
The customer is redirected to the merchant’s return URL.
Testing
To test the Klarna Pay Now payment method successfully, use the test data below.
Data | Value |
---|---|
Email for Austria: | Approved: [email protected] Denied: [email protected] |
Email for Germany: | Approved: [email protected] Denied: [email protected] |
Email for United Kingdom: | Approved: [email protected] Denied: [email protected] |
First Name: | Enter any name. Example: Doe |
Last Name: | Enter any name. Example: Test |
Phone Number for Austria: | Approved: +4306762600456 Denied: +4306762600745 |
Phone Number for Germany: | Approved: +49017614284340 Denied: +49017610927312 |
Phone Number for United Kingdom: | Approved: +447755564318 Denied: +447355505530 |
City | Enter any city. Example: London |
Street | Enter any street. Example: Great Russell |
Zip Code | Enter any valid zip code. Example: WC1B 3DG |
Date of Birth | Enter any date. |
Available countries: | AT, DE, GB |