Cancel Order
Purpose: Attempts to cancel an existing order. Cancellation is only possible if the order has not yet been processed (e.g., captured or completed).
Endpoint Details
- HTTP Verb: PATCH
- URL Segment: /v3/order/{orderId}/cancel
- OpenAPI Spec: View in Swagger UI
- Notes: This endpoint updates the order's status to
Cancelledand requires no request body.
Path Parameters
This method uses a parameter passed directly in the URL path.
| Field Name | Description | Type | Additional Information |
|---|---|---|---|
orderId | The unique ID of the order to be cancelled. | string ($uuid) | Required. This is the orderId returned from Create Order. |
Request Body
No Request Body Required.
Successful Response (200 OK)
A successful request returns a 200 OK status code with an empty response body.
Error Responses
The following HTTP status codes are explicitly documented for this method:
| Status Code | Description |
|---|---|
| 400 Bad Request | The request was invalid, or the order is in a state that prevents cancellation (e.g., already captured or completed). The response body may contain a message like "Failed validation context". |
| 401 Unauthorized | Authentication failure (e.g., missing or invalid API key/credentials). |
| 404 Not Found | The specified orderId does not exist. |