In the following document we will provide some example flows for a generic Payment Provider, called
In order to perform a payment we make an
HTTP POST on
http://payment-gateway-manager/generic-provider/credit-cards/pay, for example
If the credit card requires
3DS (3D Secure) the payment reply will return
result. The actual redirect URL can be found in
A physical user will be required to enter a
3DS code through the
redirectToUrl web interface to allow the transaction to progress.
If the credit card does not require
3DS, a positive reply will be similar to:
At this point the credit card transaction has been performed on the
When the transaction result is known by the
generic-provider, the latter may notify the
Payment Gateway Manager through the
HTTP GET on
This call will contain information allowing to identify the transaction.
The Payment Gateway Manager can use this information to check the transaction status, depending on the provider.
Once the check has been performed, the PGM can notify the result to an external service, as specified by the
PAYMENT_CALLBACK_URL environment variable.
Considering the above example, the notification may include a body as follows:
The transaction can be refund by calling
HTTP POST on
http://payment-gateway-manager/generic-provider/credit-cards/refund, using as JSON body:
If the reply returns
200 as HTTP Status code, the refund has been performed correctly.