How to Test Klarna Payments
This guide shows how to create a crypto payment request that launches Bead’s hosted checkout page, select Klarna within the UI, complete the sandbox checkout with Klarna’s test account, and verify the result.
1 – Prerequisites
Klarna enabled for sandbox merchant
Contact developer support if Klarna is not yet activated.
Sandbox base URL
https://api.test.devs.beadpay.io
Webhook endpoint
Publicly reachable and registered in the Bead dashboard.
2 – Create Payment Request
Send a POST /payments/crypto
to load the hosted payment page.
POST /payments/crypto
Host: api.test.devs.beadpay.io
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json
{
"terminalId": "TERM-123",
"merchantId": "MERCH-456",
"requestedAmount": 35.00,
"reference": "ORDER-0001",
"redirectUrl": "https://merchant.example.com/return"
}
Example response
{
"trackingId": "c10b29e3c...",
"paymentUrls": [
{
"type": "web",
"url": "https://checkout.test.beadpay.io/hosted-page/..."
}
]
}
Use paymentUrls[0].url
to launch the hosted checkout.
3 – Launch Hosted Payment Page
Redirect
Redirect the shopper’s browser to the hosted-page URL.
Embed
Load the URL in an iframe inside your site.
The shopper now sees Bead’s hosted payment page UI.
4 – Select Klarna & Obtain QR Code
In the Bead UI the shopper selects “Klarna” as the payment method.
Bead displays a Klarna QR code linked to Klarna’s sandbox checkout.
Scan the QR code with a phone camera (opens Klarna in the default browser).
Click / tap the QR code (copies the Klarna checkout URL for pasting into any browser).
5 – Complete Klarna Sandbox Checkout
Phone number
716-220-4669
PIN (if prompted)
123456
Follow Klarna’s prompts until the shopper is returned to your redirectUrl
.
6 – Verify Result
Webhook – A POST arrives at your webhook endpoint with
"paymentStatus": "completed"
.API check (optional) –
GET /payments/{trackingId}
Response should show
"status": "completed"
and a non-zerosettlementAmount
.
7 – Next Steps
Test higher amounts, cancellations, and expiry scenarios.
Move to production by switching to
https://api.devs.beadpay.io
and using live Klarna credentials.
Last updated