Klarna Direct

Void a Payment Transaction

Release the remaining authorization on a Payment Transaction when the payment is no longer intended to be fulfilled (for example, when the customer cancels the purchase or the product cannot be shipped).
Call voidPaymentTransactionAPI when the payment is no longer intended to be fulfilled. For example, when a customer cancels a purchase, or when the remaining authorization must be released because a product is unavailable for shipment.
The effects of voiding a Payment Transaction are illustrated in the diagram below:
flowchart LR A([Customer]) --> |Cancels order| B(Partner) B --> |Voids transaction| D(Klarna) D --> |Notification of cancellation| A

When to void

Void is permitted when:
  • The Payment Transaction is in the AUTHORIZED state.
  • The Payment Transaction has not been fully captured.
This action may not be performed more than 200 times. Exceeding this limit causes the void to be rejected. See Limitations for the full action limits.

Outcomes

The state a Payment Transaction transitions to after a void depends on whether any captures had been made:
  • No prior captures: the transaction transitions to CLOSED.
  • Prior captures exist: the transaction transitions to COMPLETED. The captured portion remains valid; only the remaining authorization is released.

Webhooks

Voiding a Payment Transaction triggers a state-change webhook event. Subscribe to these events by following the webhook registration guide.
Event nameWhen
payment.transaction.state-change.completedThe void was applied to a Payment Transaction with prior captures. The captured portion remains valid; the remaining authorization is released.
payment.transaction.state-change.closedThe void was applied to a Payment Transaction with no prior captures. The transaction reaches a definitive conclusion.
Related articles
Payment Transaction state definitions
Set up your webhooks