Skip to main content

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​

ParamRequiredDescription
orderIdyesAged-wallets order id.

Response 200​

The cancelled order object (same shape as in initialize), with eStatus: "CANCELLED".

Errors​

StatusMeaning
400orderId malformed.
404Order not found or not yours.
409The 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"