Orders
Cancel an order
Cancel an authorized order, releasing any remaining authorized amount back to the customer's credit line. If the order has been partially captured, only the uncaptured portion is canceled; previously captured amounts and their invoices are not affected.
post/orders/{order_id}/cancel
Request
- Base URLhttps://app-sandbox.resolvepay.com/api
- Auth
- HTTP bearer
- or HTTP basic
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
order_idstring required
ID of the order to cancel.
Response
An object representing an order.
Example response
{
"id": "ORDlaE5wbg0",
"merchant_id": "MER456789",
"checkout_id": "CHKabc123",
"number": "ord_100001",
"po_number": "PO-555",
"advance_requested": true,
"source": "checkout",
"status": "authorized",
"amount_authorized": 1000,
"amount_captured": 500,
"amount_remaining": 500,
"first_captured_at": "2024-01-15T10:00:00.000Z",
"line_items": [
{
"name": "Widget A",
"quantity": 2,
"unit_price": 50,
"sku": "ABC-123",
"total_price": 100,
"type": "product",
"tax_amount": 8.5
}
],
"authorization_expires_at": "2024-02-15T10:00:00.000Z",
"authorization_expiry_source": "system",
"authorized_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-01-15T10:00:00.000Z",
"customer": {
"id": "X50sgfRd",
"name": "Acme Corp",
"remaining_credit": 5000
},
"capture_events": [
{
"amount": 500,
"idempotency_key": "capture-2024-001",
"processed_at": "2024-01-15T10:00:00.000Z",
"invoice_id": "INabc123"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.