v1

latestOpenAPI 3.1.02026-07-2469193340.0 KB
Refunds

Issue a Refund

Certain rules apply to the issuance of a refund:

<ul> <li>Must be applied against a successfully cleared Payment Request (Collections or Receivables)</li> <li>Many refunds may be created against the original Payment Request</li> <li>The total refunded amount must not exceed the original value</li> </ul> <aside class="notice">We now require supplying an <code>Idempotency-Key</code> header when performing this request to ensure you can safely retry the action in case of an issue. If the header value is different to one provided previously, we will be treating a request as a new operation which may lead to duplicate refunds. To understand more on how to make idempotent requests, please refer to our <a href="https://docs.zeptopayments.com/v20260101/reference/idempotent-requests">Idempotent requests guide</a>.</aside>
post/credits/{credit_ref}/refunds

Path parameters

credit_refstring required

The credit reference number e.g C.625v

Headers

Idempotency-Keystring required

Idempotency key to support safe retries for 24h

Request body

amountinteger required

Amount in cents refund (Min: 1 - Max: 99999999999)

reasonstring

The first 8 characters are visible if funds are sent via direct credit / BECS, and up to 270 characters if sent via NPP

your_bank_account_idstring uuid

Specify where we should take the funds for this transaction. If omitted, your primary bank account will be used.

metadataMetadata

Use for your custom data and certain Zepto customisations.

Example request

{
  "amount": 500,
  "channels": [
    "direct_entry"
  ],
  "reason": "Because reason",
  "your_bank_account_id": "9c70871d-8e36-4c3e-8a9c-c0ee20e7c679",
  "metadata": {
    "custom_key": "Custom string",
    "another_custom_key": "Maybe a URL"
  }
}

Response

Created

Example response

{
  "data": {
    "ref": "PRF.7f4",
    "for_ref": "C.1gf22",
    "debit_ref": "D.63hgf",
    "your_bank_account_id": "9c70871d-8e36-4c3e-8a9c-c0ee20e7c679",
    "created_at": "2021-06-01T07:20:24Z",
    "amount": 500,
    "channels": [
      "direct_entry"
    ],
    "reason": "Subscription refund",
    "contacts": {
      "source_contact_id": "194b0237-6c2c-4705-b4fb-308274b14eda",
      "target_contact_id": "3694ff53-32ea-40ae-8392-821e48d7bd5a"
    },
    "metadata": {
      "custom_key": "Custom string",
      "another_custom_key": "Maybe a URL"
    }
  }
}