What Is the Payment Agent?
The Payment Agent is a multi-step conversational workflow built into your BizNode's Telegram bot.
When a customer types /pay, the bot guides them through a fully automated payment journey
using Telegram's native inline keyboard buttons — no web redirects, no third-party checkout forms.
As the business owner, you configure your services and payment account credentials once in the BizNode dashboard. From that point, your bot handles everything: presenting services, detecting the customer's region, showing localised payment methods, generating payment links or UPI QR codes, collecting the transaction reference, and notifying you for final approval.
🌟 Why This Matters
Most payment flows send customers to a separate website. That friction kills conversions. BizNode completes the entire payment journey inside Telegram — where your customers already are, already trust, and already check dozens of times a day.
The Customer Experience — Inside Telegram
Here is exactly what a customer sees when they type /pay to your BizNode bot:
Choose what you'd like to purchase:
We'll show the best payment options for your region.
Amount: ₹8,300 (INR)
₹8,300 INR · via UPI
Pay to: business@paytm
Name: YourBusiness
Reference: BN-20260307-A4F2
Or tap below to open your UPI app directly:
upi://pay?pa=business@paytm&pn=YourBusiness&am=8300&cu=INR
Reference: BN-20260307-A4F2
UTR: 426738291045
We'll verify and confirm within a few hours. You'll receive a message here. Thank you! 🙏
Meanwhile, you receive a Telegram notification with the payment details and inline Confirm Received / Reject buttons. One tap — the customer is notified instantly.
Payment Flow — Step by Step
22 Built-In Payment Providers — Global Coverage
BizNode ships with 22 pre-built payment provider integrations, organised by region. The bot automatically filters the list to show only methods relevant to the customer's location. You simply configure your account credentials in the dashboard once — no code required.
🔄 UPI Deep Links — The Indian Payment Revolution
For Indian customers, BizNode generates UPI deep links that open the customer's
preferred UPI app (GPay, PhonePe, Paytm, BHIM) directly with the amount and payee pre-filled.
The format: upi://pay?pa={upi_id}&pn={name}&am={amount}&cu=INR&tn={reference}.
One tap — the payment app opens. The customer confirms. Done.
No payment gateway fees. No integration complexity. Pure P2P UPI.
💳 Stripe & PayPal — Global Card Payments
For international customers, BizNode generates a Stripe Payment Link or a PayPal.me link with the exact amount pre-filled. Your customer gets a direct URL inside Telegram — they tap, pay by card, return to Telegram and submit their confirmation. Supports all major currencies. No monthly gateway fees for low volumes.
Escrow Payments — Trust-First Commerce
The next evolution of BizNode payments. Escrow mode lets customers pay into a held account before a service is delivered. Once you mark the service as delivered, the funds are released. If there's a dispute, the 1BZ DAO arbitration layer steps in.
This is transformative for freelancers, consultants, agencies, and marketplace operators who need to offer buyers the confidence of protection while still getting paid fast. No more chasing invoices. No more chargebacks. Smart contracts handle the rules.
Technical Architecture
The Payment Agent is built on BizNode's Workflow Engine — a stateful multi-step execution framework that was extended with six new payment-specific step types. All state is persisted in SQLite (or MySQL/PostgreSQL) so conversations survive bot restarts.
New Database Tables
📚 services
- name, description, price, currency
- duration (e.g. "1 month", "One-time")
- sort_order — controls display order
- is_active — enable/disable per service
💳 payment_accounts
- provider_key — links to built-in catalog
- display_name — shown to customers
- config_json — UPI ID, Stripe key, etc.
- regions — which regions see this method
📄 payment_requests
- reference_no — BN-YYYYMMDD-XXXX format
- telegram_id, customer_name, service
- amount, currency, provider_key
- status: pending → confirmed / rejected
- customer_utr — UTR/transaction ID submitted
⚙️ Workflow Engine Steps
- show_services — display service catalog
- show_regions — regional selector keyboard
- show_payment_methods — filtered by region
- generate_payment_link — builds provider link
- collect_utr — gather transaction reference
- notify_owner — Telegram notification + buttons
Telegram Bot Callback Handlers
Every inline keyboard button press routes through BizNode's callback dispatch system. The bot handles 8 payment-specific callback prefixes:
# Customer button callbacks — advance the active workflow pay_service:{id} → stores selected service, auto-advances to region step pay_region:{label} → stores region codes, auto-advances to payment methods pay_method:{account_id} → stores provider, auto-generates payment link pay_confirm:{reference} → jumps to collect_utr step, asks for UTR pay_other:{reference} → rewinds to payment methods (different method) pay_cancel:{reference} → marks payment cancelled, completes workflow # Owner button callbacks — received by the owner's Telegram owner_pay_confirm:{ref}:{customer_id} → confirms payment, notifies customer owner_pay_reject:{ref}:{customer_id} → rejects payment, notifies customer
UPI Deep Link Generation
# UPI — generates a deep link that opens any UPI app directly def build_payment_link(provider_key, config, amount, currency, ref, service_name): upi_id = config.get("upi_id", "") payee = config.get("payee_name", "BizNode") inr_amt = get_local_amount(amount, "IN") # convert USD → INR return ( f"upi://pay?pa={upi_id}&pn={payee}" f"&am={inr_amt}&cu=INR&tn={ref}" ) # Stripe — uses your pre-created Payment Link URL # PayPal — paypal.me/{username}/{amount} # Crypto — generates wallet address with amount # Bank — IBAN / account details formatted as text
Dashboard REST API — 11 New Endpoints
GET /api/payment-providers-catalog # 22 built-in providers GET /api/services # list your service catalog POST /api/services # add a service PUT /api/services/{id} # update a service DELETE /api/services/{id} # remove a service GET /api/payment-accounts # list configured providers POST /api/payment-accounts # add a payment account PUT /api/payment-accounts/{id} # update credentials DELETE /api/payment-accounts/{id} # remove provider GET /api/payment-requests # all payment requests (filterable) POST /api/payment-requests/{ref}/owner-action # confirm / reject
How to Configure Payment Collection
Create Your Service Catalog
Open the BizNode dashboard → 💳 Payments → Services tab. Add each service you offer: name, description, price, currency, and duration. Example: "SEO Audit — USD 299 — One-time". Services appear as keyboard buttons in Telegram.
Configure Payment Providers
Go to the Payment Providers tab. Browse the 22 built-in providers.
Click Configure on any provider — enter your UPI ID, Stripe Payment Link URL,
PayPal username, crypto wallet address, or bank details. Set the regions where each method
should appear (e.g. IN for UPI, * for global Stripe).
Create the /pay Workflow
Go to Menu Builder → Workflows → + New Workflow.
Set trigger command to /pay. Add steps in order:
show_services → show_regions → show_payment_methods →
generate_payment_link → collect_utr → notify_owner.
Save. Your bot is now a payment agent.
Add /pay to Your Bot Menu
In Menu Builder → Menu Items, add a menu item with
type Task, task code /pay, display name "Make a Payment".
Customers can find it in the /menu command, or type /pay directly.
Set Your Owner Telegram ID
In Setup, ensure OWNER_TELEGRAM_ID is set to your personal
Telegram user ID (not the bot's ID). This is where payment notifications are sent.
Get your ID by messaging @userinfobot on Telegram.
Monitor & Confirm in the Dashboard
All payment requests appear in 💳 Payments → Payment Requests. Filter by status: pending, customer_confirmed, confirmed, rejected, cancelled. Confirm or reject with one click — the customer is notified instantly via Telegram. You can also confirm directly from the Telegram notification sent to your ID.