Payment Methods
Request example
Payments expiry time for Klarna is 1 weekday.
{
"id": "7bb6f1f3-d280-4b0c-a74f-90471ea69426", // Auto-generated UUID
"paymentMethod": "klarna",
"returnUrl": "https://example.com", // URL to return after payment completion.
"webhookUrl": "https://example.com", // URL to receive webhook notification.
"shopCountry": "DE", // Mandatory. ISO 3166-1 alpha-2 country code of the shop.
"transaction":{
"reference": "test-1111", // Max 20 characters
"currency": "EUR", // ISO4217 format
"amount": 2000, // The amount is in cents, 2000 = 20 EUR. Has to be sum of amounts * quantity in lines.
"description": "test-1444",
"lines":[
{
"name": "Some Voucher - 20 EUR", // Max 100 characters. Name of product.
"category": "PREPAID-VOUCHER", // Max 100 characters.
"brand": "alphacomm", // Max 100 characters.
"quantity": 1, // Number of items
"amount": 2000 // The amount is in cents, 2000 = 20 EUR
}
]
}
}
Sandbox Testing
Check with Dev team that sandbox is set for account. Request is same as given in example. On klarna payment widget, DemoBank has to be selected as a bank other input data can be random.Trigger Failed tests
If emails are send in specific manner they could tirgger specific errors in sandbox request. Info on emails is given here Klarna Docs - Test EnvironmentAnti-fraud check
Fraud check (Cynic) is supported for this Provider.
Beside configuration set for fraud check. It is optional for payer data to be sent along with request. Shop country is mandatory. Example below.
{
"id": "7bb6f1f3-d280-4b0c-a74f-90471ea69426", // Auto-generated UUID
"paymentMethod": "klarna", // Payment method of use
"returnUrl": "https://example.com", // URL to return after payment completion.
"webhookUrl": "https://example.com", // URL to receive webhook notification.
"shopCountry": "NL", // Mandatory. ISO 3166-1 alpha-2 country code of the shop.
"transaction": {
"reference": "test-1111", // Max 20 characters
"currency": "EUR", // ISO4217
"amount": 2000, // Amount in cents, 2000 = 20 EUR. Has to be sum of amounts * quantity in lines.
"description": "test-1444",
"lines": [
{
"name": "Some Voucher - 20 EUR", // Max 100 characters. Name of product.
"category": "PREPAID-VOUCHER", // Max 100 characters.
"brand": "alphacomm", // Max 100 characters.
"quantity": 1, // Number of items
"amount": 2000 // Amount in cents, 2000 = 20 EUR. Has to be sum of amounts * quantity in lines.
}
]
},
"payer": {
"id": "1337", // Auto-generated UUID
"email": "john@alphacomm.nl", // Max 64 characters.
"deviceId": "a80d683678514df2b3c952f48b095266", // Max 50 characters.
"billing": {
"firstName": "John", // Max 128 characters. Set to DECLINE to trigger rejection.
"lastName": "Doe", // Max 128 characters
"street": "Scheepmakerspassage 183", // Max 128 characters. Billing street with number.
"city": "Rotterdam",
"zip": "3011VH", // Max 50 characters. Customer postal code.
"phone": "+31612345678", // Phone number with Country code.
"email": "john@alphacomm.nl", // Max 64 characters.
"country": "NL" // Country code ISO3166 format
},
"shipping": {
"firstName": "John", // Max 128 characters. Set to DECLINE to trigger rejection.
"lastName": "Doe", // Max 128 characters
"street": "Scheepmakerspassage 183", // Max 128 characters. Billing street with number.
"city": "Rotterdam",
"zip": "3011VH", // Max 50 characters. Customer postal code.
"phone": "+31612345678", // Phone number with Country code.
"email": "john@alphacomm.nl", // Max 64 characters.
"country": "NL" // Country code ISO3166 format
},
"ipAddress": "127.0.0.1", // Support only ipv4
"language": "nl", // Language code ISO 639-1 format
"status": "registered", // Can be "guest", "registered", "registered-unconfirmed"
"verificationStatus": "phone", // Can be "identification", "phone", "trusted", "otherwise"
"dateRegistration": "2016-01-01T13:56:48+0100", // Date format ISO 8601
"dateLastUpdated": "2016-01-01T13:56:48+0100", // Date format ISO 8601
"dateFirstPurchase": "2016-01-01T13:56:48+0100", // Date format ISO 8601
"channel": "web" // Can be "web" or "app"
},
"provider": "klarna"
}
Merchant Configuration
- username - set by Dev team
- password - set by Dev team