Cancel a quote
POST/api/quotes/:id/cancel
Cancels the quote while it is active and has no order. Once Pay created an order, cancels that order instead, as long as it still awaits payment. The body carries only the signature fields. Signature only; a user session is not accepted. The sender account is named in X-Sender-Account-Id, which is outside the signature: it must belong to the organization of the API key. Missing header: 401 unauthenticated. Malformed, unknown or another organization's account: 403 forbidden (the same answer for all three).
Request
Responses
- 200
- 401
- 403
- 404
- 409
- 500
Canceled.
Signature missing or invalid (Unauthorized), or X-Sender-Account-Id missing (unauthenticated).
forbidden: the quote or order is not this sender's (including an ownerless quote), or X-Sender-Account-Id is malformed, unknown or belongs to another organization.
not_found: no such quote, including a malformed id.
already_terminal: nothing left to cancel, including a quote past expires_at (reported, and marked, expired).
cancel_failed: internal error.