Download OpenAPI specification:Download
Full set of resources to manage the end-to-end lifecycle of a payment.
The Payment Request API allows you to create and manage payment requests for one-off purchases.
Create a server-to-server payment request.
The payment request will have the state SUBMITTED
.
Klarna-Interoperability-Token | string (InteroperabilityToken) <= 8192 characters The interoperability token enables continuity of customer journey across domains and services. If you are an Acquiring Partner, you receive this token from your merchant. Example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaG9wcGluZ19zZXNzaW9uX2lkIjoia3JuOnNob3BwaW5nOmV1MTpzZXNzaW9uOjBlOTIyN2MwLTBjNDAtNDdkZi04YzEwLTQwMTRmYzFiZDJiZCIsInN0YXR1cyI6IlBBWU1FTlRfUFJFUEFSRUQiLCJ2ZXJzaW9uIjoxLCJjcmVhdGVkX2F0IjoiMjAyNC0wMS0wMVQxMjowMDowMFoiLCJ1cGRhdGVkX2F0IjoiMjAyNC0wMS0wMVQxMjowMDowMFoifQ.1y87kuEKnETy_UCHbTMXx1p4mViZE816okcVmfHFZoo |
object Metadata about the integrator and originators of the request, serialized as a valid JSON, to improve troubleshooting. Read more here Example: integration_metadata=[object Object] | |
Partner-Correlation-Id | string <= 255 characters ^[A-Za-z0-9]+$ An optional alpha numerical String that the partner can use to correlate. This value will be returned in the response. |
Payment request created
Bad Request, there was an error in the input of the request. The request can not be retried without modifications.
Unauthorized, the request was not authorized.
Not Found, the requested resource was not found.
Too Many Requests, the request was rate limited.
Internal Server Error, there was an unexpected error in the API.
Service Temporarily Unavailable, the system is temporarily unavailable to process the request.
Minimum payment request for a 10 USD purchase
{- "currency": "USD",
- "amount": 1000,
- "customer_interaction_config": {
- "method": "HANDOVER",
}
}
{- "payment_request_id": "krn:payment:eu1:request:552603c0-fe8b-4ab1-aacb-41d55fafbdb4",
- "currency": "USD",
- "amount": 1000,
- "state": "SUBMITTED",
- "state_context": {
- "customer_interaction": {
- "method": "HANDOVER",
- "payment_request_id": "krn:payment:eu1:request:552603c0-fe8b-4ab1-aacb-41d55fafbdb4",
}
}, - "expires_at": "2024-01-02T13:00:00Z",
- "created_at": "2024-01-01T12:00:00Z",
- "updated_at": "2024-01-01T13:00:00Z",
- "customer_interaction_config": {
- "method": "HANDOVER",
}
}
The payment request has been submitted to Klarna.
{- "metadata": {
- "event_type": "payment.request.state-change.submitted",
- "event_id": "d9f9b1a0-5b1a-4b0e-9b0a-9e9b1a0d5b1a",
- "event_version": "v2",
- "occurred_at": "2024-01-01T12:00:00Z",
- "correlation_id": "2d1557e8-17c3-466c-924a-bbc3e91c2a02",
- "subject_account_id": "krn:partner:global:account:live:HGBY07TR",
- "recipient_account_id": "krn:partner:global:account:live:LWT2XJSE",
- "product_instance_id": "krn:partner:product:payment:ad71bc48-8a07-4919-a2c1-103dba3fc918",
- "webhook_id": "krn:partner:global:notification:webhook:120e5b7e-abcd-4def-8a90-dca726e639b5",
- "live": true
}, - "payload": {
- "payment_request_id": "krn:payment:eu1:request:552603c0-fe8b-4ab1-aacb-41d55fafbdb4",
- "payment_request_reference": "partner-payref-1234",
- "state": "SUBMITTED",
- "created_at": "2024-01-01T13:00:00Z",
- "expires_at": "2024-01-03T13:00:00Z",
- "updated_at": "2024-01-01T13:45:00Z"
}
}
Allows you to read the state of a payment request.
object Metadata about the integrator and originators of the request, serialized as a valid JSON, to improve troubleshooting. Read more here Example: integration_metadata=[object Object] | |
Partner-Correlation-Id | string <= 255 characters ^[A-Za-z0-9]+$ An optional alpha numerical String that the partner can use to correlate. This value will be returned in the response. |
Payment request object
Bad Request, there was an error in the input of the request. The request can not be retried without modifications.
Unauthorized, the request was not authorized.
Not Found, the requested resource was not found.
Too Many Requests, the request was rate limited.
Internal Server Error, there was an unexpected error in the API.
Service Temporarily Unavailable, the system is temporarily unavailable to process the request.
{- "payment_request_id": "krn:payment:eu1:request:552603c0-fe8b-4ab1-aacb-41d55fafbdb4",
- "currency": "USD",
- "amount": 1000,
- "state": "SUBMITTED",
- "state_context": {
- "customer_interaction": {
- "method": "HANDOVER",
- "payment_request_id": "krn:payment:eu1:request:552603c0-fe8b-4ab1-aacb-41d55fafbdb4",
}
}, - "expires_at": "2024-01-02T13:00:00Z",
- "created_at": "2024-01-01T12:00:00Z",
- "updated_at": "2024-01-01T13:00:00Z",
- "customer_interaction_config": {
- "method": "HANDOVER",
}
}
Allows you to update a payment request that is in the state SUBMITTED
.
object Metadata about the integrator and originators of the request, serialized as a valid JSON, to improve troubleshooting. Read more here Example: integration_metadata=[object Object] | |
Partner-Correlation-Id | string <= 255 characters ^[A-Za-z0-9]+$ An optional alpha numerical String that the partner can use to correlate. This value will be returned in the response. |
Payment Request updated
Bad Request, there was an error in the input of the request. The request can not be retried without modifications.
Unauthorized, the request was not authorized.
Not Found, the requested resource was not found.
Conflict, there was a conflict in using the resource. Idempotency violation or concurrent updates to a resource occurred.
Too Many Requests, the request was rate limited.
Internal Server Error, there was an unexpected error in the API.
Service Temporarily Unavailable, the system is temporarily unavailable to process the request.
{- "currency": "USD",
- "amount": 2000,
- "payment_request_reference": "partner-payment-reference-12345",
- "interoperability_data": "string",
- "supplementary_purchase_data": {
- "purchase_reference": "merchant-order-9876",
- "customer": {
- "given_name": "John",
- "family_name": "Doe",
- "email": "john.doe@klarna.com",
- "email_last_verified_at": "2024-01-01T12:00:00Z",
- "phone": "844-552-7621",
- "phone_last_verified_at": "2024-01-01T12:00:00Z",
- "address": {
- "street_address": "800 N. High St",
- "street_address2": "Ste. 400",
- "postal_code": "43215",
- "city": "Columbus",
- "region": "US-OH",
- "country": "US"
}, - "national_identification": {
- "number": "999-999-9999",
- "country": "US"
}, - "date_of_birth": "1970-01-01",
- "customer_account": {
- "partner_account_identifier": "acc_stripe_1234",
- "loyalty_level": "LOW",
- "created_at": "2024-01-01T12:00:00Z",
- "updated_at": "2024-01-01T12:00:00Z",
- "last_login": {
- "occurred_at": "2024-01-01T12:00:00Z",
- "login_methods": [
- "SMS_BY_OTP"
]
}, - "purchase_history": [
- {
- "number_of_purchases": 2147483647,
- "number_of_paid_purchases": 2147483647,
- "number_of_disputed_purchases": 2147483647,
- "total_amount": 2000,
- "currency": "USD",
- "payment_method": "CREDIT_CARD",
- "first_purchase_at": "2024-01-01T12:00:00Z",
- "last_purchase_at": "2024-01-01T12:00:00Z"
}
], - "device_purchase_history": [
- {
- "number_of_purchases": 2147483647,
- "number_of_paid_purchases": 2147483647,
- "number_of_disputed_purchases": 2147483647,
- "total_amount": 2000,
- "currency": "USD",
- "payment_method": "CREDIT_CARD",
- "first_purchase_at": "2024-01-01T12:00:00Z",
- "last_purchase_at": "2024-01-01T12:00:00Z"
}
]
}, - "customer_device": {
- "app_identifier": "com.example.merchant",
- "device_identifier": "Operating System: Windows 10 Browser: Chrome 91.0.4430.212 Screen Resolution: 1920x1080 Installed Plugins: Adobe Flash Player 32.0.0.465, Java 8 Update 291 Timezone: UTC+02:00 Language: English (United States)",
- "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36",
- "ip_address": "192.168.1.1",
- "geolocation": {
- "country": "US",
- "latitude": 40.7128,
- "longitude": 74.006
}
}
}, - "shipping": [
- {
- "recipient": {
- "given_name": "John",
- "family_name": "Doe",
- "email": "john.doe@klarna.com",
- "phone": "844-552-7621",
- "attention": "string"
}, - "address": {
- "street_address": "800 N. High St",
- "street_address2": "Ste. 400",
- "postal_code": "43215",
- "city": "Columbus",
- "region": "US-OH",
- "country": "US"
}, - "shipping_option": {
- "shipping_type": "TO_DOOR",
- "shipping_type_attributes": [
- "SIGNATURE_REQUIRED"
], - "shipping_carrier": "DHL"
}, - "shipping_reference": "DHL-123456"
}
], - "line_items": [
- {
- "name": "Black fountain pen",
- "quantity": 2,
- "total_amount": 2000,
- "total_tax_amount": 0,
- "unit_price": 1000,
- "product_identifier": "3270220049012",
- "line_item_reference": "cart-item-1234",
- "shipping_reference": "shipping-recipient-1234"
}
], - "travel_reservations": [
- {
- "travel_type": "AIR",
- "reservation_reference": "string",
- "departure": {
- "departure_airport": "ARN",
- "departs_at": "2024-01-01T12:00:00Z",
- "city": "Columbus",
- "country": "US"
}, - "arrival": {
- "arrival_airport": "OSL",
- "city": "Columbus",
- "country": "US"
}, - "carrier_name": "IB",
- "price": 20000,
- "currency": "USD",
- "ticket_class": "ECONOMY",
- "passengers": [
- {
- "given_name": "John",
- "family_name": "Doe"
}
], - "insurances": [
- {
- "insurance_type": "CANCELATION",
- "insurance_company_name": "string",
- "price": 20000,
- "currency": "USD"
}
], - "affiliate_name": "string"
}
], - "lodging_reservations": [
- {
- "lodging_name": "Any Hotel",
- "address": {
- "street_address": "800 N. High St",
- "street_address2": "Ste. 400",
- "postal_code": "43215",
- "city": "Columbus",
- "region": "US-OH",
- "country": "US"
}, - "starts_at": "2024-01-01T12:00:00Z",
- "ends_at": "2024-01-01T12:00:00Z",
- "number_of_spaces": 1,
- "price": 20000,
- "currency": "USD",
- "lodging_type": "ROOM",
- "guests": [
- {
- "given_name": "John",
- "family_name": "Doe"
}
], - "host": {
- "host_reference": "string",
- "host_type": "RENTAL_AGENCY",
- "country_of_domicile": "US",
- "registered_at": "2024-01-01T12:00:00Z",
- "number_of_reservations": 2147483647
}, - "insurances": [
- {
- "insurance_type": "CANCELATION",
- "insurance_company_name": "string",
- "price": 20000,
- "currency": "USD"
}
], - "affiliate_name": "string"
}
], - "insurances": [
- {
- "insurance_type": "CANCELATION",
- "insurance_company_name": "string",
- "price": 20000,
- "currency": "USD"
}
], - "vouchers": [
- {
- "voucher_name": "Gift Card",
- "voucher_type": "GIFT_CARD",
- "voucher_company": "Gift card company",
- "starts_at": "2024-01-01T12:00:00Z",
- "ends_at": "2024-01-01T12:00:00Z",
- "affiliate_name": "string"
}
], - "event_reservations": [
- {
- "event_name": "Magical concert",
- "event_company_name": "Las Vegas Events",
- "event_type": "CONCERT",
- "starts_at": "2024-01-01T12:00:00Z",
- "ends_at": "2024-01-01T12:00:00Z",
- "venue_name": "Las Vegas Sphere",
- "access_controlled_venue": true,
- "address": {
- "street_address": "800 N. High St",
- "street_address2": "Ste. 400",
- "postal_code": "43215",
- "city": "Columbus",
- "region": "US-OH",
- "country": "US"
}, - "affiliate_name": "string",
- "insurances": [
- {
- "insurance_type": "CANCELATION",
- "insurance_company_name": "string",
- "price": 20000,
- "currency": "USD"
}
]
}
], - "ondemand_service": {
- "currency": "USD",
- "average_amount": 2000,
- "minimum_amount": 2000,
- "maximum_amount": 2000,
- "purchase_interval": "MONTH",
- "purchase_interval_frequency": 1
}, - "additional_data": "\"{\\\"content\\\":{\\\"customer_account_info\\\":[{\\\"unique_account_identifier\\\":\\\"test@gmail.com\\\",\\\"account_registration_date\\\":\\\"2017-02-13T10:49:20Z\\\",\\\"account_last_modified\\\":\\\"2019-03-13T11:45:27Z\\\"}]},\\\"content_type\\\":\\\"application/vnd.klarna.internal.emd-v2+json\\\"}\"\n",
- "additional_provider_data": [
- {
- "data_provider": "string",
- "provider_supplementary_purchase_data": {
- "customer": {
- "given_name": "John",
- "family_name": "Doe",
- "email": "john.doe@klarna.com",
- "email_last_verified_at": "2024-01-01T12:00:00Z",
- "phone": "844-552-7621",
- "phone_last_verified_at": "2024-01-01T12:00:00Z",
- "address": {
- "street_address": "800 N. High St",
- "street_address2": "Ste. 400",
- "postal_code": "43215",
- "city": "Columbus",
- "region": "US-OH",
- "country": "US"
}, - "national_identification": {
- "number": "999-999-9999",
- "country": "US"
}, - "date_of_birth": "1970-01-01",
- "customer_account": {
- "partner_account_identifier": "acc_stripe_1234",
- "loyalty_level": "LOW",
- "created_at": "2024-01-01T12:00:00Z",
- "updated_at": "2024-01-01T12:00:00Z",
- "last_login": {
- "occurred_at": null,
- "login_methods": [ ]
}, - "purchase_history": [
- null
], - "device_purchase_history": [
- null
]
}, - "customer_device": {
- "app_identifier": "com.example.merchant",
- "device_identifier": "Operating System: Windows 10 Browser: Chrome 91.0.4430.212 Screen Resolution: 1920x1080 Installed Plugins: Adobe Flash Player 32.0.0.465, Java 8 Update 291 Timezone: UTC+02:00 Language: English (United States)",
- "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36",
- "ip_address": "192.168.1.1",
- "geolocation": {
- "country": null,
- "latitude": null,
- "longitude": null
}
}
}
}
}
], - "accepted_customer_terms": [
- {
- "term_type": "KLARNA_PAY_IN_N_OFFER_DISCLOSURE",
- "acknowledgement": "EXPLICIT"
}
]
}, - "payment_option_id": "string"
}
{- "payment_request_id": "krn:payment:eu1:request:552603c0-fe8b-4ab1-aacb-41d55fafbdb4",
- "currency": "USD",
- "amount": 1000,
- "state": "SUBMITTED",
- "state_context": {
- "customer_interaction": {
- "method": "HANDOVER",
- "payment_request_id": "krn:payment:eu1:request:552603c0-fe8b-4ab1-aacb-41d55fafbdb4",
}
}, - "expires_at": "2024-01-02T13:00:00Z",
- "created_at": "2024-01-01T12:00:00Z",
- "updated_at": "2024-01-01T13:00:00Z",
- "customer_interaction_config": {
- "method": "HANDOVER",
}
}
Allows you to cancel a payment request.
object Metadata about the integrator and originators of the request, serialized as a valid JSON, to improve troubleshooting. Read more here Example: integration_metadata=[object Object] | |
Partner-Correlation-Id | string <= 255 characters ^[A-Za-z0-9]+$ An optional alpha numerical String that the partner can use to correlate. This value will be returned in the response. |
Payment request object
Bad Request, there was an error in the input of the request. The request can not be retried without modifications.
Unauthorized, the request was not authorized.
Not Found, the requested resource was not found.
Conflict, there was a conflict in using the resource. Idempotency violation or concurrent updates to a resource occurred.
Too Many Requests, the request was rate limited.
Internal Server Error, there was an unexpected error in the API.
Service Temporarily Unavailable, the system is temporarily unavailable to process the request.
Shows a canceled payment request.
{- "payment_request_id": "krn:payment:eu1:request:552603c0-fe8b-4ab1-aacb-41d55fafbdb4",
- "state": "CANCELED",
- "state_reason": "PARTNER_CANCELED",
- "currency": "USD",
- "amount": 1000,
- "state_context": { },
- "expires_at": "2024-01-02T13:00:00Z",
- "created_at": "2024-01-01T12:00:00Z",
- "updated_at": "2024-01-01T13:00:00Z",
- "customer_interaction_config": {
- "method": "HANDOVER",
}
}
Retrieve a list of Disputes, segregated by a variety of filter parameters
object Metadata about the integrator and originators of the request, serialized as a valid JSON, to improve troubleshooting. Read more here Example: integration_metadata=[object Object] | |
Partner-Correlation-Id | string <= 255 characters ^[A-Za-z0-9]+$ An optional alpha numerical String that the partner can use to correlate. This value will be returned in the response. |
A paginated list of authorized disputes
Bad Request, there was an error in the input of the request. The request can not be retried without modifications.
Unauthorized, the request was not authorized.
Forbidden, insufficient privileges to perform the requested operation on the resource.
Not Found, the requested resource was not found.
Too Many Requests, the request was rate limited.
Internal Server Error, there was an unexpected error in the API.
{- "disputes": [
- {
- "payment_dispute_id": "krn:payment:eu1:dispute:products-not-received:256947",
- "dispute_reason": "PRODUCTS_NOT_RECEIVED",
- "state": "MERCHANT_EVIDENCE_PENDING",
- "previous_state": "ARBITRATION_PENDING",
- "state_context": {
- "evidence_request_type": "PRODUCTS_NOT_RECEIVED",
- "evidence_response_deadline_at": "2020-05-22T00:00:00Z"
}, - "payment_transaction_id": "krn:payment:eu1:authorization:6debe89e-98c0-486e-b7a5-08a4f6df94b0",
- "payment_transaction_reference": "f420e0e1-971b-417a-8ece-2626387eff36",
- "purchase_reference": "f420e0e1-971b-417a-8ece-2626387eff36",
- "payment_product_instance_id": "krn:partner:product:payment:ad71bc48-8a07-4919-a2c1-103dba3fc918",
- "dispute_details": {
- "dispute_amount": 39900,
- "currency": "EUR",
- "created_by": "CUSTOMER"
}, - "merchant_evidence": [
- {
- "payment_dispute_merchant_evidence_id": "krn:payment:eu1:dispute:256947:merchant-evidence:1",
- "request": {
- "created_at": "2020-05-08T08:32:14Z",
- "state": "EVIDENCE_REQUESTED",
- "comment": "Consumer claimed products were not received"
}, - "response": {
- "created_at": "2020-05-09T09:32:18Z",
- "additional_information": "Additional free text information",
- "attachments": [
- {
- "payment_dispute_attachment_id": "krn:payment:eu1:dispute:256947:attachment:1",
- "description": "Shipment confirmation"
}
], - "details": {
- "tracking_availability": "TRACKING_AVAILABLE",
- "tracking_number": "JCYPE32JAAR4",
- "shipping_carrier": "DHL",
- "estimated_delivery_date": "2020-04-10",
- "delivery_method": "BY_POST_OR_MAIL",
- "have_you_resolved_the_dispute_with_the_customer": "YES_WILL_MAKE_CHANGES_TO_PURCHASE",
- "proof_of_delivery_attachments": [
- {
- "payment_dispute_attachment_id": "krn:payment:eu1:dispute:256947:attachment:1",
- "description": "Shipment confirmation"
}
]
}
}
}
], - "config": {
- "payment_dispute_payment_dispute_payment_dispute_config_id": "krn:payment:eu1:dispute:266091:config:1",
- "total_merchant_evidence_requests": 5
}, - "created_at": "2020-04-15T08:31:00Z",
- "updated_at": "2020-05-09T08:31:00Z",
- "arbitration_started_at": "2020-05-08T00:00:00Z"
}
], - "pagination": {
- "count": 1,
- "last_item": "b040893b9e02f6445b205ae2102e3e9e1d0aa9035e61cdebde39b5c230a7bc5a",
- "total": 10
}
}
Fetch a fully detailed version of a Dispute, including all the associated requests and responses.
object Metadata about the integrator and originators of the request, serialized as a valid JSON, to improve troubleshooting. Read more here Example: integration_metadata=[object Object] | |
Partner-Correlation-Id | string <= 255 characters ^[A-Za-z0-9]+$ An optional alpha numerical String that the partner can use to correlate. This value will be returned in the response. |
Complete dispute with all requests and responses
Bad Request, there was an error in the input of the request. The request can not be retried without modifications.
Unauthorized, the request was not authorized.
Not Found, the requested resource was not found.
Too Many Requests, the request was rate limited.
Internal Server Error, there was an unexpected error in the API.
{- "payment_dispute_id": "krn:payment:eu1:dispute:faulty-products:266091",
- "dispute_reason": "PRODUCTS_FAULTY",
- "state": "ARBITRATION_PENDING",
- "previous_state": "MERCHANT_EVIDENCE_PENDING",
- "payment_transaction_id": "krn:payment:eu1:authorization:6debe89e-98c0-486e-b7a5-08a4f6df94b0",
- "purchase_reference": "f420e0e1-971b-417a-8ece-2626387eff36",
- "payment_product_instance_id": "krn:partner:product:payment:ad71bc48-8a07-4919-a2c1-103dba3fc918",
- "dispute_details": {
- "line_items": [
- {
- "name": "Product-1",
- "product_type": "PHYSICAL_ITEM",
- "quantity": 3,
- "unit_price": 100,
}
], - "dispute_amount": 39900,
- "currency": "EUR",
- "created_by": "CUSTOMER"
}, - "merchant_evidence": [
- {
- "payment_dispute_merchant_evidence_id": "krn:payment:eu1:dispute:256947:merchant-evidence:1",
- "request": {
- "created_at": "2020-05-08T08:32:14Z",
- "state": "EVIDENCE_RECEIVED",
- "previous_state": "EVIDENCE_REQUESTED",
- "comment": "Consumer claimed delivered products were faulty"
}, - "response": {
- "created_at": "2020-05-09T09:32:18Z",
- "additional_information": "Additional free text information",
- "attachments": [
- {
- "payment_dispute_attachment_id": "krn:payment:eu1:dispute:266091:attachment:1",
- "description": "Refund confirmation"
}
], - "details": {
- "have_you_resolved_the_dispute_with_the_customer": "YES_WILL_MAKE_CHANGES_TO_PURCHASE"
}
}
}
], - "config": {
- "payment_dispute_payment_dispute_payment_dispute_config_id": "krn:payment:eu1:dispute:266091:config:1",
- "total_merchant_evidence_requests": 5
}, - "created_at": "2020-04-15T08:31:00Z",
- "updated_at": "2020-05-09T08:31:00Z",
- "arbitration_started_at": "2020-05-08T00:00:00Z"
}
A payment dispute has just been submitted to Klarna.
{- "metadata": {
- "event_type": "payment.dispute.state-change.pre-arbitration",
- "event_id": "d9f9b1a0-5b1a-4b0e-9b0a-9e9b1a0d5b1a",
- "event_version": "v1",
- "occurred_at": "2020-04-15T08:31:01Z",
- "correlation_id": "2d1557e8-17c3-466c-924a-bbc3e91c2a02",
- "subject_account_id": "krn:partner:account:206bbb83-9b6e-46fa-940d-337153c04a58",
- "product_instance_id": "krn:partner:product:payment:ad71bc48-8a07-4919-a2c1-103dba3fc918",
- "recipient_account_id": "krn:partner:account:206bbb83-9b6e-46fa-940d-337153c04a58",
- "webhook_id": "krn:notification:webhook:120e5b7e-abcd-4def-8a90-dca726e639b5",
- "live": true
}, - "payload": {
- "payment_dispute_id": "krn:payment:eu1:dispute:return:266091",
- "payment_transaction_id": "krn:payment:eu1:authorization:6debe89e-98c0-486e-b7a5-08a4f6df94b0",
- "state": "PRE_ARBITRATION",
- "payment_capture_reference": "partner-capture-reference-1234",
- "dispute_reason": "RETURN_NOT_REFUNDED",
- "dispute_details": {
- "dispute_amount": 39900,
- "currency": "EUR",
- "created_by": "CUSTOMER"
}, - "config": {
- "payment_dispute_payment_dispute_config_id": "krn:payment:eu1:dispute:256947:config:1",
- "total_merchant_evidence_requests": 5
}, - "updated_at": "2020-04-15T08:31:00Z",
- "created_at": "2020-04-15T08:31:00Z"
}
}
Accept the loss of a dispute, which will be closed with the chargeback activation
object Metadata about the integrator and originators of the request, serialized as a valid JSON, to improve troubleshooting. Read more here Example: integration_metadata=[object Object] | |
Partner-Correlation-Id | string <= 255 characters ^[A-Za-z0-9]+$ An optional alpha numerical String that the partner can use to correlate. This value will be returned in the response. |
Loss was accepted successfully
Bad Request, there was an error in the input of the request. The request can not be retried without modifications.
Unauthorized, the request was not authorized.
Not Found, the requested resource was not found.
The dispute is not in a state where the loss can be accepted. Read the error details for further information.
Too Many Requests, the request was rate limited.
Internal Server Error, there was an unexpected error in the API.
{- "error_id": "5a3f6b9c-9b3b-4b7e-8f9d-9b9a4b9a4b9a",
- "error_type": "INPUT_ERROR",
- "error_code": "INVALID_CONTENT_TYPE",
- "error_message": "The received input is not valid JSON.\nUnterminated string at 19 [character 20 line 1].\n"
}
Uploads merchant attachment to be linked to a dispute response. File size limit is 7MB.
object Metadata about the integrator and originators of the request, serialized as a valid JSON, to improve troubleshooting. Read more here Example: integration_metadata=[object Object] | |
Partner-Correlation-Id | string <= 255 characters ^[A-Za-z0-9]+$ An optional alpha numerical String that the partner can use to correlate. This value will be returned in the response. |
Attachment uploaded successfully
Bad Request, there was an error in the input of the request. The request can not be retried without modifications.
Unauthorized, the request was not authorized.
Forbidden, insufficient privileges to perform the requested operation on the resource.
Not Found, the requested resource was not found.
Too Many Requests, the request was rate limited.
Internal Server Error, there was an unexpected error in the API.
{- "payment_dispute_attachment_id": "krn:payment:eu1:dispute:256947:attachment:3"
}
Respond to merchant evidence request.
object Metadata about the integrator and originators of the request, serialized as a valid JSON, to improve troubleshooting. Read more here Example: integration_metadata=[object Object] | |
Partner-Correlation-Id | string <= 255 characters ^[A-Za-z0-9]+$ An optional alpha numerical String that the partner can use to correlate. This value will be returned in the response. |
Response to add to request
Merchant response to a dispute where the customer claims that the products were faulty
Dispute's evidence request response was submitted successfully
Bad Request, there was an error in the input of the request. The request can not be retried without modifications.
Unauthorized, the request was not authorized.
Forbidden, insufficient privileges to perform the requested operation on the resource.
Not Found, the requested resource was not found.
The dispute is not in a state where a response can be submitted.
Too Many Requests, the request was rate limited.
Internal Server Error, there was an unexpected error in the API.
Responding to an evidence request with request type 'RETURN_NOT_REFUNDED'
{- "additional_information": "Additional free text information",
- "created_at": "2020-05-08T08:32:14Z",
- "attachments": [
- {
- "payment_dispute_attachment_id": "krn:payment:eu1:dispute:256947:attachment:1",
- "description": "Optional attachment"
}
], - "details": {
- "did_you_receive_the_return": "YES_WILL_MAKE_CHANGES_TO_PURCHASE"
}
}
{- "response_id": "krn:payment:eu1:dispute:266092:request:1:response:1",
- "created_at": "2020-05-09T09:32:18Z",
- "additional_information": "Additional free text information",
- "attachments": [
- {
- "payment_dispute_attachment_id": "krn:payment:eu1:dispute:266092:attachment:1",
- "description": "Additional attachment"
}
], - "details": {
- "did_you_receive_the_return": "YES_WILL_MAKE_CHANGES_TO_PURCHASE"
}
}
The Payment Transaction API allows you to create and manage payment transactions.
Request to retrieve the details of a payment transaction. A payment transaction encapsulates crucial details such as the authorized amount, currency, line items and shipping information.
object Metadata about the integrator and originators of the request, serialized as a valid JSON, to improve troubleshooting. Read more here Example: integration_metadata=[object Object] | |
Partner-Correlation-Id | string <= 255 characters ^[A-Za-z0-9]+$ An optional alpha numerical String that the partner can use to correlate. This value will be returned in the response. |
Payment Transaction has been successfully retrieved.
Bad Request, there was an error in the input of the request. The request can not be retried without modifications.
Unauthorized, the request was not authorized.
Not Found, the requested resource was not found.
Too Many Requests, the request was rate limited.
Internal Server Error, there was an unexpected error in the API.
Service Temporarily Unavailable, the system is temporarily unavailable to process the request.
Shows a payment transaction that has been created but not yet acted upon.
{- "payment_transaction_id": "krn:payment:us1:transaction:4b8b6350-6b72-42c5-b946-f088adcdc216",
- "currency": "USD",
- "amount": 2100,
- "payment_transaction_reference": "payment-transaction-reference-1234",
- "payment_funding": {
- "type": "GUARANTEED",
- "state": "FUNDED"
}, - "supplementary_purchase_data": {
- "purchase_reference": "merchant-order-reference-5678",
- "line_items": [
- {
- "name": "Black fountain pen",
- "quantity": 2,
- "total_amount": 2000,
- "product_identifier": "1234567890"
}, - {
- "name": "Sales tax",
- "quantity": 1,
- "total_amount": 100,
- "total_tax_amount": 100
}
], - "shipping": [
- {
- "recipient": {
- "given_name": "Klara",
- "family_name": "Angel"
}, - "address": {
- "street_address": "629 N High St",
- "street_address2": "Suite 300",
- "postal_code": "43215",
- "city": "Columbus",
- "region": "OH",
- "country": "US"
}
}
]
}, - "payment_captures": [ ],
- "payment_refunds": [ ],
- "payment_chargebacks": [ ],
- "state": "AUTHORIZED",
- "state_reason": "AUTHORIZED",
- "created_at": "2024-01-01T13:00:00Z",
- "expires_at": "2024-01-29T13:00:00Z",
- "original_authorization_amount": 2100,
- "remaining_authorization_amount": 2100,
- "customer_profile": {
- "customer_id": "krn:kuid:vxsqIkCHf5lCWmaZ2beqwz",
- "given_name": "Klara",
- "family_name": "Angel",
- "email": "klara.angel@klarna.com",
- "email_verified": true,
- "date_of_birth": "1990-01-01",
- "locale": "en-US"
}, - "settlement_currency": "USD",
- "payment_pricing": {
- "applicable_rate": {
- "fixed_fee": {
- "amount": 104,
- "currency": "USD"
}, - "variable_fee": {
- "percentage": 139
}, - "unit": "CAPTURE"
}, - "applied_fee_components": [
- {
- "type": "TRANSACTION_FEE",
- "fixed_fee": {
- "amount": 100,
- "currency": "USD"
}, - "variable_fee": {
- "percentage": 120
}
}, - {
- "type": "CROSS_BORDER_FEE",
- "fixed_fee": {
- "amount": 5,
- "currency": "USD"
}, - "variable_fee": {
- "percentage": 29
}
}, - {
- "type": "SELL_RATE_INCENTIVE",
- "fixed_fee": {
- "amount": 0,
- "currency": "USD"
}, - "variable_fee": {
- "percentage": 0
}
}, - {
- "type": "BUY_RATE_INCENTIVE",
- "fixed_fee": {
- "amount": -1,
- "currency": "USD"
}, - "variable_fee": {
- "percentage": -10
}
}
], - "evaluation_parameters": {
- "price_plan_id": "krn:partner:global:payment:price-plan:2a3ced5d-270b-319d-7aa4-a4bcf3a2f4b6",
- "payment_program_id": "krn:partner:global:pricing:payments:program:a5cd46f7e-573d-4b02-bab8-1f1c0e343291",
- "customer_country": "DE",
- "partner_country": "US",
- "merchant_category_code": "5111",
- "evaluated_at": "2024-01-01T13:00:00Z",
- "pricing_payment_category": "DIGITAL"
}
}
}
Request to update details of a payment transaction.
The update operation should be performed when there is a need to change either the payment_transaction_reference
or the purchase_reference
. These fields are essential for aligning your internal records with Klarna's transaction records and ensuring accurate tracking and reconciliation.
object Metadata about the integrator and originators of the request, serialized as a valid JSON, to improve troubleshooting. Read more here Example: integration_metadata=[object Object] | |
Partner-Correlation-Id | string <= 255 characters ^[A-Za-z0-9]+$ An optional alpha numerical String that the partner can use to correlate. This value will be returned in the response. |
Payment Transaction has been successfully updated.
Bad Request, there was an error in the input of the request. The request can not be retried without modifications.
Unauthorized, the request was not authorized.
Not Found, the requested resource was not found.
Too Many Requests, the request was rate limited.
Internal Server Error, there was an unexpected error in the API.
Service Temporarily Unavailable, the system is temporarily unavailable to process the request.
Update purchase reference and payment transaction reference
{- "supplementary_purchase_data": {
- "purchase_reference": "new-merchant-order-reference-5678"
}, - "payment_transaction_reference": "new-payment-transaction-reference-1234"
}
Shows a payment transaction that has been updated prior to completion.
{- "payment_transaction_id": "krn:payment:us1:transaction:4b8b6350-6b72-42c5-b946-f088adcdc216",
- "payment_transaction_reference": "new-payment-transaction-reference-1234",
- "amount": 2100,
- "currency": "USD",
- "supplementary_purchase_data": {
- "purchase_reference": "new-merchant-order-reference-5678",
- "line_items": [
- {
- "name": "Black fountain pen",
- "quantity": 2,
- "total_amount": 2000,
- "product_identifier": "1234567890"
}, - {
- "name": "Sales tax",
- "quantity": 1,
- "total_amount": 100,
- "total_tax_amount": 100
}
], - "shipping": [
- {
- "recipient": {
- "given_name": "Klara",
- "family_name": "Angel"
}, - "address": {
- "street_address": "629 N High St",
- "street_address2": "Suite 300",
- "postal_code": "43215",
- "city": "Columbus",
- "region": "OH",
- "country": "US"
}
}
]
}, - "payment_captures": [ ],
- "payment_refunds": [ ],
- "payment_chargebacks": [ ],
- "state": "AUTHORIZED",
- "state_reason": "AUTHORIZED",
- "created_at": "2024-01-01T13:00:00Z",
- "updated_at": "2024-01-02T13:00:00Z",
- "expires_at": "2024-01-29T13:00:00Z",
- "original_authorization_amount": 2100,
- "remaining_authorization_amount": 2100,
- "customer_profile": {
- "customer_id": "krn:kuid:vxsqIkCHf5lCWmaZ2beqwz",
- "given_name": "Klara",
- "family_name": "Angel",
- "email": "klara.angel@klarna.com",
- "email_verified": true,
- "date_of_birth": "1990-01-01",
- "locale": "en-US"
}, - "payment_funding": {
- "type": "GUARANTEED",
- "state": "FUNDED"
}, - "settlement_currency": "USD",
- "payment_pricing": {
- "applicable_rate": {
- "fixed_fee": {
- "amount": 104,
- "currency": "USD"
}, - "variable_fee": {
- "percentage": 139
}, - "unit": "CAPTURE"
}, - "applied_fee_components": [
- {
- "type": "TRANSACTION_FEE",
- "fixed_fee": {
- "amount": 100,
- "currency": "USD"
}, - "variable_fee": {
- "percentage": 120
}
}, - {
- "type": "CROSS_BORDER_FEE",
- "fixed_fee": {
- "amount": 5,
- "currency": "USD"
}, - "variable_fee": {
- "percentage": 29
}
}, - {
- "type": "SELL_RATE_INCENTIVE",
- "fixed_fee": {
- "amount": 0,
- "currency": "USD"
}, - "variable_fee": {
- "percentage": 0
}
}, - {
- "type": "BUY_RATE_INCENTIVE",
- "fixed_fee": {
- "amount": -1,
- "currency": "USD"
}, - "variable_fee": {
- "percentage": -10
}
}
], - "evaluation_parameters": {
- "price_plan_id": "krn:partner:global:payment:price-plan:2a3ced5d-270b-319d-7aa4-a4bcf3a2f4b6",
- "payment_program_id": "krn:partner:global:pricing:payments:program:a5cd46f7e-573d-4b02-bab8-1f1c0e343291",
- "customer_country": "DE",
- "partner_country": "US",
- "merchant_category_code": "5111",
- "evaluated_at": "2024-01-01T13:00:00Z",
- "pricing_payment_category": "DIGITAL"
}
}
}
Request to capture a payment transaction. The capture should be performed in conjunction with the shipment of the purchased goods. Upon successful completion, the process of settling the funds with the merchant will commence.
object Metadata about the integrator and originators of the request, serialized as a valid JSON, to improve troubleshooting. Read more here Example: integration_metadata=[object Object] | |
Partner-Correlation-Id | string <= 255 characters ^[A-Za-z0-9]+$ An optional alpha numerical String that the partner can use to correlate. This value will be returned in the response. |
Payment Transaction has been successfully captured.
Bad Request, there was an error in the input of the request. The request can not be retried without modifications.
Unauthorized, the request was not authorized.
Forbidden, insufficient privileges to perform the requested operation on the resource.
Not Found, the requested resource was not found.
Too Many Requests, the request was rate limited.
Internal Server Error, there was an unexpected error in the API.
Service Temporarily Unavailable, the system is temporarily unavailable to process the request.
Shows a capture request with capture amount and line items
{- "capture_amount": 5000,
- "supplementary_capture_data": {
- "line_items": [
- {
- "name": "Oversized vintage trabant tee",
- "quantity": 2,
- "total_amount": 5000,
- "product_identifier": "1234567890"
}
]
}, - "remaining_authorization": "RELEASE"
}
Shows a successful payment capture response
{- "payment_capture_id": "krn:payment:eu1:transaction:bc42b6ff-b222-463c-b4b2-d8d6a82e0162:capture:1",
- "payment_capture_reference": "capture-reference-123",
- "capture_amount": 5000,
- "captured_at": "2024-01-02T13:00:00Z",
- "supplementary_capture_data": {
- "line_items": [
- {
- "name": "Oversized vintage trabant tee",
- "quantity": 2,
- "total_amount": 5000,
- "product_identifier": "1234567890"
}
], - "shipments": [
- {
- "delivery": {
- "tracking_number": "DHL123456789",
- "shipping_carrier": "DHL",
- "shipping_type": "TO_DOOR",
- "shipping_type_attribute": "SIGNATURE_REQUIRED",
- "estimated_delivery_date": "2024-01-05"
}, - "return": {
- "tracking_number": "DHL987654321",
- "shipping_carrier": "DHL"
}
}
]
}
}
Shows a payment transaction authorized webhook.
{- "metadata": {
- "event_type": "payment.transaction.state-change.authorized",
- "event_id": "7f1ff389-7792-4cc5-8ec5-cb2ed6e1f19c",
- "event_version": "v2",
- "occurred_at": "2024-01-01T13:00:00Z",
- "correlation_id": "2d1557e8-17c3-466c-924a-bbc3e91c2a02",
- "subject_account_id": "krn:partner:global:account:live:HGBY07TR",
- "recipient_account_id": "krn:partner:global:account:live:LWT2XJSE",
- "product_instance_id": "krn:partner:product:payment:ad71bc48-8a07-4919-a2c1-103dba3fc918",
- "webhook_id": "krn:partner:global:notification:webhook:120e5b7e-abcd-4def-8a90-dca726e639b5",
- "live": true
}, - "payload": {
- "payment_transaction_id": "krn:payment:us1:transaction:4b8b6350-6b72-42c5-b946-f088adcdc216",
- "payment_transaction_reference": "payment-transaction-reference-1234",
- "amount": 2100,
- "currency": "USD",
- "state": "AUTHORIZED",
- "state_reason": "AUTHORIZED",
- "remaining_authorization_amount": 2100,
- "customer_id": "krn:kuid:vxsqIkCHf5lCWmaZ2beqwz",
- "created_at": "2024-01-01T13:00:00Z",
- "expires_at": "2024-01-29T13:00:00Z",
- "payment_account": {
- "payment_account_id": "krn:partner:global:payment-account:test:3440b9b7-7ca2-44a3-8f62-776caacdaa0b",
- "payment_account_reference": "payment-account-reference"
}, - "payment_acquiring_account": {
- "payment_acquiring_account_id": "krn:partner:global:payment-acquiring-account:test:3440b9b7-7ca2-44a3-8f62-776caacdaa0b",
- "payment_account_reference": "payment-acquiring-account-reference"
}
}
}
Request to refund a payment transaction.
The refund should be performed when customers return the purchased items. Upon successful completion, the process of returning the funds to the customer will commence, and the merchant's settlement balance will be adjusted accordingly.
object Metadata about the integrator and originators of the request, serialized as a valid JSON, to improve troubleshooting. Read more here Example: integration_metadata=[object Object] | |
Partner-Correlation-Id | string <= 255 characters ^[A-Za-z0-9]+$ An optional alpha numerical String that the partner can use to correlate. This value will be returned in the response. |
Payment Transaction has been successfully refunded.
Bad Request, there was an error in the input of the request. The request can not be retried without modifications.
Unauthorized, the request was not authorized.
Forbidden, insufficient privileges to perform the requested operation on the resource.
Not Found, the requested resource was not found.
Too Many Requests, the request was rate limited.
Internal Server Error, there was an unexpected error in the API.
Service Temporarily Unavailable, the system is temporarily unavailable to process the request.
Shows a refund request with refund amount and line items
{- "refund_amount": 5000,
- "payment_refund_reference": "refund-reference-123",
- "supplementary_refund_data": {
- "line_items": [
- {
- "name": "Oversized vintage trabant tee",
- "quantity": 2,
- "total_amount": 5000,
- "product_identifier": "1234567890"
}
]
}
}
Shows a successful response to a refund operation on a payment transaction.
{- "payment_refund_id": "krn:payment:eu1:transaction:bc42b6ff-b222-463c-b4b2-d8d6a82e0162:refund:1",
- "payment_refund_reference": "refund-reference-123",
- "refund_amount": 5000,
- "refunded_at": "2024-01-02T13:00:00Z",
- "supplementary_refund_data": {
- "line_items": [
- {
- "name": "Oversized vintage trabant tee",
- "quantity": 2,
- "total_amount": 5000,
- "product_identifier": "1234567890"
}
]
}
}
Shows a payment transaction refunded webhook.
{- "metadata": {
- "event_type": "payment.transaction.refunded",
- "event_id": "7f1ff389-7792-4cc5-8ec5-cb2ed6e1f19c",
- "event_version": "v2",
- "occurred_at": "2024-01-22T12:00:00Z",
- "correlation_id": "2d1557e8-17c3-466c-924a-bbc3e91c2a02",
- "subject_account_id": "krn:partner:global:account:live:HGBY07TR",
- "recipient_account_id": "krn:partner:global:account:live:LWT2XJSE",
- "product_instance_id": "krn:partner:product:payment:ad71bc48-8a07-4919-a2c1-103dba3fc918",
- "webhook_id": "krn:partner:global:notification:webhook:120e5b7e-abcd-4def-8a90-dca726e639b5",
- "live": true
}, - "payload": {
- "payment_transaction_id": "krn:payment:us1:transaction:4b8b6350-6b72-42c5-b946-f088adcdc216",
- "payment_transaction_reference": "payment-transaction-reference-1234",
- "payment_refund_id": "krn:payment:us1:transaction:4b8b6350-6b72-42c5-b946-f088adcdc216:refund:1",
- "payment_refund_reference": "partner-refund-reference-1234",
- "refund_amount": 2000,
- "refunded_at": "2024-01-22T12:00:00Z"
}
}
Request to void a payment transaction.
The void operation should be performed when the payment is no longer intended to be fulfilled. Upon successful completion, any remaining authorization will subsequently be released.
object Metadata about the integrator and originators of the request, serialized as a valid JSON, to improve troubleshooting. Read more here Example: integration_metadata=[object Object] | |
Partner-Correlation-Id | string <= 255 characters ^[A-Za-z0-9]+$ An optional alpha numerical String that the partner can use to correlate. This value will be returned in the response. |
Payment Transaction has been successfully voided.
Bad Request, there was an error in the input of the request. The request can not be retried without modifications.
Unauthorized, the request was not authorized.
Forbidden, insufficient privileges to perform the requested operation on the resource.
Not Found, the requested resource was not found.
Too Many Requests, the request was rate limited.
Internal Server Error, there was an unexpected error in the API.
Service Temporarily Unavailable, the system is temporarily unavailable to process the request.
Shows a payment transaction that has been partially captured and completed upon a void operation. Any remaining authorization has been released.
{- "payment_transaction_id": "krn:payment:eu1:transaction:bc42b6ff-b222-463c-b4b2-d8d6a82e0162",
- "payment_transaction_reference": "payment-transaction-reference-1234",
- "amount": 15000,
- "currency": "EUR",
- "payment_funding": {
- "type": "GUARANTEED",
- "state": "FUNDED"
}, - "supplementary_purchase_data": {
- "purchase_reference": "merchant-order-reference-5678",
- "line_items": [
- {
- "name": "Oversized vintage trabant tee",
- "quantity": 2,
- "total_amount": 5000,
- "product_identifier": "1234567890"
}, - {
- "name": "Custom Berlin Wall Art Skateboard",
- "quantity": 1,
- "total_amount": 10000,
- "product_identifier": "5566778899"
}
], - "shipping": [
- {
- "recipient": {
- "given_name": "Klara",
- "family_name": "Angel"
}, - "address": {
- "street_address": "Kurfürstendamm 100",
- "postal_code": "10709",
- "city": "Berlin",
- "region": "Berlin",
- "country": "DE"
}
}
]
}, - "payment_captures": [
- {
- "payment_capture_id": "krn:payment:eu1:transaction:bc42b6ff-b222-463c-b4b2-d8d6a82e0162:capture:1",
- "payment_capture_reference": "capture-reference-123",
- "capture_amount": 5000,
- "captured_at": "2024-01-02T13:00:00Z",
- "supplementary_capture_data": {
- "line_items": [
- {
- "name": "Oversized vintage trabant tee",
- "quantity": 2,
- "total_amount": 5000,
- "product_identifier": "1234567890"
}
], - "shipments": [
- {
- "delivery": {
- "tracking_number": "DHL123456789",
- "shipping_carrier": "DHL",
- "shipping_type": "TO_DOOR",
- "shipping_type_attribute": "SIGNATURE_REQUIRED",
- "estimated_delivery_date": "2024-01-05"
}, - "return": {
- "tracking_number": "DHL987654321",
- "shipping_carrier": "DHL"
}
}
]
}
}
], - "payment_refunds": [ ],
- "payment_chargebacks": [ ],
- "state": "COMPLETED",
- "state_reason": "VOIDED",
- "previous_state": "AUTHORIZED",
- "created_at": "2024-01-01T13:00:00Z",
- "updated_at": "2024-01-02T13:00:00Z",
- "expires_at": "2024-01-29T13:00:00Z",
- "original_authorization_amount": 15000,
- "remaining_authorization_amount": 0,
- "customer_profile": {
- "customer_id": "krn:kuid:vxsqIkCHf5lCWmaZ2beqwz",
- "given_name": "Klara",
- "family_name": "Angel",
- "email": "klara.angel@klarna.com",
- "email_verified": true,
- "date_of_birth": "1990-01-01",
- "locale": "en-US"
}, - "settlement_currency": "USD",
- "payment_pricing": {
- "applicable_rate": {
- "fixed_fee": {
- "amount": 104,
- "currency": "USD"
}, - "variable_fee": {
- "percentage": 139
}, - "unit": "CAPTURE"
}, - "applied_fee_components": [
- {
- "type": "TRANSACTION_FEE",
- "fixed_fee": {
- "amount": 100,
- "currency": "USD"
}, - "variable_fee": {
- "percentage": 120
}
}, - {
- "type": "CROSS_BORDER_FEE",
- "fixed_fee": {
- "amount": 5,
- "currency": "USD"
}, - "variable_fee": {
- "percentage": 29
}
}, - {
- "type": "SELL_RATE_INCENTIVE",
- "fixed_fee": {
- "amount": 0,
- "currency": "USD"
}, - "variable_fee": {
- "percentage": 0
}
}, - {
- "type": "BUY_RATE_INCENTIVE",
- "fixed_fee": {
- "amount": -1,
- "currency": "USD"
}, - "variable_fee": {
- "percentage": -10
}
}
], - "evaluation_parameters": {
- "price_plan_id": "krn:partner:global:payment:price-plan:2a3ced5d-270b-319d-7aa4-a4bcf3a2f4b6",
- "payment_program_id": "krn:partner:global:pricing:payments:program:a5cd46f7e-573d-4b02-bab8-1f1c0e343291",
- "customer_country": "DE",
- "partner_country": "US",
- "merchant_category_code": "5111",
- "evaluated_at": "2024-01-01T13:00:00Z",
- "pricing_payment_category": "DIGITAL"
}
}
}
Shows a payment transaction authorized webhook.
{- "metadata": {
- "event_type": "payment.transaction.state-change.authorized",
- "event_id": "7f1ff389-7792-4cc5-8ec5-cb2ed6e1f19c",
- "event_version": "v2",
- "occurred_at": "2024-01-01T13:00:00Z",
- "correlation_id": "2d1557e8-17c3-466c-924a-bbc3e91c2a02",
- "subject_account_id": "krn:partner:global:account:live:HGBY07TR",
- "recipient_account_id": "krn:partner:global:account:live:LWT2XJSE",
- "product_instance_id": "krn:partner:product:payment:ad71bc48-8a07-4919-a2c1-103dba3fc918",
- "webhook_id": "krn:partner:global:notification:webhook:120e5b7e-abcd-4def-8a90-dca726e639b5",
- "live": true
}, - "payload": {
- "payment_transaction_id": "krn:payment:us1:transaction:4b8b6350-6b72-42c5-b946-f088adcdc216",
- "payment_transaction_reference": "payment-transaction-reference-1234",
- "amount": 2100,
- "currency": "USD",
- "state": "AUTHORIZED",
- "state_reason": "AUTHORIZED",
- "remaining_authorization_amount": 2100,
- "customer_id": "krn:kuid:vxsqIkCHf5lCWmaZ2beqwz",
- "created_at": "2024-01-01T13:00:00Z",
- "expires_at": "2024-01-29T13:00:00Z",
- "payment_account": {
- "payment_account_id": "krn:partner:global:payment-account:test:3440b9b7-7ca2-44a3-8f62-776caacdaa0b",
- "payment_account_reference": "payment-account-reference"
}, - "payment_acquiring_account": {
- "payment_acquiring_account_id": "krn:partner:global:payment-acquiring-account:test:3440b9b7-7ca2-44a3-8f62-776caacdaa0b",
- "payment_account_reference": "payment-acquiring-account-reference"
}
}
}
Request to retrieve the details of a payment capture. A payment capture encapsulates crucial details such as the capture amount, line items and shipment details.
object Metadata about the integrator and originators of the request, serialized as a valid JSON, to improve troubleshooting. Read more here Example: integration_metadata=[object Object] | |
Partner-Correlation-Id | string <= 255 characters ^[A-Za-z0-9]+$ An optional alpha numerical String that the partner can use to correlate. This value will be returned in the response. |
Payment Capture has been successfully retrieved.
Bad Request, there was an error in the input of the request. The request can not be retried without modifications.
Unauthorized, the request was not authorized.
Not Found, the requested resource was not found.
Too Many Requests, the request was rate limited.
Internal Server Error, there was an unexpected error in the API.
Service Temporarily Unavailable, the system is temporarily unavailable to process the request.
Shows a successful payment capture response
{- "payment_capture_id": "krn:payment:eu1:transaction:bc42b6ff-b222-463c-b4b2-d8d6a82e0162:capture:1",
- "payment_capture_reference": "capture-reference-123",
- "capture_amount": 5000,
- "captured_at": "2024-01-02T13:00:00Z",
- "supplementary_capture_data": {
- "line_items": [
- {
- "name": "Oversized vintage trabant tee",
- "quantity": 2,
- "total_amount": 5000,
- "product_identifier": "1234567890"
}
], - "shipments": [
- {
- "delivery": {
- "tracking_number": "DHL123456789",
- "shipping_carrier": "DHL",
- "shipping_type": "TO_DOOR",
- "shipping_type_attribute": "SIGNATURE_REQUIRED",
- "estimated_delivery_date": "2024-01-05"
}, - "return": {
- "tracking_number": "DHL987654321",
- "shipping_carrier": "DHL"
}
}
]
}
}
Request to refund a payment capture.
The refund should be performed when customers return the purchased items. Upon successful completion, the process of returning the funds to the customer will commence, and the merchant's settlement balance will be adjusted accordingly.
object Metadata about the integrator and originators of the request, serialized as a valid JSON, to improve troubleshooting. Read more here Example: integration_metadata=[object Object] | |
Partner-Correlation-Id | string <= 255 characters ^[A-Za-z0-9]+$ An optional alpha numerical String that the partner can use to correlate. This value will be returned in the response. |
Payment Capture has been successfully refunded.
Bad Request, there was an error in the input of the request. The request can not be retried without modifications.
Unauthorized, the request was not authorized.
Forbidden, insufficient privileges to perform the requested operation on the resource.
Not Found, the requested resource was not found.
Too Many Requests, the request was rate limited.
Internal Server Error, there was an unexpected error in the API.
Service Temporarily Unavailable, the system is temporarily unavailable to process the request.
Shows a refund request with refund amount and line items
{- "refund_amount": 5000,
- "payment_refund_reference": "refund-reference-123",
- "supplementary_refund_data": {
- "line_items": [
- {
- "name": "Oversized vintage trabant tee",
- "quantity": 2,
- "total_amount": 5000,
- "product_identifier": "1234567890"
}
]
}
}
Shows a successful response to a refund operation on a payment capture.
{- "payment_refund_id": "krn:payment:eu1:transaction:bc42b6ff-b222-463c-b4b2-d8d6a82e0162:refund:1",
- "payment_capture_id": "krn:payment:eu1:transaction:bc42b6ff-b222-463c-b4b2-d8d6a82e0162:capture:1",
- "payment_refund_reference": "refund-reference-123",
- "refund_amount": 5000,
- "refunded_at": "2024-01-02T13:00:00Z",
- "supplementary_refund_data": {
- "line_items": [
- {
- "name": "Oversized vintage trabant tee",
- "quantity": 2,
- "total_amount": 5000,
- "product_identifier": "1234567890"
}
]
}
}
Shows a payment transaction refunded webhook.
{- "metadata": {
- "event_type": "payment.transaction.refunded",
- "event_id": "7f1ff389-7792-4cc5-8ec5-cb2ed6e1f19c",
- "event_version": "v2",
- "occurred_at": "2024-01-22T12:00:00Z",
- "correlation_id": "2d1557e8-17c3-466c-924a-bbc3e91c2a02",
- "subject_account_id": "krn:partner:global:account:live:HGBY07TR",
- "recipient_account_id": "krn:partner:global:account:live:LWT2XJSE",
- "product_instance_id": "krn:partner:product:payment:ad71bc48-8a07-4919-a2c1-103dba3fc918",
- "webhook_id": "krn:partner:global:notification:webhook:120e5b7e-abcd-4def-8a90-dca726e639b5",
- "live": true
}, - "payload": {
- "payment_transaction_id": "krn:payment:us1:transaction:4b8b6350-6b72-42c5-b946-f088adcdc216",
- "payment_transaction_reference": "payment-transaction-reference-1234",
- "payment_refund_id": "krn:payment:us1:transaction:4b8b6350-6b72-42c5-b946-f088adcdc216:refund:1",
- "payment_refund_reference": "partner-refund-reference-1234",
- "refund_amount": 2000,
- "refunded_at": "2024-01-22T12:00:00Z"
}
}
Request to retrieve the details of a payment refund. A payment refund encapsulates crucial details such as the refund amount and line items.
object Metadata about the integrator and originators of the request, serialized as a valid JSON, to improve troubleshooting. Read more here Example: integration_metadata=[object Object] | |
Partner-Correlation-Id | string <= 255 characters ^[A-Za-z0-9]+$ An optional alpha numerical String that the partner can use to correlate. This value will be returned in the response. |
Payment refund has been successfully retrieved.
Bad Request, there was an error in the input of the request. The request can not be retried without modifications.
Unauthorized, the request was not authorized.
Not Found, the requested resource was not found.
Too Many Requests, the request was rate limited.
Internal Server Error, there was an unexpected error in the API.
Service Temporarily Unavailable, the system is temporarily unavailable to process the request.
Shows a successful response to a refund operation on a payment transaction.
{- "payment_refund_id": "krn:payment:eu1:transaction:bc42b6ff-b222-463c-b4b2-d8d6a82e0162:refund:1",
- "payment_refund_reference": "refund-reference-123",
- "refund_amount": 5000,
- "refunded_at": "2024-01-02T13:00:00Z",
- "supplementary_refund_data": {
- "line_items": [
- {
- "name": "Oversized vintage trabant tee",
- "quantity": 2,
- "total_amount": 5000,
- "product_identifier": "1234567890"
}
]
}
}
Request to retrieve the details of a payment chargeback. A payment chargeback encapsulates crucial details such as the chargeback amount and chargeback reason.
object Metadata about the integrator and originators of the request, serialized as a valid JSON, to improve troubleshooting. Read more here Example: integration_metadata=[object Object] | |
Partner-Correlation-Id | string <= 255 characters ^[A-Za-z0-9]+$ An optional alpha numerical String that the partner can use to correlate. This value will be returned in the response. |
Payment chargeback has been successfully retrieved.
Bad Request, there was an error in the input of the request. The request can not be retried without modifications.
Unauthorized, the request was not authorized.
Not Found, the requested resource was not found.
Too Many Requests, the request was rate limited.
Internal Server Error, there was an unexpected error in the API.
Service Temporarily Unavailable, the system is temporarily unavailable to process the request.
Shows a payment chargeback created as a result of dispute merchant loss.
{- "payment_dispute_id": "krn:payment:eu1:transaction:f9669608-a24d-43ef-9f34-ec3d785dc1ae:dispute:1",
- "payment_chargeback_id": "krn:payment:eu1:transaction:f9669608-a24d-43ef-9f34-ec3d785dc1ae:chargeback:1",
- "chargeback_amount": 5000,
- "chargeback_reason": "DISPUTE_ARBITRATION_LOST",
- "chargeback_at": "2024-01-02T13:00:00Z",
- "line_items": [
- {
- "name": "Oversized vintage trabant tee",
- "quantity": 2,
- "total_amount": 5000,
- "product_identifier": "1234567890"
}
]
}
Shows a payment transaction chargeback webhook.
{- "metadata": {
- "event_type": "payment.transaction.chargeback",
- "event_id": "7f1ff389-7792-4cc5-8ec5-cb2ed6e1f19c",
- "event_version": "v2",
- "occurred_at": "2024-01-22T12:00:00Z",
- "correlation_id": "2d1557e8-17c3-466c-924a-bbc3e91c2a02",
- "subject_account_id": "krn:partner:global:account:live:HGBY07TR",
- "recipient_account_id": "krn:partner:global:account:live:LWT2XJSE",
- "product_instance_id": "krn:partner:product:payment:ad71bc48-8a07-4919-a2c1-103dba3fc918",
- "webhook_id": "krn:partner:global:notification:webhook:120e5b7e-abcd-4def-8a90-dca726e639b5",
- "live": true
}, - "payload": {
- "payment_transaction_id": "krn:payment:us1:transaction:4b8b6350-6b72-42c5-b946-f088adcdc216",
- "payment_transaction_reference": "payment-transaction-reference-1234",
- "payment_dispute_id": "krn:payment:eu1:transaction:4b8b6350-6b72-42c5-b946-f088adcdc216:dispute:1",
- "payment_chargeback_id": "krn:payment:eu1:transaction:4b8b6350-6b72-42c5-b946-f088adcdc216:chargeback:1",
- "chargeback_amount": 5000,
- "chargeback_reason": "DISPUTE_ARBITRATION_LOST",
- "chargeback_at": "2024-01-02T13:00:00Z"
}
}
Webhook notification delivered when the payment transaction has been funded (important for non-guaranteed payment transactions).
object (WebhookMetadata) The metadata of the webhook event. validation-info: tbd | |
object (payment.funding.state-change.payload) The payload of a payment transaction chargeback webhook. validation-info: tbd |
Webhook accepted
Shows a payment funding pending webhook.
{- "metadata": {
- "event_type": "payment.funding.state-change.pending",
- "event_id": "7f1ff389-7792-4cc5-8ec5-cb2ed6e1f19c",
- "event_version": "v2",
- "occurred_at": "2024-01-12T13:00:00Z",
- "correlation_id": "2d1557e8-17c3-466c-924a-bbc3e91c2a02",
- "subject_account_id": "krn:partner:global:account:live:HGBY07TR",
- "recipient_account_id": "krn:partner:global:account:live:LWT2XJSE",
- "product_instance_id": "krn:partner:product:payment:ad71bc48-8a07-4919-a2c1-103dba3fc918",
- "webhook_id": "krn:partner:global:notification:webhook:120e5b7e-abcd-4def-8a90-dca726e639b5",
- "live": true
}, - "payload": {
- "payment_transaction_id": "krn:payment:us1:transaction:4b8b6350-6b72-42c5-b946-f088adcdc216",
- "payment_transaction_reference": "payment-transaction-reference-1234",
- "payment_funding": {
- "type": "NON_GUARANTEED",
- "state": "PENDING"
}
}
}
This API enables partners to effectively present Klarna as a payment method by including a header, subheader, badge, and payment button, ensuring a clear and flexible integration.
Klarna-Interoperability-Token | string (InteroperabilityToken) <= 8192 characters The interoperability token enables continuity of customer journey across domains and services. If you are an Acquiring Partner, you receive this token from your merchant. Example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaG9wcGluZ19zZXNzaW9uX2lkIjoia3JuOnNob3BwaW5nOmV1MTpzZXNzaW9uOjBlOTIyN2MwLTBjNDAtNDdkZi04YzEwLTQwMTRmYzFiZDJiZCIsInN0YXR1cyI6IlBBWU1FTlRfUFJFUEFSRUQiLCJ2ZXJzaW9uIjoxLCJjcmVhdGVkX2F0IjoiMjAyNC0wMS0wMVQxMjowMDowMFoiLCJ1cGRhdGVkX2F0IjoiMjAyNC0wMS0wMVQxMjowMDowMFoifQ.1y87kuEKnETy_UCHbTMXx1p4mViZE816okcVmfHFZoo |
Klarna-Customer-Token | string (CustomerToken) <= 1024 characters The customer token represents the tokenized customer and allows you to act on behalf of the customer. Example: krn:partner:us1:live:identity:customer-token:vVQGmYzlfsQ16dko3jcwY5lV8hBgKs9a validation-info: Validation on the length (max length 1024) and the format of the string. |
object Metadata about the integrator and originators of the request, serialized as a valid JSON, to improve troubleshooting. Read more here Example: integration_metadata=[object Object] | |
Partner-Correlation-Id | string <= 255 characters ^[A-Za-z0-9]+$ An optional alpha numerical String that the partner can use to correlate. This value will be returned in the response. |
Successful response
Bad Request, there was an error in the input of the request. The request can not be retried without modifications.
Unauthorized, the request was not authorized.
Not Found, the requested resource was not found.
Too Many Requests, the request was rate limited.
Internal Server Error, there was an unexpected error in the API.
Example request for Klarna payment presentation API.
{- "currency": "USD",
- "amount": 11800,
- "locale": "en-US"
}
Example response for Klarna payment presentation API.
{- "instruction": "SHOW_KLARNA",
- "payment_button": {
- "text": "Pay with Klarna"
}, - "descriptor": {
- "header": {
- "text": "Pay with Klarna"
}, - "subheader": {
- "short": {
- "text": "4 interest-free payments of $50."
}, - "enriched": {
- "text": "From $22/m or 4 interest-free payments.",
}
}, - "icon": {
- "badge_image_url": "https://s3.int.klarna.net/pre-purchase/library/global/images/badges/klarna_v2.svg",
- "rectangle_image_url": "https://s3.int.klarna.net/pre-purchase/library/global/images/badges/klarna_badge_rectangle.svg",
- "square_image_url": "https://s3.int.klarna.net/pre-purchase/library/global/images/badges/klarna_badge_square.svg",
- "alt": "Klarna"
}
}
}