---
updatedAt: 2026-09-04T11:23:52.000Z
agentTools:
  projectIndex: https://docs.us.zip.co/llms.txt
---

# Void

Sandbox (Testing): https://global-api.sand.au.edge.zip.co/merchant/charges/{chargeId}/cancel

Once the Charge has been Authorized, if for some reason the goods cannot be provided to the customer, the charge will need to be voided.

## /charges/{chargeId}/cancel

## Useful Notes

* A void will free up any amount remaining in authorized status.
  * It is possible to void payments that have been partially captured. In this case only the authorized amount will be cancelled.
  * Captured amounts can only be refunded, not canceled.

**Example Request**

```json
{
  "reference": "213123131313",
}
```

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "single-merchant-interface-smi-api",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://global-api.prod.au.edge.zip.co/merchant"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/charges/{chargeId}/cancel": {
      "post": {
        "summary": "Void",
        "description": "Sandbox (Testing): https://global-api.sand.au.edge.zip.co/merchant/charges/{chargeId}/cancel\n\nOnce the Charge has been Authorized, if for some reason the goods cannot be provided to the customer, the charge will need to be voided.",
        "operationId": "chargeschargeidcancel",
        "parameters": [
          {
            "name": "chargeId",
            "in": "path",
            "description": "The unique identifier of the charge to cancel",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer {{API key}}",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Zip-Version",
            "in": "header",
            "description": "2021-08-25",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "charge_id",
                  "reason",
                  "amount"
                ],
                "properties": {
                  "charge_id": {
                    "type": "string",
                    "description": "Zip transaction charge ID to apply the refund."
                  },
                  "reference": {
                    "type": "string",
                    "description": "Unique transaction reference."
                  },
                  "reason": {
                    "type": "string",
                    "description": "Reason of the refund."
                  },
                  "amount": {
                    "type": "integer",
                    "description": "Refund amount.",
                    "format": "int32"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"amount\": 200,\n    \"captured_amount\": 0,\n    \"created_date\": \"2022-02-28T17:01:22.673Z\",\n    \"currency\": \"USD\",\n    \"id\": \"00d11005-d30f-405d-b8d5-917a8ab78ba0\",\n    \"product\": \"partPay\",\n    \"receipt_number\": 220228254656,\n    \"refunded_amount\": 0,\n    \"state\": \"cancelled\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "amount": {
                      "type": "integer",
                      "example": 200,
                      "default": 0
                    },
                    "captured_amount": {
                      "type": "integer",
                      "example": 0,
                      "default": 0
                    },
                    "created_date": {
                      "type": "string",
                      "example": "2022-02-28T17:01:22.673Z"
                    },
                    "currency": {
                      "type": "string",
                      "example": "USD"
                    },
                    "id": {
                      "type": "string",
                      "example": "00d11005-d30f-405d-b8d5-917a8ab78ba0"
                    },
                    "product": {
                      "type": "string",
                      "example": "partPay"
                    },
                    "receipt_number": {
                      "type": "integer",
                      "example": 220228254656,
                      "default": 0
                    },
                    "refunded_amount": {
                      "type": "integer",
                      "example": 0,
                      "default": 0
                    },
                    "state": {
                      "type": "string",
                      "example": "cancelled"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```