PATCH /aged-wallets/cancel/:orderId
Cancel an unpaid order. Only unpaid orders can be cancelled, and the call is refused once SOL sits on the deposit address, because a cancelled order is never looked at again and that SOL would be stranded.
Use case
Drop an open order so you can start a new one (only one unpaid order is allowed at a time).
Path params
| Param | Required | Description |
|---|---|---|
orderId | yes | Aged-wallets order id. |
Response 200
The cancelled order object (same shape as in initialize),
with eStatus: "CANCELLED".
Errors
| Status | Meaning |
|---|---|
400 | orderId malformed. |
404 | Order not found or not yours. |
409 | The deposit address already holds SOL (complete the payment or contact support), or the order is no longer unpaid (Only unpaid orders can be cancelled (now <status>)). |
Example
curl -X PATCH "$BASE_URL/aged-wallets/cancel/<orderId>" \
-H "Authorization: Bearer $ACCESS" -H "x-user-id: $USER_ID"