BOT-T

Connecting LirPay as a payment provider in BOT-T

This instruction describes the full procedure: registration in LirPay, project verification, issuance of API keys, configuration of the webhook URL, and entry of credentials on the BOT-T website.

Estimated time: 15 minutes·Prerequisite: a shop in BOT-T and a Telegram bot username ending with bot.

Overview

LirPay is included in the BOT-T payment catalog. Configuration is performed in two interfaces. In LirPay the merchant issues keys and sets the standard webhook URL to the BOT-T endpoint. On the BOT-T website the merchant enters those LirPay keys. LirPay does not use a separate BOT-T callback.

Mandatory steps

  1. 01Issue API keys with the scopes payments:read and payments:write.
  2. 02Set the webhook URL in LirPay Settings to the BOT-T endpoint.
  3. 03Enter the public key and the secret on the BOT-T website.
  1. 01

    The buyer pays for an item in the Telegram bot.

  2. 02

    BOT-T opens a LirPay checkout session.

  3. 03

    Funds are credited to the LirPay merchant balance.

  4. 04

    LirPay sends the standard payment.succeeded webhook to the URL configured in Settings.

01

Create a merchant account

Open LirPay and create a merchant account. Upon registration the system generates a 12-word seed phrase. The phrase is the sole authentication credential; LirPay does not issue an email password.

  1. 1Open lirpay.org/login and create a merchant account.
  2. 2Copy or write down all 12 words of the seed phrase.
  3. 3Confirm that the phrase is saved, then continue.

Registration requires acceptance of AML screening. Payout wallets may be configured after the project is approved.

https://lirpay.org/login

Save your seed phrase

This is your only login credential. We cannot recover it. Store it offline in a safe place.

1.ocean2.maple3.silver4.quiet5.river6.amber7.dusk8.petal9.north10.cedar11.vivid12.grove
CopyI saved it — verify
Screen 1 — registration: the seed phrase is generated here.

02

Create a project

Live checkout is bound to an approved project. For a Telegram shop select the project type “Telegram bot” and enter the bot username. The username must end with bot.

  1. 1Open Projects in the merchant interface.
  2. 2Select the project type “Telegram bot”.
  3. 3Enter the bot username and create the project.
https://lirpay.org/merchant/projects

Projects

New project

Create project

Shop name

Shop Bot

Project type

WebsiteTelegram bot

Bot username

@MyShopBot
Screen 2 — Projects: select Telegram bot and enter the username.

03

Confirm project ownership

A website project is verified by a DNS TXT record. A Telegram bot project is verified as follows: in @BotFather set the bot display name to the exact value shown in the dashboard, add the bot to the LirPay verification group, then start the check. After a successful check, wait for moderator approval.

  1. 1Copy the required bot display name from the project card.
  2. 2Set that exact name in @BotFather and add the bot to the verification group.
  3. 3Press “Check ownership” and wait for moderator approval.

Live checkout is unavailable until the project status is “approved”.

https://lirpay.org/merchant/projects

Ownership verification — Shop Bot

@MyShopBot

Pending
  1. 1

    In @BotFather, set the bot name (not username) to this exact value.

    LP-A1B2C3D4Copy
  2. 2

    Add the bot to the LirPay verification group, then start the check.

Check ownership
Screen 3 — ownership: set the display name, then join the verification group.

04

Issue API keys

In the merchant dashboard open Integrations → API keys and create a live key. For a test environment create a separate test key. Copy the secret immediately: it is displayed once and cannot be retrieved later.

  1. 1Open Integrations → API keys.
  2. 2Create a live key with payments:read and payments:write.
  3. 3Copy the public key and the secret immediately.

The key must include the following scopes:

  • payments:read — read payment and order status
  • payments:write — create checkout sessions

A test key does not credit the live balance. After issuance, the key pair is entered on the BOT-T website, not in LirPay Settings.

https://lirpay.org/merchant/integrations/api-keys

API keys

+ Live key

New key — copy the secret now

Copy the secret now. It will not be shown again.

Public key

lpk_live_a1b2c3d4e5f67890

Secret key

lsk_live_0123456789abcdef…

Scopes

payments:readpayments:write
Screen 4 — API keys: copy the secret once; scopes must include payments:read and payments:write.

05

Set the webhook URL

Open Settings and enter the BOT-T endpoint in the webhook URL field. LirPay sends the standard signed merchant webhook to this address after a live payment succeeds.

  1. 1Open Settings in the merchant interface.
  2. 2Paste the BOT-T URL into the webhook URL field.
  3. 3Save the form.

BOT-T webhook URL

Enter this address without modification. This is the ordinary merchant webhook, not a separate BOT-T callback.

Webhook URL

https://api.bot-t.com/payment/lirpay

Deliveries are signed with HMAC-SHA256 in the X-Lirpay-Signature header. Live notifications originate from 2.27.27.132. Test-mode webhooks are never retried.

https://lirpay.org/merchant/settings

Settings

Webhooks

Webhook URL

https://api.bot-t.com/payment/lirpay
Test webhookSave
Screen 5 — Settings: paste the BOT-T webhook URL into the webhook field.

06

Enter API keys on the BOT-T website

Open the BOT-T website, go to payment methods, and select LirPay. Enter the public key and the secret issued in LirPay for the corresponding environment (live or test). Save the form.

  1. 1Open payment methods on the BOT-T website.
  2. 2Select LirPay and paste the public key and the secret.
  3. 3Save the form for the matching environment (live or test).

The keys are entered only on bot-t.com. Do not paste them into LirPay Settings or any other LirPay form after issuance. BOT-T uses the keys to create checkout sessions.

https://bot-t.com

BOT-T

Payment methods

Catalog

LirPay

Catalog provider · live environment

Public key

lpk_live_a1b2c3d4e5f67890

Secret key

lsk_live_0123456789abcdef…
Save
Screen 6 — BOT-T website: paste the LirPay public key and secret here.

07

Verify the integration

Create a low-value item in the bot. Complete a payment with a test key first. Switch the BOT-T catalog to live keys before accepting customer payments.

  1. 1Create a low-value item in the Telegram bot.
  2. 2Complete a test payment with a test key.
  3. 3Switch BOT-T to live keys before accepting customer payments.
  • An underpaid order remains on the LirPay balance and does not emit a success webhook.
  • Test-mode webhooks are delivered once and are never retried.
  • Live webhooks are retried up to eight times until the endpoint returns HTTP 2xx.
https://lirpay.org/merchant/overview

Shop Bot

@MyShopBot

Approved

Mode

live

BOT-T

Catalog

After a successful test payment, switch the BOT-T catalog to live keys.

Screen 7 — ready: approved project and live keys are enough to sell.