Payments

Refund a crypto payment

Refunds are issued against the original invoice, not a raw address, so the ledger stays consistent. One POST supports full or partial amounts and hands off to the payout rail for the actual on-chain transfer.

开始之前
  • A settled invoice id (in_..)
  • A live API key with a positive credit balance

1Post the refund against the invoice

Reference the invoice id. Omit amount_usd for a full refund or set it for a partial. Refunds are a C2 write.

curl https://api.1st-node.com/v1/payments/invoices/in_8fK2/refund \
  -H "Authorization: Bearer sk_live_..." \
  -d '{"amount_usd":49}'

2Read the payout reference

The response links the refund to a payout that carries the on-chain details. Persist it so you can reconcile the outbound transfer later.

> { "invoice": "in_8fK2", "status": "refunded",
>   "payout": "po_2xB9", "amount_usd": 49 }

3Confirm the on-chain transfer

The refund is complete only once the payout confirms on chain. Track the payout to a final state before you close the ticket, and store the transaction hash for your records.

常见问题

Can I refund only part of an invoice?

Yes. Set amount_usd to the partial value; omit it to refund the full invoice. Multiple partial refunds are allowed up to the settled total.

Why refund against the invoice id instead of an address?

Refunding against the invoice keeps the credit and debit tied to the original order, so reconciliation and audit stay correct.

继续阅读

充值、拿密钥、上线。

自助开通。支持加密货币或银行卡。按额度计费——重型原语更贵,简单调用很便宜。

获取 API 密钥