API Reference / Sandbox
Trigger a sandbox event
POSThttps://api.moolre.com/open/sandbox/trigger
Send any webhook event to the callback URL of your sandbox wallet, signed like a live event. With an id it acts on a real sandbox record: a pending payment or payout settles that way (balance, status and webhook agree), a bulk batch finishes, an invoice is paid. Without an id it sends a sample event and does not touch the balance. Sandbox only.
Headers
- X-API-USER string required
Your Moolre username.
- X-API-KEY string required
Your wallet private API key. A public key is refused.
Body parameters
- accountnumber string required
Your sandbox wallet account number.
- event string required
The event to send.
- externalref string optional
externalref of a payment or payout to settle or re-send.
- transactionid string optional
Alternative to externalref.
- batchid string optional
For bulk_payout.completed: the batch to finish.
- invoiceid string optional
For invoice.paid and invoice.expired: the invoice.
- amount string optional
A sample amount, or a part payment for invoice.paid.
- reason string optional
The failure reason for payment.failed and payout.failed.
- final string optional
For bulk_payout.completed: how pending items settle.
Responses
200 Success
The event was sent. data.delivered says whether your endpoint answered 2xx.
{ "status": 1, "code": "SBX01", "message": "Webhook event sent.", "data": { "event_id": "evt_0123456789abcdef01234567", "delivered": true, "state": "delivered", "http": 200, "error": null }, "go": null, "meta": { "requestid": "req_c68f4c66115c26725c796242", "notices": [] }}200 (HTTP 422 in strict mode) No callback URL
The sandbox wallet has no callback URL. Set one with Update Account.
{ "status": 0, "code": "SBX02", "message": "No callback URL is set on this sandbox wallet.", "data": "callback", "go": null, "meta": { "requestid": "req_c68f4c66115c26725c796242", "notices": [] }}