Skip to main content
POST
/
api
/
v4
/
integrations
/
sales
/
aggregator
/
orders
/
{order_uid}
/
refund
{
  "reason": "Duplicate charge",
  "vendor_uid": "vendor-uid-abc"
}
{
  "data": {
    "uid": "550e8400-e29b-41d4-a716-446655440000",
    "order_code": "ORD-2026-001234",
    "account_uid": "acc-uid-12345",
    "vendor_uid": "vendor-uid-abc",
    "store_uid": "store-uid-xyz",
    "status": "CANCELED",
    "payment_status": "REFUNDED",
    "order_lines": [],
    "totals": [],
    "payment_methods": [],
    "metadata": {},
    "created_at": "2026-03-30T12:00:00.000Z",
    "updated_at": "2026-03-30T12:05:00.000Z",
    "deleted_at": null
  },
  "status": 200,
  "method": "POST",
  "pathname": "/api/v4/integrations/sales/aggregator/orders/550e8400-e29b-41d4-a716-446655440000/refund",
  "duration": 120,
  "traceId": "abc123",
  "isArray": false
}
Cancels an order previously created through Inject order. Fire looks up the order by account and order_uid, updates the order to CANCELED, and returns the updated order in the standard API envelope. If the stored payment processor supports refunds (for example, Deuna), Fire attempts the refund and sets payment_status to REFUNDED on success. For other processors, Fire cancels the payment state and sets payment_status to CANCELED.
Authorization
string
required
Bearer token obtained from POST /login. Format: Bearer <accessToken>.
x-api-key
string
required
Your Fire API key.
x-client-channel
string
required
Must be integration. Identifies the request as coming from an external integration.
account
string
required
Account identifier used to find the order.
Content-Type
string
default:"application/json"
Use application/json for the request body.
order_uid
string
required
UID of the order to cancel.
reason
string
required
Reason for the cancellation or refund request.
payment_method_uid
string
Optional. UID of the payment method used to resolve refund credentials when you need to target a specific method.
vendor_uid
string
required
Vendor UID used to resolve payment credentials.
email
string
Customer email sent to the payment processor when required.
customer_uid
string
Registered customer UID. When present, Fire treats the refund payload as authenticated.
anonymous_customer_uid
string
Anonymous customer UID. Used as the payment user identifier when customer_uid is not present.
store_uid
string
Store UID used to resolve store-specific payment credentials.
media
string
Sales medium used to resolve credentials. Supported values: APP, WEB.
{
  "reason": "Duplicate charge",
  "vendor_uid": "vendor-uid-abc"
}
data
object
Updated order. Prices in order_lines, totals, and payment_methods are returned as external, unscaled amounts.
status
number
HTTP status code from the API envelope.
traceId
string
Trace identifier for support and debugging.
{
  "data": {
    "uid": "550e8400-e29b-41d4-a716-446655440000",
    "order_code": "ORD-2026-001234",
    "account_uid": "acc-uid-12345",
    "vendor_uid": "vendor-uid-abc",
    "store_uid": "store-uid-xyz",
    "status": "CANCELED",
    "payment_status": "REFUNDED",
    "order_lines": [],
    "totals": [],
    "payment_methods": [],
    "metadata": {},
    "created_at": "2026-03-30T12:00:00.000Z",
    "updated_at": "2026-03-30T12:05:00.000Z",
    "deleted_at": null
  },
  "status": 200,
  "method": "POST",
  "pathname": "/api/v4/integrations/sales/aggregator/orders/550e8400-e29b-41d4-a716-446655440000/refund",
  "duration": 120,
  "traceId": "abc123",
  "isArray": false
}

Processing rules

  • When provided, payment_method_uid helps resolve credentials, but Fire evaluates the payment methods stored on the order.
  • For Deuna refunds, the order must include metadata.order_token; otherwise Fire returns 400.
  • After saving the updated order, Fire returns prices transformed for external consumption.
  • Fire notifies the cancellation downstream after the order is saved.