You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

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 Payment ID in the body of Request
  6. Your application is responsible to call Paygate to fetch the status of the payment, using Payment ID
  7. Paygate redirects client back to Merchant Return URL


Sequence diagram


Synchronous payment

These payments receive final response synchronously, is 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. Payment ID
    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 Payment ID 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. Payment ID is in the body of Request
  2. Your application calls Paygate and fetches the status of the payment, using Payment ID


  • No labels