Integration with API
Resources
Introduction
To accept a cryptocurrency payment using Lyzi, two methods are available:
A. Link the payment to a “Payment Button”
B. Link the payment to a collector / salespoint.
The philosophy of those two methods is to use:
A. Payment Button for online payments, in e-commerce websites, whereas
B. ”Payment link” is more meant to be used for a in-store payment.
That being said, there is no strict limitation about using one or the other.
Ideal for
eShop payments
Payment link for a salespoint
Requires:
A payment button
(from the API)
One salespoint and one collector are configured
Preliminary
To integrate Lyzi payment - in store or online - a “manager” account shall be created and approved by our compliance team (KYB process). Once this process is completed, the manager has full access to his backoffice, under https://admin.lyzi.io/. In there, the manager can create buy buttons, payment links, configure his salespoint, payment collectors and option cashier accounts.
For testing purposes, a sandbox environment is also available and can be explored under https://admin-dev.lyzi.io/. Here are shared credentials to test the integration:
User : manager-x@yopmail.com
Pass: Lyzi123,
Security
The following authorizations must be added in the header of the requests to Lyzi API:
The key and the secret can be found in the backoffice, in the “developer” section.
Return/callback URL
When integrating Lyzi payments, you need to handle two separate flows: front-end redirection for user experience, and back-end webhook for reliable transaction verification. Correctly distinguishing these ensures smooth UX and secure payment validation.
Front-end (redirection)
returnUrlandcancelUrlare client-side redirection URLs.Lyzi opens the appropriate URL in the user’s browser after the payment completes (success →
returnUrl, failure →cancelUrl).Use these only for UX changes and client-side confirmation.
Do not rely on them for final payment validation.
Back-end (webhook)
webhookUrlis the webhook endpoint. Lyzi sends a server-to-server POST to this URL with the transaction result.Your backend must accept and validate POST requests from Lyzi.
Combined behaviour
If only
webhookUrlis provided: Lyzi uses it as the webhook and will open it in the browser as a redirect (acts as return/cancel fallback).If
returnUrl/cancelUrlare provided: browser redirection uses those URLs. IfwebhookUrlis also provided Lyzi still sends the webhook POST towebhookUrl.
Always treat the webhook (callbackUrl) as the authoritative notification and validate the transaction via the Check Status endpoint on your server. Do not mark orders as paid based solely on front-end redirection or query parameters. Always confirm final status with the Check Status API.
A. Buy button
As mentioned in the introduction, this approach is recommended for integration in online stores or applications.
1. Create the buy button
Before integrating the Lyzi payment solution on your website or application, you shall create a “Payment Button” from your backoffice.
First, make sure that your account has been created and that the KYB is done and confirmed. If you don’t have an account, go to https://admin.lyzi.io/onboarding and complete all the information of your profile.
Then, let’s create a payment button. Go to the backoffice and find the buy button section:

Fill the information of the button, and create it.

As annoted in the picture, here are the information about the button:
Name : The name of the button for you to organize the created buttons. This is not published to the consumer.
Website URL : the website URL shown in the payment gate, to indicate to the consumer what website he is performing the payment for.
Webhook URL : The website for the redirection of the user after the payment (successfull or failed)
Name of the product : The name of the product that is being purchased. This is displayed in the payment gate to the consumer.
Note that most of this information can be and will be edited during the payment initialization, when doing the integration in your application.
Once created, you can select the button that has been created and click on “Display” :


2. Initiate the payment
In your application, we are going to use the buy button created in the previous section, customize its parameters and initiate the payment.
The simplest way to initiate a payment, based on this buy button, is to build the following URL, with the appropriate parameters :
And voilà 💫 Just by a couple of lines, the payment url can be built and the user can be redirected to the payment gate to complete the payment.
Alternatively, the SDK can also be used to have more coding tool to intiate the payment:
B. Direct payment
Preliminary
The direct payment is used to link a payment to a collector, which is related to a salespoint. Before initiating the payment, the ID of the collector must be found.
Make sure that a collector has been created. Using the API or the backoffice :
Collector creation using the backoffice


Collector creation using the API:
API calls
To create a collector, a salespoint must exist. Indeed, a collector is linked to a salespoint (you can see it as a cash register in a shop)
Salespoint creation:
Collector creation, linked to the salespoint :
The response of this call contains the collector ID that is required to request a payment
Collector ID
Once the collector is created, retrieve its ID :
The identifierin the response of this request shall be used in the field merchantIdentifier for of the request of the payment below.
Request command:
To initialize a payment using cryptocurrencies, the endpoint request shall be called:
Full reference : https://api-dev.lyzi.fr/docs/#api-Conversions-Request_conversion
Request body :
And voilà 💫 Just by a couple of lines, the payment url (paymentUrl from the response) can be retrieved and the user can be redirected to the payment gate to complete the payment.
Last updated