---
title: "/orders/{orderId}/refund"
method: POST
path: "/orders/{orderId}/refund"
---

# /orders/{orderId}/refund

`POST /orders/{orderId}/refund`

Sandbox (Testing): https://gateway.sand.us.zip.co/orders/{orderId}/refund

Refunds funds for the specified order and allocates them to the payment plan to apply it to the customer. If sync query parameter is set to true, replies synchronously with callback payload, otherwise, replies asynchronously on callback URL.

Default sync value is false for asynchronous behavior.

If you are a pay-on-ship/DFC merchant, you can only apply up to your captured amount.

## Path parameters

- `orderId` string, required

## Query parameters

- `sync` boolean

## Headers

- `QP-Territory` string, required
- `X-QP-Signature` string, required

## Request body

- object
  - `merchantId` string, required — Gets or sets the MerchantId
  - `currency` string, required — Gets or sets the Currency of the capture
  - `amount` number, double, required — Gets or sets the Amount of the capture
  - `merchantReference` string, required — Gets or sets the Merchant Reference of the capture
  - `callbackUrl` string — Gets or sets the url to callback with the refund result
  - `test` boolean — Gets or sets a value indicating whether this is a test order
  - `metadata` object — Gets or sets optional metadata associated with this capture

## Response `200`

200

- object
  - `timestamp` string
  - `merchantId` string
  - `orderId` string
  - `currency` string
  - `amount` integer
  - `merchantReference` string
  - `test` boolean
  - `success` boolean
  - `message` string
  - `metadata` object
    - `additionalProp` string
  - `operation` string

---

[API](https://skmtc.dev/zip/apis/gateway-api.md) · [All operations](https://skmtc.dev/zip/apis/gateway-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/zip/gateway-api/revisions/4b1127fdca1e/schema)
