Skip to content

Integration modes

full_name (full name, up to 48 characters) and country (country of residence, a two-letter ISO 3166-1 code such as MX) are optional when creating an order, even when you send input_currency.

If either detail is missing, the API responds successfully with web_url and the remaining payment information, but omits address, payment_uri, and tag_memo. Missing payer details do not cause HTTP 400. The integrator must display the gateway link, or a QR encoding that link, so the customer can complete their details and continue payment.

With both valid payer details and a cryptocurrency, the API can provide blockchain data for direct payment. Choose the UI based on payment_uri, not on the presence of currency, amount, status, or expiry. Do not construct a blockchain address or crypto QR from other fields.

The merchant redirects the customer to B4bit Pay’s hosted gateway. This is the simplest flow to integrate: just a single backend call and a redirect.

The merchant preselects the currency before redirecting. If the name or residence is missing, the customer completes those details at the gateway before accessing blockchain payment.

1. GET /currencies → fetch available symbols
2. POST /orders/ → send expected_output_amount + input_currency + full_name + country + URLs
3. returned web_url → redirect the customer
4. webhook arrives on status change
Ventana de terminal
curl -X POST \
-H "X-Device-Id: $B4BIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"expected_output_amount": 2500.0,
"fiat": "MXN",
"input_currency": "USDC_POLYGON_NXTB",
"full_name": "María López",
"country": "MX",
"merchant_urlok": "https://tu-sitio.com/pago/ok",
"merchant_urlko": "https://tu-sitio.com/pago/error",
"notes": "Pedido ORD-123",
"reference": "ORD-123"
}' \
https://pos.b4bit.com/api/v1/orders/

The customer picks the currency on the gateway. Useful when you don’t know your customer’s preferences.

1. POST /orders/ → only expected_output_amount + URLs
2. returned web_url → redirect
3. customer picks currency on the B4bit Pay gateway

With complete payer details, the merchant receives blockchain payment data and renders it in its own UI. Useful for physical POS, native mobile apps, or deep integrations.

1. POST /orders/ → input_currency + full_name + country for direct payment
2. full response → payment_uri, address, tag_memo, expected_input_amount, rate
3. merchant renders QR / displays address on its screen
4. customer pays from their wallet
5. webhook delivers status changes
  • payment_uri — URI like bitcoin:<address>?amount=X, ready to encode in a QR.
  • address — destination address on the blockchain.
  • tag_memo — required for XRP / XLM / ALGO. Display it alongside the address.
  • expected_input_amount — exact amount of crypto to pay.
  • rate — price of the crypto in USDC at that moment (locked for the order’s validity window).

Lightning Network does not use addresses. The POST /orders/ response with input_currency=BTCL and complete payer details returns a BOLT11 invoice in the payment_uri field.

The customer pays it from their Lightning wallet (Wallet of Satoshi, Phoenix, Zeus, etc.). Confirmation is practically instant.

Use caseRecommended mode
Standard web e-commerceRedirect Gateway (Variant A or B)
In-site checkout with fully custom UXAPI Gateway
Physical point of sale (POS, register)API Gateway
Native mobile appAPI Gateway
Shareable payment linkRedirect Gateway (Variant B)

See also the payment modes available from the dashboard without API.