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, subscriptions, and on-demand usage.
Create a server-to-server payment request.
The payment request will have the state SUBMITTED
.
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.
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",
- "payment_amount": 1000,
- "config": {
}
}
{- "payment_request_id": "krn:payment:eu1:request:552603c0-fe8b-4ab1-aacb-41d55fafbdb4",
- "state": "SUBMITTED",
- "state_expires_at": "2024-01-01T15:00:00Z",
- "expires_at": "2024-01-02T13:00:00Z",
- "created_at": "2024-01-01T12:00:00Z",
- "updated_at": "2024-01-01T13:00:00Z",
- "payment_request": {
- "currency": "USD",
- "payment_amount": 1000,
- "config": {
}
}
}
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": "v1",
- "occurred_at": "2024-01-01T12:00:00Z",
- "correlation_id": "2d1557e8-17c3-466c-924a-bbc3e91c2a02",
- "account_id": "krn:partner:account:206bbb83-9b6e-46fa-940d-337153c04a58",
- "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_reference": "partner-payref-1234",
- "merchant_reference": "order-5678",
- "state": "SUBMITTED"
}
}
Allows you to read the state of a payment request.
Payment request object
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.
curl -i -X GET \ 'https://api-global.klarna.com/v1/payment/requests/{payment_request_id}' \ -H 'Authorization: YOUR_API_KEY_HERE' \ -H 'Klarna-Partner-Account: YOUR_API_KEY_HERE'
{- "payment_request_id": "krn:payment:eu1:request:552603c0-fe8b-4ab1-aacb-41d55fafbdb4",
- "state": "SUBMITTED",
- "state_expires_at": "2024-01-01T15:00:00Z",
- "expires_at": "2024-01-02T13:00:00Z",
- "created_at": "2024-01-01T12:00:00Z",
- "updated_at": "2024-01-01T13:00:00Z",
- "payment_request": {
- "currency": "USD",
- "payment_amount": 1000,
- "config": {
}
}
}
Allows you to update a payment request that is in the state SUBMITTED
.
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",
- "payment_amount": 2000,
- "payment_reference": "partner-payment-reference-12345",
- "merchant_reference": "merchant-order-9876",
- "line_items": [
- {
- "name": "Black fountain pen",
- "quantity": 2,
- "total_amount": 2000,
- "total_tax_amount": 0,
- "unit_price": 1000,
- "product_identifier": "3270220049012",
- "reference": "cart-item-1234"
}
], - "shipping": [
- {
- "recipient": {
- "given_name": "John",
- "family_name": "Doe",
- "email": "john.doe@example.com",
- "phone": "844-552-7621",
- "attention": "string"
}, - "address": {
- "street_address": "800 N. High St",
- "street_address2": "Ste. 400",
- "postal_code": "43215",
- "city": "Columbus",
- "region": "OH",
- "country": "US"
}
}
], - "buyer": {
- "given_name": "John",
- "family_name": "Doe",
- "email": "john.doe@example.com",
- "phone": "844-552-7621",
- "address": {
- "street_address": "800 N. High St",
- "street_address2": "Ste. 400",
- "postal_code": "43215",
- "city": "Columbus",
- "region": "OH",
- "country": "US"
}
},
}
{- "payment_request_id": "krn:payment:eu1:request:552603c0-fe8b-4ab1-aacb-41d55fafbdb4",
- "state": "SUBMITTED",
- "state_expires_at": "2024-01-01T15:00:00Z",
- "expires_at": "2024-01-02T13:00:00Z",
- "created_at": "2024-01-01T12:00:00Z",
- "updated_at": "2024-01-01T13:00:00Z",
- "payment_request": {
- "currency": "USD",
- "payment_amount": 1000,
- "config": {
}
}
}
To confirm a payment request you must provide the payment confirmation token returned after a successful payment flow.
This endpoint is idempotent and can be called multiple times with the same confirmation token, the same response will be returned.
Payment request authorized
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",
- "payment_amount": 2000,
- "payment_transaction_reference": "partner-transaction-reference-4567",
- "config": {
- "capture": false
}
}
Shows an authorized payment request
{- "payment_request_id": "krn:payment:eu1:request:552603c0-fe8b-4ab1-aacb-41d55fafbdb4",
- "state": "AUTHORIZED",
- "state_expires_at": "2024-01-01T15:00:00Z",
- "state_context": {
- "payment_transaction_id": "krn:payment:eu1:transaction:6debe89e-98c0-486e-b7a5-08a4f6df94b0",
- "payment_pricing": {
- "rate": {
- "fixed": 100,
- "variable": 1200000
}
}
}, - "expires_at": "2024-01-02T13:00:00Z",
- "created_at": "2024-01-01T12:00:00Z",
- "updated_at": "2024-01-01T13:00:00Z",
- "payment_request": {
- "currency": "USD",
- "payment_amount": 1000,
- "config": {
}
}
}
The payment request has been confirmed and the payment is authorized.
{- "metadata": {
- "event_type": "payment.request.state-change.authorized",
- "event_id": "d9f9b1a0-5b1a-4b0e-9b0a-9e9b1a0d5b1a",
- "event_version": "v1",
- "occurred_at": "2024-01-01T12:00:00Z",
- "correlation_id": "2d1557e8-17c3-466c-924a-bbc3e91c2a02",
- "account_id": "krn:partner:account:206bbb83-9b6e-46fa-940d-337153c04a58",
- "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_reference": "partner-payref-1234",
- "merchant_reference": "order-5678",
- "state": "AUTHORIZED",
- "previous_state": "PENDING_CONFIRMATION",
- "payment_Transaction_id": "krn:payment:eu1:transaction:6debe89e-98c0-486e-b7a5-08a4f6df94b0"
}
}
This cancels a payment request pending confirmation, it is only possible if the payment request has the state PENDING_CONFIRMATION
.
You may use this if you decide not to confirm a Payment Request that is pending confirmation.
The Payment Request itself will not be cancelled, and will revert to the state SUBMITTED
.
Confirmation cancelled
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.
curl -i -X DELETE \ 'https://api-global.klarna.com/v1/payment/confirmation-tokens/{payment_confirmation_token}' \ -H 'Authorization: YOUR_API_KEY_HERE' \ -H 'Klarna-Partner-Account: YOUR_API_KEY_HERE'
{- "payment_request_id": "krn:payment:eu1:request:552603c0-fe8b-4ab1-aacb-41d55fafbdb4",
- "state": "SUBMITTED",
- "state_expires_at": "2024-01-01T15:00:00Z",
- "expires_at": "2024-01-02T13:00:00Z",
- "created_at": "2024-01-01T12:00:00Z",
- "updated_at": "2024-01-01T13:00:00Z",
- "payment_request": {
- "currency": "USD",
- "payment_amount": 1000,
- "config": {
}
}
}
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": "v1",
- "occurred_at": "2024-01-01T12:00:00Z",
- "correlation_id": "2d1557e8-17c3-466c-924a-bbc3e91c2a02",
- "account_id": "krn:partner:account:206bbb83-9b6e-46fa-940d-337153c04a58",
- "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_reference": "partner-payref-1234",
- "merchant_reference": "order-5678",
- "state": "SUBMITTED"
}
}
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.
Payment Transaction has been successfully retrieved.
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.
curl -i -X GET \ 'https://api-global.klarna.com/v1/accounts/{account_id}/payment/transactions/{payment_transaction_id}' \ -H 'Authorization: YOUR_API_KEY_HERE' \ -H 'Klarna-Partner-Account: YOUR_API_KEY_HERE'
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",
- "payment_amount": 2100,
- "acquiring_channel": "ECOMMERCE",
- "merchant_reference": "merchant-order-reference-5678",
- "payment_transaction_reference": "payment-transaction-reference-1234",
- "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"
}
}
], - "captures": [ ],
- "refunds": [ ],
- "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,
- "payment_pricing": {
- "rate": {
- "fixed": 100,
- "variable": 1200000
}, - "details": {
- "price_plan_id": "krn:partner:global:pricing:payments:price-plan:2a3ced5d-270b-319d-7aa4-a4bcf3a2f4b6",
- "program_id": "krn:partner:global:pricing:payments:program:a5cd46f7e-573d-4b02-bab8-1f1c0e343291",
- "price_plan_rate": {
- "fixed": 100,
- "variable": 1200000,
- "price_cap": 3100000
}, - "country": "US",
- "merchant_category_code": "5111",
- "discount": {
- "fixed": 0,
- "variable": 0
}, - "penalty": {
- "fixed": 0,
- "variable": 0
}, - "price_cap_applied": false,
- "evaluated_at": "2024-01-01T13:00:00Z"
}, - "applicable_rate": {
- "fixed": {
- "amount": 100,
- "currency": "USD"
}, - "variable_fee": {
- "percentage": 120
}, - "unit": "CAPTURE"
}, - "evaluation_parameters": {
- "price_plan_id": "krn:partner:global:pricing:payments:price-plan:2a3ced5d-270b-319d-7aa4-a4bcf3a2f4b6",
- "program_id": "krn:partner:global:pricing:payments:program:a5cd46f7e-573d-4b02-bab8-1f1c0e343291",
- "country": "US",
- "merchant_category_code": "5111",
- "channel": "ECOMMERCE",
- "evaluated_at": "2024-01-01T13:00:00Z"
}
}
}
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 merchant_reference
. These fields are essential for aligning your internal records with Klarna's transaction records and ensuring accurate tracking and reconciliation.
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 merchant reference and payment transaction reference
{- "merchant_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",
- "currency": "USD",
- "payment_amount": 2100,
- "acquiring_channel": "ECOMMERCE",
- "merchant_reference": "new-merchant-order-reference-5678",
- "payment_transaction_reference": "new-payment-transaction-reference-1234",
- "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"
}
}
], - "captures": [ ],
- "refunds": [ ],
- "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,
- "payment_pricing": {
- "rate": {
- "fixed": 100,
- "variable": 1200000
}, - "details": {
- "price_plan_id": "krn:partner:global:pricing:payments:price-plan:2a3ced5d-270b-319d-7aa4-a4bcf3a2f4b6",
- "program_id": "krn:partner:global:pricing:payments:program:a5cd46f7e-573d-4b02-bab8-1f1c0e343291",
- "price_plan_rate": {
- "fixed": 100,
- "variable": 1200000,
- "price_cap": 3100000
}, - "country": "US",
- "merchant_category_code": "5111",
- "discount": {
- "fixed": 0,
- "variable": 0
}, - "penalty": {
- "fixed": 0,
- "variable": 0
}, - "price_cap_applied": false,
- "evaluated_at": "2024-01-01T13:00:00Z"
}, - "applicable_rate": {
- "fixed": {
- "amount": 100,
- "currency": "USD"
}, - "variable_fee": {
- "percentage": 120
}, - "unit": "CAPTURE"
}, - "evaluation_parameters": {
- "price_plan_id": "krn:partner:global:pricing:payments:price-plan:2a3ced5d-270b-319d-7aa4-a4bcf3a2f4b6",
- "program_id": "krn:partner:global:pricing:payments:program:a5cd46f7e-573d-4b02-bab8-1f1c0e343291",
- "country": "US",
- "merchant_category_code": "5111",
- "channel": "ECOMMERCE",
- "evaluated_at": "2024-01-01T13:00:00Z"
}
}
}
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.
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,
- "line_items": [
- {
- "name": "Oversized vintage trabant tee",
- "quantity": 2,
- "total_amount": 5000,
- "product_identifier": "1234567890"
}
]
}
Shows a successful payment capture response
{- "payment_capture_id": "krn:payment:eu1:transaction:bc42b6ff-b222-463c-b4b2-d8d6a82e0162:capture:1",
- "capture_amount": 5000,
- "capture_reference": "capture-reference-123",
- "captured_at": "2024-01-02T13:00:00Z",
- "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 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.
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,
- "refund_reference": "refund-reference-123",
- "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",
- "refund_amount": 5000,
- "refund_reference": "refund-reference-123",
- "refunded_at": "2024-01-02T13:00:00Z",
- "line_items": [
- {
- "name": "Oversized vintage trabant tee",
- "quantity": 2,
- "total_amount": 5000,
- "product_identifier": "1234567890"
}
]
}
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.
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.
curl -i -X POST \ 'https://api-global.klarna.com/v1/accounts/{account_id}/payment/transactions/{payment_transaction_id}/void' \ -H 'Authorization: YOUR_API_KEY_HERE' \ -H 'Klarna-Partner-Account: YOUR_API_KEY_HERE'
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",
- "currency": "EUR",
- "payment_amount": 15000,
- "acquiring_channel": "ECOMMERCE",
- "merchant_reference": "merchant-order-reference-5678",
- "payment_transaction_reference": "payment-transaction-reference-1234",
- "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"
}
}
], - "captures": [
- {
- "payment_capture_id": "krn:payment:eu1:transaction:bc42b6ff-b222-463c-b4b2-d8d6a82e0162:capture:1",
- "capture_amount": 5000,
- "capture_reference": "capture-reference-123",
- "captured_at": "2024-01-02T13:00:00Z",
- "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"
}
}
]
}
], - "refunds": [ ],
- "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,
- "payment_pricing": {
- "rate": {
- "fixed": 100,
- "variable": 1200000
}, - "details": {
- "price_plan_id": "krn:partner:global:pricing:payments:price-plan:2a3ced5d-270b-319d-7aa4-a4bcf3a2f4b6",
- "program_id": "krn:partner:global:pricing:payments:program:a5cd46f7e-573d-4b02-bab8-1f1c0e343291",
- "price_plan_rate": {
- "fixed": 100,
- "variable": 1200000,
- "price_cap": 3100000
}, - "country": "US",
- "merchant_category_code": "5111",
- "discount": {
- "fixed": 0,
- "variable": 0
}, - "penalty": {
- "fixed": 0,
- "variable": 0
}, - "price_cap_applied": false,
- "evaluated_at": "2024-01-01T13:00:00Z"
}, - "applicable_rate": {
- "fixed": {
- "amount": 100,
- "currency": "USD"
}, - "variable_fee": {
- "percentage": 120
}, - "unit": "CAPTURE"
}, - "evaluation_parameters": {
- "price_plan_id": "krn:partner:global:pricing:payments:price-plan:2a3ced5d-270b-319d-7aa4-a4bcf3a2f4b6",
- "program_id": "krn:partner:global:pricing:payments:program:a5cd46f7e-573d-4b02-bab8-1f1c0e343291",
- "country": "US",
- "merchant_category_code": "5111",
- "channel": "ECOMMERCE",
- "evaluated_at": "2024-01-01T13:00:00Z"
}
}
}
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.
Payment Capture has been successfully retrieved.
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.
curl -i -X GET \ 'https://api-global.klarna.com/v1/accounts/{account_id}/payment/captures/{payment_capture_id}' \ -H 'Authorization: YOUR_API_KEY_HERE' \ -H 'Klarna-Partner-Account: YOUR_API_KEY_HERE'
Shows a successful payment capture response
{- "payment_capture_id": "krn:payment:eu1:transaction:bc42b6ff-b222-463c-b4b2-d8d6a82e0162:capture:1",
- "capture_amount": 5000,
- "capture_reference": "capture-reference-123",
- "captured_at": "2024-01-02T13:00:00Z",
- "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.
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,
- "refund_reference": "refund-reference-123",
- "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",
- "refund_amount": 5000,
- "refund_reference": "refund-reference-123",
- "refunded_at": "2024-01-02T13:00:00Z",
- "line_items": [
- {
- "name": "Oversized vintage trabant tee",
- "quantity": 2,
- "total_amount": 5000,
- "product_identifier": "1234567890"
}
]
}
Request to retrieve the details of a payment refund. A payment refund encapsulates crucial details such as the refund amount and line items.
Payment refund has been successfully retrieved.
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.
curl -i -X GET \ 'https://api-global.klarna.com/v1/accounts/{account_id}/payment/refunds/{payment_refund_id}' \ -H 'Authorization: YOUR_API_KEY_HERE' \ -H 'Klarna-Partner-Account: YOUR_API_KEY_HERE'
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",
- "refund_amount": 5000,
- "refund_reference": "refund-reference-123",
- "refunded_at": "2024-01-02T13:00:00Z",
- "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.
Payment chargeback has been successfully retrieved.
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.
curl -i -X GET \ 'https://api-global.klarna.com/v1/accounts/{account_id}/payment/chargebacks/{payment_chargeback_id}' \ -H 'Authorization: YOUR_API_KEY_HERE' \ -H 'Klarna-Partner-Account: YOUR_API_KEY_HERE'
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_MERCHANT_LOSS",
- "chargeback_at": "2024-01-02T13:00:00Z",
- "line_items": [
- {
- "name": "Oversized vintage trabant tee",
- "quantity": 2,
- "total_amount": 5000,
- "product_identifier": "1234567890"
}
]
}