On this page
Simulate payment
Move a sandbox invoice through a payment outcome and test the same lifecycle and webhooks as a confirmed on-chain transfer.
POST/v1/sandbox/invoices/:invoice_id/simulate-payment
API key: Payment · Environment: Sandbox only
Simulates a confirmed payment without moving real funds. The invoice must belong to the authenticated merchant and the sandbox environment. A production key is rejected.
Request body
stage is required and accepts exactly one of:
paid— pay the expected amount;overpaid— pay 10% above the expected amount;underpay— pay 40% of the expected amount; the invoice domain rules decide whether it remains open or becomes final;cancel— cancel an invoice that is still eligible for cancellation.
{
"stage": "paid"
}
The server derives every simulated amount from the invoice. Clients never calculate settlement amounts.
Response (200 OK)
Returns the updated invoice resource and emits the same lifecycle webhook events as the corresponding real outcome. See Get Invoice for the response fields.