Skip to main content

Delete Sales Order Payment

DELETE 

/api/sales-orders/:salesOrderId/payments/:payment

Delete a payment from a sales order. Recalculates the order's payment_status afterward.

Required scope: orders:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Guard: When the payment was created by applying a store credit (Credit-type payment) and a matching SalesCreditAllocation row exists (same sales_order_id and amount), this endpoint returns 422. Use the Unallocate Sales Credit endpoint under Customers instead — it reverses both the allocation and the corresponding payment atomically.

Authentication: Requires Bearer token.

Requires permission: sales_orders.manage_payments

Request

Responses

OK

Response Headers
    Content-Type