For the complete documentation index, see llms.txt. This page is also available as Markdown.

Buy Button Sessions

Sessions created when a customer clicks a buy button

Create a buy button session

post
/buy-button/sessions

Creates a new payment session when a customer clicks a buy button on the merchant's website. The orderRef must be unique per transaction. Returns the session with the associated conversion code for the payment portal.

Roles: SuperAdmin, SimpleUser, Service

Authorizations
AuthorizationstringRequired

JWT token obtained from /auth/login or /auth/login/manager. Include as Authorization: Bearer <token>.

Body
buttonstringRequired

Buy button ID

orderRefstring · min: 6 · max: 100Required

Merchant unique order reference — must be unique per transaction

conversionCodestringOptional

Existing conversion code (if resuming a session)

callbackUrlstringOptional

Webhook URL called when payment completes

cancelUrlstring · max: 256Optional

Redirect URL on payment cancellation

returnUrlstring · max: 256Optional

Redirect URL after successful payment

priceanyOptional

Session-specific price (string or number)

currencystringOptional
buttonNamestringOptional
Responses
200

Session created

application/json
successbooleanOptional

Whether the request succeeded

statusintegerOptional

HTTP status code

post/buy-button/sessions
POST /api/next/buy-button/sessions HTTP/1.1
Host: api.lyzi.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 282

{
  "button": "text",
  "orderRef": "text",
  "conversionCode": "text",
  "callbackUrl": "text",
  "cancelUrl": "text",
  "returnUrl": "text",
  "price": null,
  "currency": "text",
  "buttonName": "text",
  "goods": {
    "goodsName": "text",
    "goodsType": "01",
    "goodsCategory": "0000",
    "goodsDetail": "text",
    "goodsQuantity": "text"
  }
}
{
  "success": true,
  "status": 1,
  "data": {
    "_id": "text",
    "button": "text",
    "buttonName": "text",
    "orderRef": "text",
    "conversionCode": "text",
    "callbackUrl": "text",
    "cancelUrl": "text",
    "returnUrl": "text",
    "price": null,
    "currency": "text",
    "goods": {
      "goodsName": "text",
      "goodsType": "01",
      "goodsCategory": "0000",
      "goodsDetail": "text",
      "goodsQuantity": "text"
    },
    "conversion": {
      "_id": "text",
      "code": "text",
      "shortCode": "text",
      "fromAmount": "text",
      "toAmount": "text",
      "fromAsset": "EUR",
      "toAsset": "USDC",
      "status": "INITIAL",
      "paymentChannel": "binance",
      "webhookUrl": "text",
      "alias": "text",
      "goods": {
        "goodsName": "text",
        "goodsType": "01",
        "goodsCategory": "0000",
        "goodsDetail": "text",
        "goodsQuantity": "text"
      },
      "createdAt": "2026-01-01T00:00:00.000Z",
      "updatedAt": "2026-01-01T00:00:00.000Z"
    }
  }
}

Get a session by ID

get
/buy-button/sessions/{id}

Returns the buy button session with its current conversion/order status.

Roles: SuperAdmin, Manager, SimpleUser, SuperManager, Service

Authorizations
AuthorizationstringRequired

JWT token obtained from /auth/login or /auth/login/manager. Include as Authorization: Bearer <token>.

Path parameters
idstringRequired

Session ID

Responses
200

Session details including current conversion status

application/json
successbooleanOptional

Whether the request succeeded

statusintegerOptional

HTTP status code

get/buy-button/sessions/{id}
GET /api/next/buy-button/sessions/{id} HTTP/1.1
Host: api.lyzi.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "success": true,
  "status": 1,
  "data": {
    "_id": "text",
    "button": "text",
    "buttonName": "text",
    "orderRef": "text",
    "conversionCode": "text",
    "callbackUrl": "text",
    "cancelUrl": "text",
    "returnUrl": "text",
    "price": null,
    "currency": "text",
    "goods": {
      "goodsName": "text",
      "goodsType": "01",
      "goodsCategory": "0000",
      "goodsDetail": "text",
      "goodsQuantity": "text"
    },
    "conversion": {
      "_id": "text",
      "code": "text",
      "shortCode": "text",
      "fromAmount": "text",
      "toAmount": "text",
      "fromAsset": "EUR",
      "toAsset": "USDC",
      "status": "INITIAL",
      "paymentChannel": "binance",
      "webhookUrl": "text",
      "alias": "text",
      "goods": {
        "goodsName": "text",
        "goodsType": "01",
        "goodsCategory": "0000",
        "goodsDetail": "text",
        "goodsQuantity": "text"
      },
      "createdAt": "2026-01-01T00:00:00.000Z",
      "updatedAt": "2026-01-01T00:00:00.000Z"
    }
  }
}

Delete a session

delete
/buy-button/sessions/{id}

Deletes a buy button session. If an active order is associated, it will also be cancelled.

Roles: SuperAdmin, SimpleUser, Service

Authorizations
AuthorizationstringRequired

JWT token obtained from /auth/login or /auth/login/manager. Include as Authorization: Bearer <token>.

Path parameters
idstringRequired

Session ID

Responses
200

Session deleted

application/json
successbooleanOptional

Whether the request succeeded

statusintegerOptional

HTTP status code

dataanyOptional

Response payload

delete/buy-button/sessions/{id}
DELETE /api/next/buy-button/sessions/{id} HTTP/1.1
Host: api.lyzi.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "success": true,
  "status": 1,
  "data": null
}

Get session by conversion code

get
/buy-button/sessions/conversion/{code}

Retrieves the buy button session associated with a given payment order code, including the current conversion status.

Roles: SuperAdmin, Manager, SimpleUser, SuperManager, Service

Authorizations
AuthorizationstringRequired

JWT token obtained from /auth/login or /auth/login/manager. Include as Authorization: Bearer <token>.

Path parameters
codestringRequired

Order code from /confirm_conversion/request

Responses
200

Session details with conversion status

application/json
successbooleanOptional

Whether the request succeeded

statusintegerOptional

HTTP status code

get/buy-button/sessions/conversion/{code}
GET /api/next/buy-button/sessions/conversion/{code} HTTP/1.1
Host: api.lyzi.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "success": true,
  "status": 1,
  "data": {
    "_id": "text",
    "button": "text",
    "buttonName": "text",
    "orderRef": "text",
    "conversionCode": "text",
    "callbackUrl": "text",
    "cancelUrl": "text",
    "returnUrl": "text",
    "price": null,
    "currency": "text",
    "goods": {
      "goodsName": "text",
      "goodsType": "01",
      "goodsCategory": "0000",
      "goodsDetail": "text",
      "goodsQuantity": "text"
    },
    "conversion": {
      "_id": "text",
      "code": "text",
      "shortCode": "text",
      "fromAmount": "text",
      "toAmount": "text",
      "fromAsset": "EUR",
      "toAsset": "USDC",
      "status": "INITIAL",
      "paymentChannel": "binance",
      "webhookUrl": "text",
      "alias": "text",
      "goods": {
        "goodsName": "text",
        "goodsType": "01",
        "goodsCategory": "0000",
        "goodsDetail": "text",
        "goodsQuantity": "text"
      },
      "createdAt": "2026-01-01T00:00:00.000Z",
      "updatedAt": "2026-01-01T00:00:00.000Z"
    }
  }
}

Last updated