Use the Klarna payments API to cancel an authorization and remove any customer debts gotten during the payment session.
When a customer won't complete a purchase or you won't use the authorization token immediately, you can cancel the authorization. This action clears the customer's debt.
To cancel an authorization, send a DELETE
request with an empty request body to the {apiUrl}/payments/v1/authorizations/{authorizationToken}
endpoint. Provide the authorization token you got from the authorize()
call as an {authorizationToken
} parameter.
Canceling an authorization might impact our credit assessment when attempting to generate a new one.
In response to your call, you receive a 204
status code corresponding to a successful but empty response.
If the authorization token in your request is invalid, you get an error response. Ensure the authorization_token
value you provided is correctly formatted and corresponds to an authorization that has not expired.