Open a refund
create_refundOpens a refund for a paid invoice in the original asset and emails the buyer a link to provide a refund address. Ask the buyer first, then confirm; the action cannot be undone.
Instructions
Open a refund.
Starts a refund in the asset that was paid. We email the buyer a link to give an address; the link is never returned, since whoever holds it decides where the money goes. With no email on the invoice, the owner makes one in the dashboard. When the address is checked, the refund is ready_to_send with amount_to_send. Refused with sanctioned_sender when money on the invoice came from an address on a sanctions list, or one the coin's issuer froze: sending it back may itself be prohibited, so nothing refunds it — leave it and talk to a lawyer.
Test keys only: refused with a live key.
Cannot be undone — Opens a refund to the buyer. Ask the person first, then call with confirm: true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | No | In the paid asset's smallest unit. Default: everything still refundable. | |
| reason | No | ||
| confirm | Yes | true once the person has agreed to this exact call. Without it nothing is done. | |
| invoice | Yes | A invoice id, `inv_…`. |