Skip to main content

Cancel payment

This operation can be used with any payment method, but only if it is in authorization_status=NEW.

In the case of payment method PAY_LATER, this method can also be used if authorization_status=AUTH_DONE and at the same time payment status=CUSTOMER_CREATION_IN_PROGRESS.

from tatrapayplus.client import TBPlusSDK

client = TBPlusSDK(
"your-client-id",
"your-client-secret"
)
payment_id = "b54afd37-5bb9-4080-9416-5ec450779087" # Retrieved from create payment intent
cancel_payment_response = client.cancel_payment(payment_id)