API Docs
/
No Results Found
Refund

Refund

The refunds module allows you to initiate and manage refunds. You can make full or partial refunds for payments that have been paid successfully using the Refund APIs. It has the following parameters:

Attribute

refund_id
string
The unique identifier created for the refund.
payment_id
string
The Payment ID associated with the refund.
reference_number
string
The reference number for the refund.
amount
string
The amount for which the refund was created.
type
string
The type of refund: initiated_by_merchant, initiated_by_customer, and initiated_by_system
reason
string
The reason for the refund: duplicate, fraudulent, requested_by_customer, others, system_initiated, or expired_uncaptured_charge
description
string
A description of the refund.
status
string
Status of the refund: initiated, succeeded, failed, canceled, or pending .
network_reference_number
string
Network reference number for the refund.
failure_reason
string
Reason for failure, if applicable:
unknown , lost_or_stolen_card , expired_or_canceled_card , exceeds_payment_amount , exceeds_balance_amount , payment_already_refunded , payment_already_disputed , payment_not_captured , expiry_time_exceeded , amount_too_small , insufficient_funds , charge_for_pending_refund_disputed , or merchant_request .
date
long
The date (milliseconds) on which the refund was initiated.

Example

{ "refund_id": "173000002895561", "payment_id": "173000002895221", "reference_number": "4113662000000240001", "amount": "200.00", "type": "initiated_by_merchant", "reason": "requested_by_customer", "description": "Refund for Payment (INV-000008)", "status": "succeeded", "network_reference_number": "1724154320460", "failure_reason": "", "date": 1724154320 }

Create Refund

This API endpoint allows you to create a refund for a payment.
OAuth Scope : ZohoPay.refunds.CREATE

Arguments

amount
double
(Required)
The amount to be refunded, with support for decimal places.
reason
string
(Required)
The reason for the refund: duplicate, fraudulent, requested_by_customer, others, system_initiated, or expired_uncaptured_charge
type
string
The type of refund: initiated_by_merchant, initiated_by_customer, and initiated_by_system
description
string
A description of the refund.

Query Parameters

account_id
(Required)
The Zoho Payments account ID.

Request Example

Click to copy
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://payments.zoho.in/api/v1/payments/731000001449003/refunds?account_id=23137556") .post(body) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://payments.zoho.in/api/v1/payments/731000001449003/refunds?account_id=23137556', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("payments.zoho.in") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/api/v1/payments/731000001449003/refunds?account_id=23137556", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "payments.zoho.in", "port": null, "path": "/api/v1/payments/731000001449003/refunds?account_id=23137556", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
curl --request POST \ --url 'https://payments.zoho.in/api/v1/payments/731000001449003/refunds?account_id=23137556' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "amount": 200, "reason": "requested_by_customer", "type": "initiated_by_merchant", "description": "Refund for Payment (INV-000008)" }

Response Example

{ "code": 0, "message": "Refund initiated", "refund": { "refund_id": "173000002895561", "payment_id": "173000002895221", "reference_number": "4113662000000240001", "amount": "200.00", "type": "initiated_by_merchant", "reason": "requested_by_customer", "description": "Refund for Payment (INV-000008)", "status": "succeeded", "network_reference_number": "1724154320460", "failure_reason": "", "date": 1724154320 } }

Retrieve Refund

Retrieve a Refund
OAuth Scope : ZohoPay.refunds.READ

Query Parameters

account_id
(Required)
The Zoho Payments account ID.

Request Example

Click to copy
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://payments.zoho.in/api/v1/refunds/731000001449003?account_id=23137556") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://payments.zoho.in/api/v1/refunds/731000001449003?account_id=23137556', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("payments.zoho.in") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/refunds/731000001449003?account_id=23137556", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "payments.zoho.in", "port": null, "path": "/api/v1/refunds/731000001449003?account_id=23137556", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request GET \ --url 'https://payments.zoho.in/api/v1/refunds/731000001449003?account_id=23137556' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "success", "refund": { "refund_id": "173000002895561", "payment_id": "173000002895221", "reference_number": "4113662000000240001", "amount": "200.00", "type": "initiated_by_merchant", "reason": "requested_by_customer", "description": "Refund for Payment (INV-000008)", "status": "succeeded", "network_reference_number": "1724154320460", "failure_reason": "", "date": 1724154320 } }