Payments

Issue a crypto invoice (charge)

A charge is the unit of checkout. One POST against a single chain and asset returns a deposit address derived from your registered xpub and a charge id. Each charge is single-asset — there's no hosted checkout page or multi-chain accept list; you render the address and amount yourself. Creating a charge is a C2 write.

Başlamadan önce
  • A live API key (Bearer token) with a positive credit balance
  • An xpub already registered via PUT /v1/payments/xpub for the chain's key_type
  • The order amount in the asset you're charging and the chain

1Create the charge

Post the chain, asset and human-decimal amount. order_id and callback_url are optional but you'll want both for reconciliation and the webhook.

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

2Read the deposit address and charge id

The response carries the charge id, the derived deposit_address and the amount expected. Persist the id — the webhook and any later lookup reference it.

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

3Render the address and wait for the webhook

Show the buyer the deposit_address and amount yourself — there is no hosted checkout URL. Do not mark the order paid on your own detection; treat the charge as pending until a signed webhook arrives (see Verify a payment webhook signature).

Sıkça sorulanlar

Can one charge accept several chains?

No — chain and asset are fixed per charge. If you want to accept several assets for one order, create a separate charge per option and expire the ones the buyer doesn't use.

What credit tier does creating a charge cost?

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

Okumaya devam et

Bakiye yükle, anahtarını al, yayına çık.

Self servis. Kripto ya da kartla öde. Krediyle ölçümlenir — ağır ilkel yapılar daha pahalı, basitler ucuz.

API anahtarı al