REST API uses 2 types of payment flows:

  • Asynchronous
  • Synchronous

Asynchronous payment

These payments receive final response asynchronously and you are responsible to fetch the final status from .


In REST API these payments are handled following way:

  1. Your application calls , in Body of Request are defined:
    1. Payment method
    2. Your Return URL (preferably containing ID to reference payment when will redirect to this URL)
    3. Webhook URL
  2. responds synchronously, in Body of Response is defined Redirection URL
  3. Your application is responsible to redirect browser to Redirection URL
  4. receives response from 3rd party payment method with result of payment
  5. calls your Webhook URL with just PaymentID in the body of request
  6. Your application is responsible to call to fetch the status of the payment, using PaymentID
  7. redirects client back to Merchant Return URL


Sequence diagram


Synchronous payment

These payments receive final response synchronously in response to initial Request.


In REST API these payments are handled following way:

  1. Your application calls , in Body of Request is defined payment method
  2. responds synchronously, in Body of Response are defined:
    1. PaymentID
    2. Status


Sequence diagram


Subsequent actions

After the initial payment is created, there is set of possible actions that can be performed on the payment:

  • Reversal
  • Capture
  • Refund (Credit)

All of these subsequent actions have synchronous flow.


Webhooks

For payment methods with asynchronous flow or any updates on the payment status, sends notifications to your defined Webhook URL.

For security purposes, Webhook contains only non sensitive PaymentID and your application is responsible to fetch the status of payment by actively calling the API.


In REST API Webhooks are handled following way:

  1. calls your Webhook URL
    1. PaymentID is in the body of request
  2. Your application calls and fetches the status of the payment using PaymentID