State and receipt of a crypto sale
lunium_get_crypto_saleRequires an API key. Returns the current state of a crypto sale and, once settled, the receipt: pix_e2e (Central Bank identifier), receipt_url (a page to show a person), receipt_pdf_url and verify_url (hand it to a counterparty so they can check without trusting you). COMPLETED confirms the PIX, but receipt links can arrive later. If receipt_url or receipt_pdf_url is still null, say the PIX completed and the receipt is being prepared; keep polling THIS order at the normal interval, or use cashout.receipt_ready. Never invent a URL or create a second payment to obtain a receipt.
Use it after lunium_confirm_crypto_sale and after the crypto has been sent to the deposit address. Poll no more than once every 10-15 seconds: polling every second consumes the entire request budget and starts returning quota errors that look like failures.
receipt_pdf_url carries the recipient's full name and tax number. Give the link to your user; do not fetch its contents into the conversation and do not forward it to third parties — verify_url exists for that.
Do not use it to check a payment made outside Lunium — that is lunium_verify_pix_payment. Do not report failure because the state is still pending: outside Polygon the wait is the chain's confirmation requirement, sometimes hours. MANUAL_REVIEW and uncertain processing are not proof of failure or permission to pay again. AWAITING_REFUND_ADDRESS means a client refund address is needed, REFUNDING_CRYPTO means return in progress, and REFUNDED describes the return; show refund_asset, refund_network, refund_amount and refund_tx_hash when available. provider_return_txid alone proves neither PIX payment nor refund to the client. Never reuse deposit_from automatically as a refund destination. sandbox=true is simulation, not a real receipt.
Errors: acao=repetir → poll again. acao=esperar → you are polling too fast; back off, the order is unaffected. A not-found (acao=corrigir) → the id is wrong or belongs to another key; do not retry the same id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cashout_id | Yes | Order id returned by lunium_quote_crypto_sale. Not the external_id, not the E2E. |