Operations related to authorizations
- cancel - Cancel an existing authorization
Use this API call to cancel/release an authorization. If the authorization_token
received during a Klarna Payments won’t be used to place an order immediately you could release the authorization.
Read more on Cancel an existing authorization.
import klarna
from klarna.models import operations
s = klarna.Klarna(
security=shared.Security(
api_key_auth="Bearer YOUR_BEARER_TOKEN_HERE",
),
)
req = operations.CancelAuthorizationRequest(
authorization_token='provident',
)
res = s.authorizations.cancel(req)
if res.status_code == 200:
# handle response