Skip to main content

Process payment

After completing the operations in the TatraPayPlus service, the user will be redirected to the Redirect URL provided during payment initialization.

Redirect params

Path Parameters for Redirection Without a Technical Error

Path ParameterTypeRequired/OptionalDescription
paymentIdstringRequiredIdentifier of the payment instruction
paymentMethodstringRequiredCode of the selected payment method

Path Parameters for Redirection in Case of a Technical Error

Path ParameterTypeRequired/OptionalDescription
paymentIdstringRequiredIdentifier of the payment instruction
errorstringRequiredError code
errorIdstringRequiredUnique error identifier

Example

Success ✔️

https://theredirecturl.com/redirect?paymentId=e43f85a2-b21f-4ec2-b0a1-0e449d6972c7&paymentMethod=CARD_PAY

Error ❌️

https://theredirecturl.com/redirect?paymentId=e43f85a2-b21f-4ec2-b0a1-0e449d6972c7&error=FAILED&errorId=43ca30ec-2956-454c-9d1b-4bd2befee7c8

Retrieve payment status

Based on received GET params you should retrieve status of payment as following:

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
payment_status = client.get_payment_status(payment_id)
info
  • In sandbox mode, the payment status changes from PENDING to the target status after a short delay (usually 2–5 minutes).
  • In production mode, the payment status is usually already updated to the final status by the time the user is redirected. However, in some cases, it may still be PENDING for a short time due to processing delays.

The result includes a simpleStatus attribute, which simplifies the status of a payment into one of the following four values:

  • AUTHORIZED
  • CAPTURE
  • REJECTED
  • PENDING

The simpleStatus is determined according to the table below. If none of the conditions match, the status defaults to PENDING.

Payment MethodCAPTUREREJECTEDAUTHORIZED
QR_PAYACCCCANC, RJCT
BANK_TRANSFERACSC, ACCCCANC, RJCT
PAY_LATERLOAN_APPLICATION_FINISHED, LOAN_DISBURSEDCANCELED, EXPIRED
CARD_PAYOK, CBFAILPA
DIRECT_APIOK, CBFAIL

Your implementation should take the appropriate action based on the value of simple_status.

data attribute contains all the information based on structure described in API reference.

The response also includes saved card information (if the customer chooses to save their card details). More details on this feature can be found 💳 here 💳.

Periodical task

Some payments may be processed later. Therefore, you should periodically check the status of "pending" payments. We recommend setting up a scheduled task that retrieves all pending payments from your system. Using the saved payment_id with the get_payment_status method, you can obtain the current status and take the appropriate action in your system.

Recommended pooling rates based on age of orders:

Time RangePolling Frequency
First hourEvery 5 minutes
1 hour - 24 hoursEvery hour
After 24 hours5 times per day