DEVELOPER GUIDE
How to integrate

Whitelabel Initiation

5min

Whitelabel application customization

Klavi payment whitelabel application support certain customization, such as font and its size, page style, title and other information. please reach out to us at [email protected].

Get a starting payment url

First of all, you need to get a starting adapter url by calling /whitelabel. Then use this adapter url to redirect the user to input payment data, and to checkout at last.

NOTE: You should always call /whitelabel on your backend service for security reasons.

Curl request example:

Curl


Response example:

JSON


Redirect user to payment url

Once you receive response from /whitelabel, redirect the user to paymentURL. The user can complete the payment initiation flow on Klavi front page.

Redirect user back to redirect url

User inputs payment data and checkouts on Klavi front page. The front page loops to get status of payment initiation.

Once the front page receives the status of successful payment initiation, it redirects the user to the redirectUrl which was sent in the /whitelabel request. Once receives the status of error payment initiation, it redirects user to the redirectURL.

Check the status of the payment initiation

Once your system redirects user to adapterURL, the user completes the payment initiation flow totally in Klavi front page environment.

But your system can check the status of the payment initiation by looping to call /payments/:id/status every few seconds. The id property was included in the response at /whitelabel endpoint.

In order for your system to better track user payment initiation, the externalId proprety is advised in the request payload at /whitelabel endpoint.

Flows

The user journey is as follows:

Document image