Supported workflows
Before you begin
Complete these steps before you send your first Klarna payment through the direct connection:- Set up a Klarna integration in your workspace. Follow the Klarna integration setup guide if you don’t have one yet.
- In the integration’s account details, turn on exactly one region processor, for Europe, North America, or Oceania. Payrails sends every request to that Klarna region.
- In the Payrails Portal, go to Settings → Integrations, open your Klarna integration, select Klarna under Payment methods, and save.
- Add Klarna as a payment option in your workflow.
Request fields for Klarna
Send these fields in the authorize request, in addition to the standard authorize fields. Required fields must be present for the payment to succeed. Payrails sends Optional fields to the PSP when you include them.Authorize a Klarna payment
Call authorize a payment withklarna as the paymentMethodCode and hpp as the integrationType. The response includes the redirect to the Klarna hosted payment page.
Authorize request
success or error URL. Confirm the result through webhook notifications or the execution status before you fulfill the order.
How Klarna handles payments
- The customer chooses how to pay on the Klarna hosted payment page. Payrails learns which Klarna option they picked when they return.
- Your capture mode sets how Klarna places the order. With instant capture, Klarna captures the order when the customer confirms it. With delayed capture, the order stays authorized until you capture or cancel it.
- Capture or refund part of the amount when you need to. Klarna accepts partial captures and partial refunds.
- If the customer doesn’t return from Klarna, Payrails keeps checking the session status with Klarna for up to 47 hours.
- Each Klarna payment is a new customer-initiated payment.