Orders

Cancel an order that is still awaiting_payment. Any other state returns 409 conflict (you can't cancel an order that's already paid or processing); the message names the current status. Cancelling an order that is already cancelled is a 409 too, so read GET /v1/orders/{id} if you are unsure whether an earlier cancel landed.

Before cancelling, we check the chain for a payment to this order. If one has arrived, the order moves on and the cancel answers 409: a buyer who paid seconds before is served, not reversed. If the chain cannot be read right now, the cancel answers a retryable 503 unavailable and the order stays awaiting_payment.

A cancel sends no callback. A payment that still arrives for a cancelled order is reversed to its sender unless it is below the dust threshold (see reversal_tx on the order). No Idempotency-Key is needed.

post/v1/orders/{id}/cancel

Request

  • Base URL
    https://api.mystars.tg
  • Auth
    API key in header X-Api-Key

Path parameters

idstring uuid required

The order id (UUID, also used as the on-chain payment memo).

Response

Order cancelled.

order_idstring uuid required
status'cancelled' required

Changes

    • warning

      added the new antibot_enforce_unavailable enum value to the error/code response property for the response status

    • warning

      added the new antibot_enforce_unavailable enum value to the error/code response property for the response status

    • warning

      added the new antibot_enforce_unavailable enum value to the error/code response property for the response status

    169 more changes in this revision