Buy Buttons
E-commerce payment button configuration
Returns all buy buttons configured by the authenticated merchant. Supports filtering by name and date range.
Roles: Manager, SuperManager
JWT token obtained from /auth/login or /auth/login/manager. Include as Authorization: Bearer <token>.
Filter start date (ISO format)
Filter end date (ISO format, required if startDate is set)
Filter by button name (partial match)
Buy button list
Whether the request succeeded
HTTP status code
Unauthorized
GET /api/next/buy-buttons HTTP/1.1
Host: api.lyzi.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"success": true,
"status": 1,
"data": [
{
"_id": "text",
"name": "text",
"websiteUrl": "https://example.com",
"itemRef": "text",
"callbackUrl": "text",
"price": 1,
"currency": "text",
"goods": {
"goodsName": "text",
"goodsType": "01",
"goodsCategory": "0000",
"goodsDetail": "text",
"goodsQuantity": "text"
},
"identifier": "text"
}
]
}Creates a new e-commerce buy button. After creation, embed the generated HTML snippet on your product page.
Roles: Manager, SuperManager
JWT token obtained from /auth/login or /auth/login/manager. Include as Authorization: Bearer <token>.
Internal name for the button
URL of the page where the button is embedded
Merchant's product reference
Webhook URL called when payment completes
Fixed price in the specified currency
Currency code (e.g. EUR, USD, CHF)
Buy button created
Whether the request succeeded
HTTP status code
Unauthorized
Validation error
POST /api/next/buy-buttons HTTP/1.1
Host: api.lyzi.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 255
{
"name": "Blue T-Shirt — Pay with Crypto",
"websiteUrl": "https://myshop.com/products/blue-tshirt",
"price": 29.99,
"currency": "EUR",
"callbackUrl": "https://myshop.com/webhooks/lyzi",
"goods": {
"goodsName": "Blue T-Shirt",
"goodsType": "01",
"goodsCategory": "3000"
}
}{
"success": true,
"status": 1,
"data": {
"_id": "text",
"name": "text",
"websiteUrl": "https://example.com",
"itemRef": "text",
"callbackUrl": "text",
"price": 1,
"currency": "text",
"goods": {
"goodsName": "text",
"goodsType": "01",
"goodsCategory": "0000",
"goodsDetail": "text",
"goodsQuantity": "text"
},
"identifier": "text"
}
}Returns details of a single buy button by ID.
Roles: SuperAdmin, Manager, SimpleUser, SuperManager, Service
JWT token obtained from /auth/login or /auth/login/manager. Include as Authorization: Bearer <token>.
Buy button details
Whether the request succeeded
HTTP status code
Unauthorized
Not found
GET /api/next/buy-buttons/{id} HTTP/1.1
Host: api.lyzi.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"success": true,
"status": 1,
"data": {
"_id": "text",
"name": "text",
"websiteUrl": "https://example.com",
"itemRef": "text",
"callbackUrl": "text",
"price": 1,
"currency": "text",
"goods": {
"goodsName": "text",
"goodsType": "01",
"goodsCategory": "0000",
"goodsDetail": "text",
"goodsQuantity": "text"
},
"identifier": "text"
}
}Updates one or more fields of a buy button.
Roles: Manager, SuperManager
JWT token obtained from /auth/login or /auth/login/manager. Include as Authorization: Bearer <token>.
HTML embed identifier
Buy button updated
Whether the request succeeded
HTTP status code
Unauthorized
PUT /api/next/buy-buttons/{id} HTTP/1.1
Host: api.lyzi.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 121
{
"name": "text",
"websiteUrl": "text",
"itemRef": "text",
"callbackUrl": "text",
"price": 1,
"currency": "text",
"identifier": "text"
}{
"success": true,
"status": 1,
"data": {
"_id": "text",
"name": "text",
"websiteUrl": "https://example.com",
"itemRef": "text",
"callbackUrl": "text",
"price": 1,
"currency": "text",
"goods": {
"goodsName": "text",
"goodsType": "01",
"goodsCategory": "0000",
"goodsDetail": "text",
"goodsQuantity": "text"
},
"identifier": "text"
}
}Permanently removes a buy button.
Roles: Manager, SuperManager
JWT token obtained from /auth/login or /auth/login/manager. Include as Authorization: Bearer <token>.
Buy button deleted
Whether the request succeeded
HTTP status code
Response payload
Unauthorized
DELETE /api/next/buy-buttons/{id} HTTP/1.1
Host: api.lyzi.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"success": true,
"status": 1,
"data": null
}Last updated