Create an invoice (receive crypto)
create_invoiceCreates an invoice and returns pay_url — a hosted payment page where the payer picks a coin and pays; the amount is credited to your balance in USDT minus the fee. Give amount_usd, or price_amount + price_currency (converted at get_fiat_rates). Use environment "test" to try the whole flow without real money: a test invoice turns paid by itself about 10 seconds after a coin is selected (on its page or with select_invoice_payment_method); the real balance does not change. Then follow the status with get_invoice or webhooks (invoice.paid). To get a deposit address right away instead of a page, pass asset_id (and lock_method true), or call select_invoice_payment_method.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fee_on | No | Who pays the service fee: you (default) or the payer on top of the amount. | |
| asset_id | No | Preselect the coin the payer pays with (Public asset code from list_assets (its asset_id field), e.g. "usdt" (USDT TRC20), "btc", "eth", "xmr", "usdc_eth".) | |
| amount_usd | No | Invoice amount in USD. Either this or price_amount + price_currency. | |
| cancel_url | No | Where the payer returns on cancel. | |
| expires_in | No | Seconds until the invoice expires. | |
| description | No | What is paid for; shown to the payer. | |
| environment | No | "test" — no real money: paid by itself ~10 s after a coin is selected, balance unchanged. | live |
| external_id | No | Your own reference (order id); unique per account. | |
| lock_method | No | true — the payer cannot change asset_id (requires asset_id). | |
| success_url | No | Where the payer returns after paying. | |
| price_amount | No | Price in your currency (with price_currency). | |
| price_currency | No | ISO 4217 currency of price_amount. | |
| idempotency_key | No | Optional. The same key returns the same result instead of a duplicate (safe retries); generated when omitted. |