Payments

Issue a crypto invoice

An invoice is the unit of checkout. One POST fixes a USD price, the chains you accept and returns a hosted checkout URL plus a pay-to address. Creating invoices is a C2 write, so a per-call credit cost applies.

Antes de começar
  • A live API key (Bearer token) with a positive credit balance
  • The order amount in USD and the chains you want to accept

1Create the invoice

Post the USD amount and the chains you accept. The accept array uses chain slugs (eth, btc, tron). This is a C2 write.

curl https://api.1st-node.com/v1/payments/invoices \
  -H "Authorization: Bearer sk_live_..." \
  -d '{"amount_usd":49,"accept":["eth","tron"]}'

2Read the pay-to address and checkout URL

The response carries the invoice id (in_..), a per-chain pay-to address and a hosted checkout URL. Persist the id — every later webhook and refund references it.

> { "invoice": "in_8fK2", "status": "pending",
>   "amount_usd": 49,
>   "pay_to": { "tron": "T...", "eth": "0x..." },
>   "checkout_url": "https://pay.1st-node.com/in_8fK2" }

3Redirect the buyer and wait for the webhook

Send the buyer to checkout_url or render your own page against the pay-to address. Do not mark the order paid on redirect — treat the invoice as pending until a settled webhook arrives and its signature verifies.

Perguntas frequentes

How is the crypto amount computed from the USD price?

The invoice locks a USD amount and quotes the equivalent per chain from the integrated price layer, so you never call a separate market-data vendor to price checkout.

What credit tier does creating an invoice cost?

Invoices are a C2 write, heavier than a C1 spot read but billed per call with no per-seat license.

Continue lendo

Recarregue, pegue a chave e publique.

Autoatendimento. Pague em cripto ou cartão. Medido por créditos: primitivas pesadas custam mais, as simples são baratas.

Obter chave de API