---
title: "Cancel an order item"
method: PATCH
path: "/admin/order-items/{order_item_id}/cancel"
tags: ["Order Items"]
---

# Cancel an order item

`PATCH /admin/order-items/{order_item_id}/cancel`

## Request

- Base URL: `https://api.presscart.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.presscart.com/admin/order-items/{order_item_id}/cancel`
- Auth: HTTP bearer

Cancel an order item and refund its full line price to team credits, or to card with the rest to credits when the card cannot return all of it. Orders without a team can only be refunded to card.

## Path parameters

- `order_item_id` string, uuid, required

## Request body

- object
  - `refund_method` 'CARD' | 'CREDITS': CARD returns what the Stripe payments of the order can still return and the rest to team credits; CREDITS (the default) returns everything to team credits.

## Response `200`

Order item cancelled successfully

- object
  - `credit` object, nullable, required
    - `id` string, uuid, required
    - `amount` number, required
    - `type` 'DEBIT' | 'CREDIT', required
    - `reason` string, nullable, required
    - `notes` string, nullable, required
    - `entity` string, nullable, required
    - `entity_id` string, nullable, required
    - `user_id` string, uuid, required
    - `team_id` string, uuid, nullable, required
    - `created_by` string, uuid, nullable, required
    - `created_at` union, required
      - string, nullable
      - string
      - unknown
    - `updated_at` union, required
      - string, nullable
      - string
      - unknown
    - `deleted_at` union, required
      - string, nullable
      - string
      - unknown
    - `credit_type` 'FUNDED' | 'PROMOTIONAL' | 'REFERRAL' | 'REFUND' | 'MANUAL' | 'BONUS', nullable, required
    - `expires_at` union, required
      - string, nullable
      - string
      - unknown
    - `transaction_id` string, uuid, required
    - `legs` object[], required
      - `credit_type` 'FUNDED' | 'PROMOTIONAL' | 'REFERRAL' | 'REFUND' | 'MANUAL' | 'BONUS', nullable, required
      - `direction` 'DEBIT' | 'CREDIT', required
      - `amount` number, required
    - `status` 'PENDING' | 'POSTED' | 'ARCHIVED', required
    - `external_source` string, nullable, required
    - `order_id` string, uuid, nullable, required
  - `order_item` OrderCommission, required
    - `id` string, uuid, required
    - `referrer_id` string, uuid, nullable, required
    - `referrer_team_id` string, uuid, nullable, required
    - `order_line_item_id` string, uuid, required
    - `product_id` string, uuid, required
    - `campaign_id` string, uuid, nullable, required
    - `linked_order_item_id` string, uuid, nullable, required
    - `commission_amount` number, nullable, required
    - `commission_date_paid` union, required
      - string, nullable
      - string
      - unknown
    - `commission_status` 'PAID' | 'PENDING' | 'CANCELLED', required
    - `is_accounting_completed` boolean, nullable
    - `is_publisher_paid` boolean, nullable
    - `is_reseller_paid` boolean, nullable
    - `is_add_on` boolean, nullable
    - `accounting_completion_date` union, required
      - string, nullable
      - string
      - unknown
    - `publisher_paid_date` union, required
      - string, nullable
      - string
      - unknown
    - `reseller_paid_date` union, required
      - string, nullable
      - string
      - unknown
    - `refund_required` boolean, nullable
    - `is_refunded` boolean, nullable
    - `refund_date` union, required
      - string, nullable
      - string
      - unknown
    - `refund_method` string, nullable, required
    - `refund_reference` string, nullable, required
    - `vendor_invoice_id` string, nullable, required
    - `vendor_cost` number, nullable, required
    - `vendor_invoice_date` union, required
      - string, nullable
      - string
      - unknown
    - `vendor_paid_date` union, required
      - string, nullable
      - string
      - unknown
    - `vendor_invoice_url` string, nullable, required
    - `created_at` union, required
      - string, nullable
      - string
      - unknown
    - `updated_at` union, required
      - string, nullable
      - string
      - unknown
    - `deleted_at` union, required
      - string, nullable
      - string
      - unknown
  - `card_refund_ids` string[], required: The card refunds created; they are sent to Stripe once the cancellation commits.

## Other responses

- `400`: The body is invalid, the item is already cancelled or refunded, or a niche unit must be cancelled with its placement
- `404`: The order item was not found
- `422`: Nothing is left to refund to card, an order without a team would need team credits, or a completed wire transfer or Bill.com swap on the item is not marked paid yet
- `503`: The ledger is temporarily frozen (code LEDGER_FROZEN)

## Changes

- **2026-10-20** `2154581d845e`: 6 info
  - added optional request body
  - added the non-success response with the status `400`
  - added the non-success response with the status `404`
  - added the non-success response with the status `422`
  - …2 more

[Operation history](https://skmtc.dev/presscart/apis/presscart-prod-api/changes/admin/order-items/:order_item_id/cancel/patch.md)

---

[API](https://skmtc.dev/presscart/apis/presscart-prod-api.md) · [All operations](https://skmtc.dev/presscart/apis/presscart-prod-api/llms.txt) · [OpenAPI document](https://skmtc.dev/presscart/apis/presscart-prod-api/revisions/2154581d845e?raw)
