Paygate 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 Paygate.


In Paygate REST API these payments are handled following way:

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


Sequence diagram


Synchronous payment

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


In Paygate REST API these payments are handled following way:

  1. Your application calls Paygate, in Body of Request is defined payment method
  2. Paygate 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, Paygate 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 Paygate REST API Webhooks are handled following way:

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



  • No labels