JavaScript
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}}; fetch('https://api.valox.co/api/v1/order/{orderId}/cancel', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
{ "ok": true }
This endpoint transitions the card order to the cancelled state.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
The unique identifier of the card order to cancel.
Card order successfully cancelled.
true