Utilize Payment Transaction API to retrieve and update transactions seamlessly, ensuring proper handling across all transaction states.
At any point in the payment transaction lifecycle you can use the Klarna Transactions API to retrieve detailed information about a payment transaction. You are also able to use the API to update the transaction with additional details such as payment amount, Partner references and shipping addresses, as long as the payment transaction is not expired, completed or closed.
This request returns essential transaction details such as the payment amount, currency, line items, customer, shipping, pricing information and the state of the Payment Transaction. Read the payment transaction directly by sending a GET
request to /v2/accounts/{account_id}/payment/transactions/{payment_transaction_id .
Additional information on API requests and responses are available within the API specifications.
Support for non-guaranteed transactions will be added in next releases.
The majority of payment solutions presented by Klarna are “guaranteed”, meaning Klarna ensures payment will be made to Klarna Partner regardless of the customer's actions provided the Klarna Partner adheres to Klarna’s terms and conditions. Klarna assumes much of the customer risk inherent in the transaction.
Non-guaranteed payments are transactions where the risk if the customer fails to pay falls to the Partner. Klarna does not cover the Partner for any losses due to non-payment by the customer. These are indicated in the parameter payment_funding.type
. For transactions where the returned type
is NON_GUARANTEED
, the object payment_funding
in response to the Confirm Payment Request along with the details of the Payment transaction becomes relevant.
"payment_funding": {
"type": "GUARANTEED | NON_GUARANTEED"
"state": "PENDING | FUNDED | EXPIRED"
}
This object helps to communicate the status of payment for those transactions where the risk profile falls outside of Klarna’s guaranteed payment.
Details of the possible payment_funding.states
and expected action are outlined below:
State | Definition | Expected action |
---|---|---|
PENDING | The customer has completed the authorization flow but the funds have not yet been confirmed by Klarna. | The transaction is not funded, and Partners should be encouraged to withhold fulfillment until the state has been updated to FUNDED .Any transaction fulfilled while in this state may be subject to chargeback if Klarna is unable to retrieve funds from the customer. |
FUNDED | The Klarna Partner should consider the transaction as "paid". For guaranteed payments, this means Klarna will cover the amount of the transaction toward the Klarna Partner regardless of the actions of the customer.For non-guaranteed payments, this means the customer themselves has covered the debt towards Klarna and Klarna has confirmed the funds. The transaction should be captured on fulfillment towards the end customer. | |
EXPIRED | Klarna has not received the customer’s funds for a non-guaranteed payment transaction after a specific period of time (which varies on the selected payment option). | Partners should stop or cancel the fulfillment of this payment transaction. |
The Klarna Partner will be informed about the transition from "PENDING" to "FUNDED" as well as the transition from PENDING
to EXPIRED
with a payment.funding.state-change
webhook.
Sample payload for payment.funding.state-change
event
{
"metadata": {
...
},
"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": "FUNDED"
Consult the API reference for a complete description of the response body parameters.
The operation should be performed to retrieve the details of a payment chargeback. A payment chargeback encapsulates crucial details, such as the chargeback amount and the chargeback reason which explains why Klarna decided to reverse the transaction.
The possible value for chargeback reason are the following:
Please note that you can also access this information through the read payment transaction endpoint. However, if you are specifically interested in reading the chargeback, you can use this endpoint.
Additional details and examples available within API specifications.
Whenever there is a dispute, where arbitration rules in favor of the customer, Klarna will trigger a payment transaction chargeback webhook.
The payment.transaction.chargeback
event enables you to track successful payment chargeback when dispute arbitration is lost or non-guaranteed payment is defaulted.
This operation should be performed when there is a need to change either the payment_transaction_reference
or the purchase_reference
. The purchase_reference
stores the customer-facing transaction identifier, displayed on the Klarna app and other customer touchpoints. The payment_transaction_reference
references the payment or equivalent resource created on your side and is exposed in Payment transaction webhooks for correlating your resource with the Klarna Payment transaction. These fields are essential for aligning your internal records with Klarna’s transaction records and ensuring accurate tracking and reconciliation.
Consult the API reference for a complete description of the response body parameters.
This operation should be performed when the payment_amount
or line_items
are changed.
This operation may only be performed:
While lowering the authorization amount does not trigger a risk assessment, reauthorizing with higher amount or line items does trigger a second fraud assessment, which may be rejected. which may be rejected. This action may not be performed more than 200 times. Exceeding this will result in a 403
response.
This operation should be performed when the shipping information is changed. Reauthorizing with updated shipping details is essential due to the following reasons:
Note that this action triggers a second fraud assessment, which may be rejected. This action may not be performed more than 200 times. Exceeding this will result in a 403 response.
For more information on reauthorizing a payment transaction, refer to the API reference.
Whenever there is an update related to changes such as quantity adjustment or address modification, Klarna will trigger a payment transaction updated webhook to which you can subscribe to:
Event name | When |
---|---|
payment.request.updated | To track successful updates when there are changes to order details, such as quantity adjustments or address modifications, after an order is placed. |
This action should be taken when the existing authorization is nearing expiration and the payment cannot be completed within the current period. This approach ensures there is enough time to finalize the payment transaction without complications. Be aware that a payment transaction is considered CLOSED 7 days after its expiration and cannot be updated thereafter.
Note that this action triggers a second fraud assessment, which may be rejected. This action may not be performed more than 200 times. Exceeding this will result in a 403 response.
When extending the authorization period, specify the number of days using the extension_days
parameter, with a maximum extension of 180 days. It is crucial to remember that the total authorization period for a payment transaction cannot exceed 360 days from its creation date. Any attempt to extend beyond this limit will result in rejection.
Consult the API reference for a complete description of the response body parameters.