Initialize Payment for Checkout (Klarna)
POST/api/checkout/:id/init-payment-klarna
Initialize payment using Klarna for a specific checkout.
Request
Path Parameters
id stringrequired
The ID of the checkout for which payment is being initialized
Query Parameters
country_code stringrequired
The country code
email stringrequired
The client email
href stringrequired
The URL of the ecommerce after payment
Responses
- 200
Successful initialization of payment using Klarna
- application/json
- Schema
- Example (from schema)
- Example
Schema
any
{
"order_id": "f8a513f6-eb9d-4655-94b0-45a00882a0a8",
"status": "checkout_incomplete",
"purchase_country": "no",
"purchase_currency": "EUR",
"locale": "nb-NO",
"billing_address": {
"given_name": "First",
"family_name": "Last",
"email": "test@test.no",
"street_address": "test 1234",
"postal_code": "0000",
"city": "Oslo",
"phone": "+47 40 12 34 56",
"country": "no"
},
"customer": {},
"shipping_address": {
"given_name": "First",
"family_name": "Last",
"email": "test@test.no",
"street_address": "test 1234",
"postal_code": "0000",
"city": "Oslo",
"phone": "+47 40 12 34 56",
"country": "no"
},
"order_amount": 100000,
"order_tax_amount": 0,
"order_lines": [
{
"type": "physical",
"name": "p1",
"quantity": 1,
"unit_price": 100000,
"tax_rate": 0,
"total_amount": 100000,
"total_discount_amount": 0,
"total_tax_amount": 0,
"merchant_data": "{\"productId\":65416}"
}
],
"merchant_urls": {
"terms": "https://outshifter.com/terms",
"checkout": "https://test.reachu.io/success?order_id={checkout.order.id}",
"confirmation": "https://test.reachu.io/success?order_id={checkout.order.id}&payment_processor=KLARNA",
"push": "https://api-qa.reachu.io/klarna/webhooks?order_id={checkout.order.id}"
},
"html_snippet": "htlm provided by klarna",
"started_at": "2024-01-03T17:07:09Z",
"last_modified_at": "2024-01-03T17:07:09Z",
"options": {
"allow_separate_shipping_address": true,
"date_of_birth_mandatory": false,
"require_validate_callback_success": false,
"phone_mandatory": true,
"auto_capture": true
},
"external_payment_methods": [],
"external_checkouts": [],
"shipping_options": [
{
"id": "47fcc60c-34e5-4882-9293-012a5d22b068",
"name": "Shopping 1",
"price": 1000,
"tax_amount": 0,
"tax_rate": 0,
"preselected": true,
"delivery_details": {}
}
],
"merchant_data": "{\"sellerId\":\"1116\",\"flatRates\":[{\"service_name\":\"47fcc60c-34e5-4882-9293-012a5d22b068\",\"service_code\":\"\",\"total_price\":\"10.00\"}]}",
"selected_shipping_option": {
"id": "47fcc60c-34e5-4882-9293-012a5d22b068",
"name": "Shopping 1",
"price": 1000,
"tax_amount": 0,
"tax_rate": 0,
"preselected": true,
"delivery_details": {}
}
}
{
"order_id": "f8a513f6-eb9d-4655-94b0-45a00882a0a8",
"status": "checkout_incomplete",
"purchase_country": "no",
"purchase_currency": "EUR",
"locale": "nb-NO",
"billing_address": {
"given_name": "First",
"family_name": "Last",
"email": "test@test.no",
"street_address": "test 1234",
"postal_code": "0000",
"city": "Oslo",
"phone": "+47 40 12 34 56",
"country": "no"
},
"customer": {},
"shipping_address": {
"given_name": "First",
"family_name": "Last",
"email": "test@test.no",
"street_address": "test 1234",
"postal_code": "0000",
"city": "Oslo",
"phone": "+47 40 12 34 56",
"country": "no"
},
"order_amount": 100000,
"order_tax_amount": 0,
"order_lines": [
{
"type": "physical",
"name": "p1",
"quantity": 1,
"unit_price": 100000,
"tax_rate": 0,
"total_amount": 100000,
"total_discount_amount": 0,
"total_tax_amount": 0,
"merchant_data": "{\"productId\":65416}"
}
],
"merchant_urls": {
"terms": "https://outshifter.com/terms",
"checkout": "https://test.reachu.io/success?order_id={checkout.order.id}",
"confirmation": "https://test.reachu.io/success?order_id={checkout.order.id}&payment_processor=KLARNA",
"push": "https://api-qa.reachu.io/klarna/webhooks?order_id={checkout.order.id}"
},
"html_snippet": "htlm provided by klarna",
"started_at": "2024-01-03T17:07:09Z",
"last_modified_at": "2024-01-03T17:07:09Z",
"options": {
"allow_separate_shipping_address": true,
"date_of_birth_mandatory": false,
"require_validate_callback_success": false,
"phone_mandatory": true,
"auto_capture": true
},
"external_payment_methods": [],
"external_checkouts": [],
"shipping_options": [
{
"id": "47fcc60c-34e5-4882-9293-012a5d22b068",
"name": "Shopping 1",
"price": 1000,
"tax_amount": 0,
"tax_rate": 0,
"preselected": true,
"delivery_details": {}
}
],
"merchant_data": "{\"sellerId\":\"1116\",\"flatRates\":[{\"service_name\":\"47fcc60c-34e5-4882-9293-012a5d22b068\",\"service_code\":\"\",\"total_price\":\"10.00\"}]}",
"selected_shipping_option": {
"id": "47fcc60c-34e5-4882-9293-012a5d22b068",
"name": "Shopping 1",
"price": 1000,
"tax_amount": 0,
"tax_rate": 0,
"preselected": true,
"delivery_details": {}
}
}
Loading...