Klarna Docs - Automatic Payments with Klarna

Automatic Payments

Klarna can support our partners with subscription, on-demand (wallet payment), or even incidental/add-on use case requirements.  The process to support recurring charges - either scheduled or unscheduled involves the creation of a token that identifies your consumer and their preferred payment method, which you can then use to charge your consumer on their unscheduled or monthly, quarterly, annual, etc. billing cycle. Having access to the token makes it possible for you to create an order on behalf of the consumer and thus does not require the consumer to be present and confirm the order creation when paying with Klarna.

Under the concept of automatic payments we find the following classifications of use cases:

  1. Subscriptions
  2. Unscheduled Charges - On-demand and Incidentals

A subscription is a business model in which a customer must pay a recurring amount at regular intervals (daily, weekly, bi-weekly, monthly, semi-annual, yearly/annual, etc.) for access to a product or service. Renewal of a subscription may be periodic and activated automatically so that the cost of the new period is automatically paid with Klarna.

Under subscriptions there are a few different variants:

  • Subscriptions for a fixed set of goods or services. This can be for periodicals like newspapers or magazines, but also include subscription boxes, like food recipe box delivery services, monthly cosmetics boxes, as well as convenience models where a consumer subscribes to purchase a product at regular intervals (like razor blades, electric toothbrush heads, etc.).
  • Access subscription for unlimited use of a service or collection of services like streaming media services or cloud based software, etc.
  • Membership for basic or minimal service usage, where the consumer accrues extra charges for access to new release movies, channels, storage space, etc. Such subscriptions would potentially have variable charge amounts on the subscription interval - or even on-demand charges arhythmic to the subscription interval.

Unscheduled automatic payments follow no set rhythm as per the agreement between the consumer and the partner.  They generally are tied to the usage of a product or service when the customer so desires.  In addition, they can relate to subsequent charges that directly relate to an existing transaction, but occur post-completion of the initial transaction.

On-demand charges refers to use cases where the consumer is charged for a one-time usage of a product or service in a typical “e-Wallet” scenario.  On-demand charges can be high frequency and low volume or moderate frequency with higher baskets.  Some examples include:

  • Mobility Sector - scooters, car sharing, parking apps, etc.
  • Food Delivery - everything from groceries to restaurant order delivery 
  • Cashierless store solutions, where customers are able to purchase products without being checked out by a cashier or using a self-checkout station.

Incidentals, Damages, and Add-ons relate to charges that are directly related to an already completed purchase of goods or services.  Incidentals include use cases like:

  • Mobility sector where you may have subsequent charges in relation to moving violations or parking fines, or even damages to the partner property.
  • Post-purchase related gratuities

The `intent` field of the Klarna Payments API is designed to let partners inform Klarna of the purpose of the customer’s session.  Is it simply to make a purchase, to sign-up for a subscription or on-demand recurring payment, or do they need to both at the same time.  Using the intent, Klarna is able to show the customer the appropriate terms and conditions and provide them with an optimized UX that leads to better conversion. 

The tokenize intent should be used when you do not intend to charge the consumer or create an order at the time of checkout.  Upon approval, a partner will be able to create a customer token that can then be used to create future charges in relation to a subscription billing cycle or on-demand payments.  Some example use cases include:

  • Adding a preferred payment method to an e-wallet in a partner’s app for on-demand charges
  • Signing up for a subscription service, where there is no initial charge or a free trial, e.g. first month free.
  • Updating a payment method associated with a subscription service.
  • Pre-orders where reservations do not lend themselves to an optimal consumer experience, e.g., sneaker drops, video game or console releases, etc.

Bidding - similar to adding a payment method to a wallet, it is the creation of the token to associate a payment method with the final charge at the completion of the auction.

Note: As Klarna will not inform the customer that a payment will be created right now, it will not be possible to create an order on a KP session when the intent is set to tokenize. To create an order, you will need to use the Customer Tokens API.

Additionally, order lines containing recurring subscription items are required to include the subscription object.  You can read more in our in-depth article on sharing subscription details with Klarna.   The subscription object allows Klarna to make better underwriting decisions,  present more appropriate payment options, and provide additional visual cues to consumers.

Create Session: On-demand use case adding Klarna to a merchant’s wallet:

JSON
OST /payments/v1/sessions 
Authorization: Basic pwhcueUff0MmwLShJiBE9JHA== 
Content-Type: application/json 
{ 
  "intent": "tokenize",
  "purchase_country": "DE", 
  "purchase_currency": "EUR", 
  "locale": "de-DE", 
  "order_amount": 0, 
  "order_tax_amount": 0, 

Create Session: Subscription with free trial use case with the Subscription Object:

JSON
POST /payments/v1/sessions 
Authorization: Basic pwhcueUff0MmwLShJiBE9JHA== 
Content-Type: application/json 
{ 
  "intent": "tokenize",
  "purchase_country": "DE", 
  "purchase_currency": "EUR", 
  "locale": "de-DE", 
  "order_amount": 999, 
  "order_tax_amount": 0, 

The buy_and_tokenize intent is used to cover use cases where the partner wants the consumer to sign-up for automatic payments, but the first charge will be done at the time of checkout  The customer token will then be used for subsequent charges.  This can be for subscription sign-ups or an on demand use case where the consumer is charged on the first purchase.  When using the buy_and_tokenize intent, the order on that customer’s checkout session should be created using the authorization_token returned by Klarna.  If you attempt to create the order using the customer_token you have created in this session, there is a chance that the attempt to create the order will fail.  

  • Subscriptions where the customer is charged immediately upon completion of their registration for their first subscription installment.
  • On-demand (wallet) payments where the token is created on the customer’s first order/purchase, as opposed to when configuring their account

Create Session: Subscription with the customer charged immediately with the Subscription Object:

JSON
POST /payments/v1/sessions 
Authorization: Basic pwhcueUff0MmwLShJiBE9JHA== 
Content-Type: application/json 
{ 
  "intent": "buy_and_tokenize",
  "purchase_country": "DE", 
  "purchase_currency": "EUR", 
  "locale": "de-DE", 
  "order_amount": 999, 
  "order_tax_amount": 0,