3 steps are required for integrating a payment form on the merchant website:
- Initialization of the embedded form
- Display of the embedded form
- Verification of the transaction status and the end of payment
The following diagram presents the interactions between the different actors (embedded form, merchant server, payment gateway) at each of these stages:
Before displaying a new payment form on the merchant website, you must initialize the form by generating a formToken that summarizes all the payment related options.
In order to create a formToken, you must call the Charge/CreatePayment REST Web Service via your server:
|1||Call to the Charge/CreatePayment REST Web Service via merchant servers.|
|2||Reception of the result containing the formToken.|
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 specified by you. The complete Transaction object will be sent to allow you to update your information system before the browser return. The IPN (Instant Payment Notification).|
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