3 steps are required for integrating a payment form on the merchant website. The following diagram presents the interactions between the different actors at each of these stages:
Before displaying a new payment form on the merchant website, you must generate the formToken.
In order to create a formToken, you must call the Charge/CreatePayment REST Web Service via your servers:
|1||Call to the Charge/CreatePayment REST Web Service via merchant servers.|
|2||Reception of the result containing the formToken.|
For a dynamic website (using Angular, React, Vue.js, etc.), the concept is slightly different: see Single Page Checkout).
Once the form is displayed, the buyer can enter their bank details. If the payment is rejected, the buyer stays on the merchant website. If the payment is accepted, the transaction details are sent to the merchant server.
|6||Once the transaction has been processed, we make a call via our servers to the URL that you have defined. The complete transaction object will be sent to allow you to update your information system before the browser return. it is the IPN (Instant Payment Notification).|
POST parameters contain only minimal information to check the transaction status. All the information related to the transaction is sent via a server to server call, also called Instant Payment Notification (or IPN).
Processing the IPN allows you to update your information system more securely and guarantees that you will not lose any payments if the buyer loses their Internet connection. For more information, see the article dedicated to the IPN: Ipn: Presentation
After this theoretical part, it is time to move on to the practical steps: Creating a formToken