---
title: "Cancel an order"
method: POST
path: "/provider/orders/{id}/cancel"
tags: ["Provider"]
---

# Cancel an order

`POST /provider/orders/{id}/cancel`

## Request

- Base URL: `https://api.paycrest.io/v2`
- URL: `https://api.paycrest.io/v2/provider/orders/{id}/cancel`
- Auth: API key in header `API-Key`

Provider cancels a previously accepted order. The aggregator will attempt reassignment.
A duplicate `reason` cancels the order without reassignment; see `reason` below.

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `reason` string: Reason for cancellation. `duplicate_gateway_order:<holdingOrderId>` (another Paycrest order already holds the same on-chain order) or `duplicate_reference:<holdingOrderId>`, where `<holdingOrderId>` is the UUID of that other order, tells the aggregator you will not pay out because the order is a duplicate. The order is then cancelled and not reassigned, but only if the aggregator can confirm the claim: the holding order must be a different order with the same on-chain order and token, or the on-chain order must already be fulfilled or refunded. A reason without a valid holding order id is never confirmed. An unconfirmed claim is handled as an ordinary cancel. The Paycrest provider node sends these reasons automatically.

## Response `200`

Order cancelled

- StandardResponse
  - `status` string
  - `message` string
  - `data` object: The actual response data (e.g., ReceiveAddressResponse, etc.)

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `404`: Order not found

## Changes

- **2026-11-03** `b2558cacb755`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/paycrest/apis/paycrest-aggregator-api/changes/provider/orders/:id/cancel/post.md)

---

[API](https://skmtc.dev/paycrest/apis/paycrest-aggregator-api.md) - [All operations](https://skmtc.dev/paycrest/apis/paycrest-aggregator-api/llms.txt) - [OpenAPI document](https://skmtc.dev/paycrest/apis/paycrest-aggregator-api/revisions/b2558cacb755?raw)
