This page outlines the integration process for initiating payments using a server and client. The integration steps involve initiating a payment, redirecting the buyer to the payment page, the buyer making the payment, and retrieving the payment result.
To start
This Integration involves three areas :
- The server: used to initiate the payment by calling the API.
- The client: used to open the payment session to make the payment request and payment.
- Webhook server: used to retrieve notifications, in particular payment results.
Prerequisites
Before starting, make sur that you have this informations :
- API key.
- Obtain a merchant id.
- configure the webook server.
The integration steps
Please follow the integration for redirection web payment :
- From your serverand before initiate a payment with declare the API library and dev block :
More informations.
<html> <head> <script src="https://homologation-payment.cdn.payline.com/cdn/scripts/widget-min.js"></script> </head> <body> <div id="PaylineWidget" data-token="the token obtained in Session Response" data-template="column" data-embeddedredirectionallowed="false" /> </body> </html>
- Initiate a payment with /sessions
Retrieve the redirectURL in the response and redirect your buyer on it. - The buyer makes the payment.
- Retrieve the result with /sessions