Skip to main content
Accept Klarna payments with Stripe as the payment service provider (PSP). The customer selects Klarna, confirms the purchase on a Klarna page and returns to your site. You can also save Klarna and charge it later as a merchant-initiated transaction (MIT), without the customer.

Supported workflows

WorkflowSupported
Payrails SDK✔
Payrails API✔
Delayed / Manual Capture✔
Instant Capture✔
Cancel / Void✔
Refund / Reverse✔
Save Instruments✔
Merchant Initiated Transaction (MIT)✔

Before you begin

Complete these steps before you send your first Klarna payment through Stripe:
  1. Set up a Stripe integration in your workspace. Follow the Stripe integration setup guide if you don’t have one yet.
  2. Turn on Klarna in your Stripe Dashboard payment method settings, and check that your Stripe account is eligible for Klarna.
  3. In the Payrails Portal, go to Settings → Integrations, open your Stripe integration, select Klarna under Payment methods, and save.
  4. Add Klarna as a payment option in your workflow.

Request fields for Stripe

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 with klarna as the paymentMethodCode and hpp as the integrationType. The response includes the redirect to Klarna.
Authorize request
After the customer confirms the purchase, Klarna returns them to your success or error URL. Confirm the result through webhook notifications or the execution status before you fulfill the order.

Save Klarna and charge it later

Save Klarna

To save Klarna for later payments, set storeInstrument to true and futureUsage to Subscription or UnscheduledCardOnFile. Set holderReference on the execution. The customer still confirms the payment on a Klarna page.
Authorize request that saves Klarna
Payrails saves the instrument once the customer approves the payment, either when they return through the Klarna redirect or when Stripe sends the payment notification. The authorize notification includes the paymentInstrumentId for later payments. To save Klarna without charging the customer, for example at the start of a free trial, send "value": "0" in both amounts with storeInstrument set to true. The customer approves at Klarna, and the instrument is ready for an MIT straight away.

Charge a saved Klarna instrument

For an MIT, create an execution with the same holderReference, then authorize with the saved paymentInstrumentId and set meta.order.processingType. The payment completes without a redirect.
MIT authorize request
Use Subscription as the processing type for recurring payments on a schedule.

Subscription details

When you send meta.subscription, Payrails passes the subscription to Stripe on the first payment, the zero-amount setup and every MIT. meta.subscription.chargeFrequency maps to the Stripe interval as follows. Payrails rejects any other value. Payrails sends the saved instrument’s ID as the subscription reference, so it stays the same on every payment in the series.
Subscription for a zero-amount setup

How Stripe handles Klarna

  • With delayed capture, Payrails creates the Stripe payment with manual capture, so you capture or cancel it later. With instant capture, Stripe captures the payment when the customer confirms it.
  • When you save Klarna, Payrails stores the Stripe payment method as a PSP token, with the Stripe customer as its holder. Subscription and UnscheduledCardOnFile set Klarna up for off-session use, and CardOnFile sets it up for on-session use.
  • An MIT is an off-session Stripe payment on the saved payment method, confirmed straight away. Send an amount greater than zero.
Last modified on October 30, 2026