HomeGuidesAPI ReferenceChangelogPOS PaymentsOnline Payments
Home
API Reference

Create payment

Create a new Klarna payment transaction. The id field in the response can be used in future calls as transactionId to reference this transaction (for instance in a refund).
This endpoint is used to create a Klarna payment transaction. The webhooks object is optional and can be used to specify webhooks for the transaction.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Create Klarna Transaction

returnUrls
object
required

URLs where the Consumer is redirected to after completing the transaction at its issuing bank or at the chosen payment method.

With this object we can redirect consumer to a dedicated page per payment result status. Either this object or the returnUrl field is mandatory.

string
required
length between 1 and 255

The clients identifier. This value will be sent in the webhook payload alongside the ID you receive as part of the response of a transaction.

integer
required
1 to 99999999

Denomination in the smallest currency subunit, as for example euro cents.

string
length between 3 and 3
Defaults to EUR

ISO 4217 currency code.

string
required
length between 2 and 2

Preferred language for the user interface as ISO 639-1 code. Commonly supported languages are Dutch (nl) and English (en).

webhooks
array of objects

Array of webhooks that enables receiving a web request once a given event occurs. We won't do preventive rate-limiting in order to have the highest throughput possible. However, we will honor 429 (Too-many-requests) responses per callback. We use the Retry-After header to retry after a certain period. If the header was not set we use our default exponential delay implementation.

webhooks
string
required
length ≤ 255

Description of the underlying value or reason of the payment.

date-time
length ≥ 20

ISO 8601 date and time. If a transaction is not finalized before this time the status becomes EXPIRED. If left empty, the value defaults to 48 hours.

items
array of objects
required
length between 1 and 512

Items included in the order. We request both values 'vatAmount' and 'vatRate' to prevent errors.

items*

Item object that can be used to provide details of the items in the order.
This is only used by payment methods that support it, like Klarna and Riverty.

string
required
length between 1 and 50

Merchant Product identification. Each item code must be unique per transaction.

string
length ≤ 100

A human readable description of the item.

integer
required
1 to 99999999

Unit price (including VAT) of the item, specified in the smallest currency subunit, as for example euro cents.

integer
required
1 to 1000000000

The number of items of this type.

integer
required
1 to 99999999

Total VAT amount of the orderline, specified in the smallest currency subunit as for example euro cents.

number
required
0 to 99.9

Percentage of VAT applied.
Only the first decimal value will be taken into account, the rest will be ignored.

string
length ≤ 50

A human readable name of the item.

string
enum

The type of order line item. Used by Klarna to classify the order line.

consumer
object
required
Responses

Language
Credentials
OAuth2
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json