Refunds
A refund object enables you to manage your refunds. Refunds can be made by direct payment to the respective customer or through credits.
Download Refunds OpenAPI Document
  
            End Points
          
          
              Refund a credit note
                
              
              
              Refund a payment
                
              
              
              Retrieve refund details
                
              
              
          
        Attribute
 refund_id 
           string 
            Unique ID generated for a refund made.
       date 
           string 
            The date on which refund is made.
       amount 
           double 
            The amount to be refund.
       description 
           string 
            A small description about the refund.
       reference_number 
           string 
            Reference number for the refund made. A custom string can also be set as the reference number.
       refund_mode 
           string 
            Mode through which refund is made. This can be 
      check, cash, creditcard, banktransfer, bankremittance, autotransaction or others. status 
           string 
            Status of the refund made. This can be either 
      success or failure. customer_id 
           string 
            Customer ID of the customer to whom the refund is to be made.
       email 
           string 
            Email address of the customer.
       creditnote 
           object 
            It contains details of the credit note for which the refund has to made. Each object contains 
          creditnote_id, creditnote_number, date, amount, refund_amount and balance_amount. creditnote_id 
           string 
            Credit note ID of the credit note involved in this refund.
       creditnote_number 
           string 
            Credit note number (starts with CN) of the credit note.
       date 
          The date on which the credit note is raised.
       amount 
          The total amount for which the credit note is raised.
       refund_amount 
           double 
            The amount for which the refund is to be made.
       balance_amount 
           double 
            Unused credits.
       autotransaction 
           object 
            If the refund mode is 
          autotransaction, autotransaction information will be displayed in the autotransaction object. It contains autotransaction_id, payment_gateway, gateway_transaction_id, card_id, last_four_digits, expiry_month and expiry_year. autotransaction_id 
           string 
            Auto-transaction ID generated for the payment made.
       payment_gateway 
           string 
            Name of the payment gateway associated with payment.
       gateway_transaction_id 
           string 
            Transaction ID of the gateway associated with payment.
       gateway_error_message 
           string 
            Gateway error for a failed transaction.
       card_id 
           string 
            Card ID of the card.
       last_four_digits 
           integer 
            Last four digits of the card.
       expiry_month 
           integer 
            Expiry month of the card.
       expiry_year 
           integer 
            Expiry year of the card.
       currency_code 
           string 
            Customer's currency code. Refunds will be made in the customer's currency.
       currency_symbol 
           string 
            The currency symbol of the currency chosen for the customer.
      {
    "refund_id": "90300000081385",
    "date": "2016-06-05",
    "amount": "20",
    "description": "Refund for discount Offer",
    "reference_number": "INV-384",
    "refund_mode": "autotransaction",
    "status": "success",
    "customer_id": "903000000000099",
    "email": "benjamin.george@bowmanfurniture.com",
    "creditnote": {
        "creditnote_id": "90300000081375",
        "creditnote_number": "CN-26",
        "date": "2016-06-05",
        "amount": 20,
        "refund_amount": 20,
        "balance_amount": 0
    },
    "autotransaction": {
        "autotransaction_id": "9030000081373",
        "payment_gateway": "Paypal Payflowpro",
        "gateway_transaction_id": "B70E6CCF288D",
        "gateway_error_message": "Gateway error for a failed transaction.",
        "card_id": "903000079226",
        "last_four_digits": 1111,
        "expiry_month": 9,
        "expiry_year": 2030
    },
    "currency_code": "USD",
    "currency_symbol": "$"
}
          Refund a credit note
            Refund is made on the credit note.
              
              OAuth Scope : ZohoSubscriptions.creditnotes.CREATE
          
Arguments
 amount 
           double 
            
              (Required) 
            
        The amount to be refund.
       description 
           string 
            A small description about the refund.
      Path Parameters
 creditnote_id 
           string 
            
              (Required) 
            
        Unique identifier of the credit note.
      Headers
 X-com-zoho-subscriptions-organizationid 
           string 
            
              (Required) 
            
        ID of the organization
      parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-subscriptions-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/billing/v1/creditnotes/90300000081375/refunds"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
              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://www.zohoapis.com/billing/v1/creditnotes/90300000081375/refunds")
  .post(body)
  .addHeader("X-com-zoho-subscriptions-organizationid", "10234695")
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .addHeader("content-type", "application/json")
  .build();
Response response = client.newCall(request).execute();
              const options = {
  method: 'POST',
  headers: {
    'X-com-zoho-subscriptions-organizationid': '10234695',
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
    'content-type': 'application/json'
  },
  body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/billing/v1/creditnotes/90300000081375/refunds', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
              import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
    'X-com-zoho-subscriptions-organizationid': "10234695",
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
    'content-type': "application/json"
    }
conn.request("POST", "/billing/v1/creditnotes/90300000081375/refunds", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
              const http = require("https");
const options = {
  "method": "POST",
  "hostname": "www.zohoapis.com",
  "port": null,
  "path": "/billing/v1/creditnotes/90300000081375/refunds",
  "headers": {
    "X-com-zoho-subscriptions-organizationid": "10234695",
    "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://www.zohoapis.com/billing/v1/creditnotes/90300000081375/refunds \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
  --header 'X-com-zoho-subscriptions-organizationid: 10234695' \
  --header 'content-type: application/json' \
  --data '{"field1":"value1","field2":"value2"}'
              {
    "amount": "20",
    "description": "Refund for discount Offer"
}
            {
    "code": 0,
    "message": "The refund information has been saved.",
    "refund": {
        "refund_id": "90300000081385",
        "date": "2016-06-05",
        "amount": "20",
        "description": "Refund for discount Offer",
        "reference_number": "INV-384",
        "refund_mode": "autotransaction",
        "status": "success",
        "customer_id": "903000000000099",
        "email": "benjamin.george@bowmanfurniture.com",
        "creditnote": {
            "creditnote_id": "90300000081375",
            "creditnote_number": "CN-26",
            "date": "2016-06-05",
            "amount": 20,
            "refund_amount": 20,
            "balance_amount": 0
        },
        "autotransaction": {
            "autotransaction_id": "9030000081373",
            "payment_gateway": "Paypal Payflowpro",
            "gateway_transaction_id": "B70E6CCF288D",
            "gateway_error_message": "Gateway error for a failed transaction.",
            "card_id": "903000079226",
            "last_four_digits": 1111,
            "expiry_month": 9,
            "expiry_year": 2030
        },
        "currency_code": "USD",
        "currency_symbol": "$"
    }
}
                Refund a payment
            A new credit note is created for the amount to be refund. Refund is then made for the credit note.
              
              OAuth Scope : ZohoSubscriptions.payments.CREATE
          
Arguments
 amount 
           double 
            
              (Required) 
            
        The amount to be refund.
       description 
           string 
            A small description about the refund.
      Path Parameters
 payment_id 
           string 
            
              (Required) 
            
        Unique identifier of the payment.
      Headers
 X-com-zoho-subscriptions-organizationid 
           string 
            
              (Required) 
            
        ID of the organization
      parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-subscriptions-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/billing/v1/payments/90300000081385/refunds"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
              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://www.zohoapis.com/billing/v1/payments/90300000081385/refunds")
  .post(body)
  .addHeader("X-com-zoho-subscriptions-organizationid", "10234695")
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .addHeader("content-type", "application/json")
  .build();
Response response = client.newCall(request).execute();
              const options = {
  method: 'POST',
  headers: {
    'X-com-zoho-subscriptions-organizationid': '10234695',
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
    'content-type': 'application/json'
  },
  body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/billing/v1/payments/90300000081385/refunds', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
              import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
    'X-com-zoho-subscriptions-organizationid': "10234695",
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
    'content-type': "application/json"
    }
conn.request("POST", "/billing/v1/payments/90300000081385/refunds", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
              const http = require("https");
const options = {
  "method": "POST",
  "hostname": "www.zohoapis.com",
  "port": null,
  "path": "/billing/v1/payments/90300000081385/refunds",
  "headers": {
    "X-com-zoho-subscriptions-organizationid": "10234695",
    "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://www.zohoapis.com/billing/v1/payments/90300000081385/refunds \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
  --header 'X-com-zoho-subscriptions-organizationid: 10234695' \
  --header 'content-type: application/json' \
  --data '{"field1":"value1","field2":"value2"}'
              {
    "amount": "20",
    "description": "Refund for discount Offer"
}
            {
    "code": 0,
    "message": "The refund information has been saved.",
    "refund": {
        "refund_id": "90300000081385",
        "date": "2016-06-05",
        "amount": "20",
        "description": "Refund for discount Offer",
        "reference_number": "INV-384",
        "refund_mode": "autotransaction",
        "status": "success",
        "customer_id": "903000000000099",
        "email": "benjamin.george@bowmanfurniture.com",
        "creditnote": {
            "creditnote_id": "90300000081375",
            "creditnote_number": "CN-26",
            "date": "2016-06-05",
            "amount": 20,
            "refund_amount": 20,
            "balance_amount": 0
        },
        "autotransaction": {
            "autotransaction_id": "9030000081373",
            "payment_gateway": "Paypal Payflowpro",
            "gateway_transaction_id": "B70E6CCF288D",
            "gateway_error_message": "Gateway error for a failed transaction.",
            "card_id": "903000079226",
            "last_four_digits": 1111,
            "expiry_month": 9,
            "expiry_year": 2030
        },
        "currency_code": "USD",
        "currency_symbol": "$"
    }
}
                Retrieve refund details
            Details of an existing refund.
              
              OAuth Scope : ZohoSubscriptions.creditnotes.READ
          
Path Parameters
 refund_id 
           string 
            
              (Required) 
            
        Unique identifier of the refund.
      Headers
 X-com-zoho-subscriptions-organizationid 
           string 
            
              (Required) 
            
        ID of the organization
      headers_data = Map();
headers_data.put("X-com-zoho-subscriptions-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/billing/v1/creditnotes/refunds/90300000081385"
type: GET
headers: headers_data
connection: <connection_name>
];
info response;
              OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
  .url("https://www.zohoapis.com/billing/v1/creditnotes/refunds/90300000081385")
  .get()
  .addHeader("X-com-zoho-subscriptions-organizationid", "10234695")
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .build();
Response response = client.newCall(request).execute();
              const options = {
  method: 'GET',
  headers: {
    'X-com-zoho-subscriptions-organizationid': '10234695',
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
  }
};
fetch('https://www.zohoapis.com/billing/v1/creditnotes/refunds/90300000081385', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
              import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = {
    'X-com-zoho-subscriptions-organizationid': "10234695",
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
    }
conn.request("GET", "/billing/v1/creditnotes/refunds/90300000081385", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
              const http = require("https");
const options = {
  "method": "GET",
  "hostname": "www.zohoapis.com",
  "port": null,
  "path": "/billing/v1/creditnotes/refunds/90300000081385",
  "headers": {
    "X-com-zoho-subscriptions-organizationid": "10234695",
    "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://www.zohoapis.com/billing/v1/creditnotes/refunds/90300000081385 \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
  --header 'X-com-zoho-subscriptions-organizationid: 10234695'
              {
    "code": 0,
    "message": "success",
    "refund": {
        "refund_id": "90300000081385",
        "date": "2016-06-05",
        "amount": "20",
        "description": "Refund for discount Offer",
        "reference_number": "INV-384",
        "refund_mode": "autotransaction",
        "status": "success",
        "customer_id": "903000000000099",
        "email": "benjamin.george@bowmanfurniture.com",
        "creditnote": {
            "creditnote_id": "90300000081375",
            "creditnote_number": "CN-26",
            "date": "2016-06-05",
            "amount": 20,
            "refund_amount": 20,
            "balance_amount": 0
        },
        "autotransaction": {
            "autotransaction_id": "9030000081373",
            "payment_gateway": "Paypal Payflowpro",
            "gateway_transaction_id": "B70E6CCF288D",
            "gateway_error_message": "Gateway error for a failed transaction.",
            "card_id": "903000079226",
            "last_four_digits": 1111,
            "expiry_month": 9,
            "expiry_year": 2030
        },
        "currency_code": "USD",
        "currency_symbol": "$"
    }
}