Klarna - S2S Integration
Secure Server-to-Server (S2S) integration that enables seamless and reliable processing and a smooth payment experience for your customers.Feature Request
Prerequisites
1
[Sign up](https://dashboard.razorpay.com/#/access/signup) for a Raz...
Sign up for a Razorpay account.
2
Generate API Keys.
Generate API Keys.
3
Follow the [Razorpay S2S Integration documentation](/payments/payme...
Follow the Razorpay S2S Integration documentation.
Integrate Klarna on S2S
Create an Order and a Payment. And passmethod and provider parameters in the create an order and a payment API.
Create an Order and a Payment
Create an order along with a payment using the consolidated order and payment API. This single API call combines order and payment creation, resulting in a more efficient and faster transaction process. Create an order along with a payment by:- Authenticating using the provided credentials, ensuring access to the consolidated payment API.
- Manually integrating the API sample codes on your server.
paylater as the payment method:
/orders
Request
Request Parameters
amount mandatory
: integer Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is 299, then pass 29900 in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295.
Response Parameters
amount
: integer The transaction amount, expressed in the currency subunit. For example, for an actual amount of 299.35, the value of this field should be 29935.
amount_due
: integer The amount pending against the order.
amount_paid
: integer The amount paid against the order.
attempts
: integer The number of payment attempts, successful and failed, that have been made against this order.
created_at
: integer The UNIX timestamp at which the order is created.
currency
: string The currency in which the transaction should be made. View the list of supported currencies. Length must be of 3 characters.
entity
: string Name of the entity. Here, it is order.
id
: string The unique identifier of the order.
notes
: json object Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.
offer_id
: string The unique identifier of the offer.
next
: array A list of action objects available to continue the payment process. Present when the payment requires further processing.
action
: string indicates the next step to continue the payment process. Possible values:
otp_generate: Use this URL to allow the customer to generate OTP and complete the payment on your webpage.redirect: Use this URL to redirect the customer to submit the OTP on the provider page.
url
: string URL to be used for the action indicated.
razorpay_payment_id
: string Unique identifier of the payment. Present for all responses.
receipt
: string Your receipt id for this order should be passed here. Maximum length is 40 characters.
status
: string The status of the order. Possible values:
created: When you create an order, it is in thecreatedstate. It stays in this state till a payment is attempted on it.attempted: An order moves fromcreatedtoattemptedstate when a payment is first attempted on it. It remains in theattemptedstate till one payment associated with that order is captured.paid: After the successful capture of the payment, the order moves to thepaidstate. No further payment requests are permitted once the order moves to thepaidstate. The order stays in thepaidstate even if the payment associated with the order is refunded.