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

How the Integration Works

Every integration method is built around an invoice: your system creates it, the customer pays it, and Trybit reports the result. Understanding this cycle helps you design payment processing on your side correctly — when to deliver goods, how to handle underpayment and how to reconcile data.

How the interaction works

Your platform → Trybit API → Trybit payment page or your interface (H2H) → customer → blockchain → POSTBACK to your server

  • Your platform — a website, app or Telegram bot where the customer places an order.

  • Trybit API — accepts invoice creation requests and returns payment data.

  • Payment page or your interface — where the customer sees the amount and payment details: the Trybit payment page or, with H2H, your own interface.

  • Blockchain — the network in which the customer's transaction is processed and confirmed.

  • POSTBACK — a notification Trybit sends to your server after the payment is confirmed.

How an invoice is paid

  1. Invoice creation. Your system sends an invoice creation request with the API KEY in the header, the SHOP ID, amount, currency and, if needed, your order number (order_id).

  2. Link or payment details. In response, Trybit returns the invoice number (INV) and a link to the payment page, or, with H2H, payment details to display in your interface.

  3. Payment. The customer selects a currency and network and sends a transfer from their wallet or exchange.

  4. Network confirmation. The transaction is confirmed in the blockchain. Timing depends on the network: for ERC20, TRC20, BSC (BEP20), TON, SOL, BASE, ARB and OP — from 30 seconds to 5 minutes; for LTC — from 2 to 10 minutes; for BTC — from 10 minutes to several hours.

  5. POSTBACK. Once the payment is confirmed, Trybit sends a POST request to the project's notification URL in the selected format — JSON or form-data.

  6. Status check. If needed, your system requests invoice information by INV number.

Invoice statuses

Status

Meaning

Created

The invoice has been issued and is awaiting payment

Paid

The payment has been credited in full

Partially paid

Less than the invoice amount was received

Overpaid

More than the invoice amount was received

Canceled

The invoice was not paid; it has expired

Learn more on the Invoice Statuses page in the Knowledge Base.

How payment scenarios differ

Scenario

Where the customer pays

What your system does

Payment page (API, CMS modules)

On the Trybit payment page

Creates an invoice, redirects the customer via the link and processes the POSTBACK

Host2Host (H2H)

In your interface, without redirection

Creates an invoice, displays the payment details and tracks the status via API and POSTBACK

HTML widget

In an embedded window on your website

Places ready-made code; POSTBACK only with the "HTML widget (with postback)" method

Static wallets

By transfer to a permanent address

Creates a wallet once and receives deposit notifications without creating new invoices

How to process a POSTBACK on your side

  1. Accept the POST request at the notification URL. Notifications are sent only to ports 443 and 80.

  2. Verify authenticity: the token parameter is a JWT signed with the project's SECRET KEY using the HS256 algorithm. The token is valid for 5 minutes from the moment it is sent, so the server time must be synchronized.

  3. Match the invoice number, amount and currency against the order data in your system.

  4. Process each invoice only once: if a notification for the same invoice_id arrives again, do not deliver the goods again.

  5. Return a response with code 200.

The delivery status of each notification is shown in the "Postback history" section of the dashboard, where the notification can also be resent. The section is located on the paid invoice page: "Payments" → the relevant invoice. Parameters and handler examples are available on the Automatic POSTBACK page.

How to reconcile invoice data

Before delivering goods or in case of discrepancies, request invoice information by INV number — a single request returns data for up to 100 invoices. The amount actually received, including overpayment, can also be checked in the "Payments" section of the dashboard.

Underpayment, overpayment and expired invoices

  • Underpayment — the invoice receives the "Partially paid" status. The customer can pay the remaining amount; you can confirm the invoice manually in the "Payments" section or set up auto-confirmation for small deviations in the "Fees" section of the project settings.

  • Overpayment — credited in full. Your system may display the original amount, since the invoice was created for it.

  • Expired invoice — if the payment is not confirmed before the invoice expires, it is not credited automatically. To have it credited, contact support with the INV number and TXID.

  • Repeat payment — a repeat payment for an already paid invoice is not credited automatically, only via support.

Learn more on the Invoice Payment Issues page.

Last updated

Was this helpful?