Payments

Payments

The Payment APIs allow you to create a payment using a saved payment method and also provide details about a payment transaction, including the amount, currency, and status.

Download Payments OpenAPI Document
End Points
Create Payment
Retrieve Payment List
Retrieve Payment Details

Attribute

payment_id
string
A unique identifier for the payment.
amount
string
The payment amount.
currency
string
Currency of the payment amount, represented by a 3-letter ISO currency code (e.g., USD).
Show list of supported currencies arrow
USDEURGBPINR AUDCADJPYCNY NZDSGDCHFSEK NOKDKKZARHKD MXNBRLRUBKRW IDRMYRTHBPHP VNDTRYPLNCZK HUFILSSARAED EGPPKRBDTLKR NPRUAHKZTQAR OMRKWDBHDJOD NGNGHSARSCLP COPPENUYUBOB VESDZDMADTND XOFXAFXCDXPF MMKMNTLAKKHR BTNMVRSCRSYP SDGETBRWFBIF ZMWZWLAOAMWK MZNGNFDJFUGX TZSLSLSZLGMD SLLXDRFJDWST TOPPGKVUVKYD BBDTTDBSDHTG JMDANGAWGSRD GYDBZDBMDBAM MADMDLMKDISK GELAZNAMDKGS TJSUZSMGAAOA
payments_session_id
string
An identifier assigned to the payment session. This can be used to track all payments within a specific session.
receipt_email
string
Email address to which the payment receipt will be sent.
reference_number
string
Reference number for the payment.
amount_captured
string
Amount captured from the transaction, excluding subsequent refunds.
fee_amount
string
Fee amount charged for the payment.
total_fee_amount
string
Total fee amount including all charges and deductions
exchange_rate
double
The rate at which one currency is converted into another during the transaction.
status
string
Status of the payment: initiated, succeeded, failed, incomplete, refunded, partially_refunded, blocked, or disputed.
date
long
Date (milliseconds) on which the payment was processed.
payment_method
object
Payment method is either card or ach_debit.
Available payment method arrow
card
object
Contains card details.
Show Sub-Attributes arrow
last_four_digits
string
The last four digits of the card number.
card_holder_name
string
The name of the cardholder.
expiry_month
string
The month when the card expires, formatted as MM.
expiry_year
string
The year when the card expires, formatted as YY.
brand
string
The brand of the card (e.g., visa, master_card, rupay).
funding
string
The type of funding for the card (e.g., credit, debit).
ach_debit
object
Contains ach debit details.
Show Sub-Attributes arrow
last_four_digits
string
The last four digits.
account_holder_name
string
The name of the account holder.
account_holder_type
string
The type of the account holder.
account_type
string
Type of the account.
bank_name
string
Name of the bank.
routing_number
string
Routing number.

Payment method with Card details (Eg.)
Show Sub-Attributes arrow
type
string
The type of payment method. This can be card or ach_debit.
card
object
Contains card details.
Show Sub-Attributes arrow
card_holder_name
string
The name of the cardholder.
last_four_digits
string
The last four digits of the card number.
expiry_month
string
The month when the card expires, formatted as MM.
expiry_year
string
The year when the card expires, formatted as YY.
brand
string
The brand of the card (e.g., visa, master_card, etc.).
funding
string
The type of funding for the card (e.g., credit, debit).

Example

{ "payment_id": "1987000000724215", "amount": "200.00", "currency": "USD", "payments_session_id": "1987000000724213", "receipt_email": "charles@example.com", "reference_number": "4113662000000240001", "amount_captured": "200.00", "fee_amount": "4.00", "total_fee_amount": "4.72", "exchange_rate": 1, "status": "partially_refunded", "date": 1715163045, "payment_method": { "type": "card", "card": { "card_holder_name": "Charles", "last_four_digits": "3212", "expiry_month": "01", "expiry_year": "26", "brand": "visa", "funding": "debit" } } }

Create Payment

This API endpoint allows you to create a payment using a saved payment method.
OAuth Scope : ZohoPay.payments.CREATE

Arguments

customer_id
string
(Required)
A unique identifier for the customer.
payment_method_id
string
(Required)
A unique identifier for the payment method.
amount
double
(Required)
The amount to be charged, with support for decimal places.
currency
string
(Required)
Currency of the payment amount, represented by a 3-letter ISO currency code (e.g., USD).
Show list of supported currencies arrow
USDEURGBPINR AUDCADJPYCNY NZDSGDCHFSEK NOKDKKZARHKD MXNBRLRUBKRW IDRMYRTHBPHP VNDTRYPLNCZK HUFILSSARAED EGPPKRBDTLKR NPRUAHKZTQAR OMRKWDBHDJOD NGNGHSARSCLP COPPENUYUBOB VESDZDMADTND XOFXAFXCDXPF MMKMNTLAKKHR BTNMVRSCRSYP SDGETBRWFBIF ZMWZWLAOAMWK MZNGNFDJFUGX TZSLSLSZLGMD SLLXDRFJDWST TOPPGKVUVKYD BBDTTDBSDHTG JMDANGAWGSRD GYDBZDBMDBAM MADMDLMKDISK GELAZNAMDKGS TJSUZSMGAAOA
customer_on_session
boolean
Indicates whether the customer is actively present during the payment attempt. Set this parameter to false for off-session attempts where the customer is not present in the checkout flow.

Note: Off-session payments may fail for cards that require 3D Secure (3DS) authentication.

browser_info
object
Customer's browser information. This field is required when customer_on_session is set to true.
Show Sub-Attributes arrow
user_agent
string
User agent string of the customer's browser.
accept_header
string
Value of the browser's Accept header.
screen_height
integer
Height of the customer's screen in pixels.
screen_width
integer
Width of the customer's screen in pixels.
language
string
Browser language.
time_zone_offset
integer
Time zone offset in minutes from UTC.
color_depth
integer
Screen color depth in bits per pixel.
statement_descriptor
string
Descriptor shown on the statement to identify the payment.
description
string
A description of the payment.
shipping_address
object
Contains shipping address details.
Show Sub-Attributes arrow
name
string
Shipping name.
address_line1
string
First line of the customer’s shipping address.
address_line2
string
Second line of the customer’s shipping address.
city
string
City of the customer’s shipping address.
state
string
State of the customer’s shipping address.
country
string
(Required)
Country of the customer’s shipping address, represented by a 2-letter ISO country code (e.g., US).
postal_code
string
Postal code of the customer’s shipping address.
meta_data
array
Provides additional metadata that can be useful for storing supplementary information. The maximum size of the array can be 5.
Avoid storing sensitive information, including bank account numbers, card details, or personally identifiable information (PII) such as phone numbers or email addresses, in metadata fields. Use metadata only for non-sensitive identifiers, for instance:
  • Order IDs, Customer IDs, and other identifiers for easy reference.
  • Any additional identifiers or data stored in key-value pairs that may be helpful for future reference.
Show Sub-Attributes arrow
key
string
A unique key used to store metadata for reference. The maximum length of the key can be 20 characters.
value
string
The value associated with the key for reference. The maximum length of the value can be 500 characters.

Query Parameters

account_id
long
(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.com/api/v1/payments?account_id=23137556") .post(body) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
HttpResponse<String> response = Unirest.post("https://payments.zoho.com/api/v1/payments?account_id=23137556") .header("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .header("content-type", "application/json") .body("{\"field1\":\"value1\",\"field2\":\"value2\"}") .asString();
const options = { method: 'POST', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://payments.zoho.com/api/v1/payments?account_id=23137556', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
const settings = { "async": true, "crossDomain": true, "url": "https://payments.zoho.com/api/v1/payments?account_id=23137556", "method": "POST", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "application/json" }, "processData": false, "data": "{\"field1\":\"value1\",\"field2\":\"value2\"}" }; $.ajax(settings).done(function (response) { console.log(response); });
import http.client conn = http.client.HTTPSConnection("payments.zoho.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/api/v1/payments?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.com", "port": null, "path": "/api/v1/payments?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();
const unirest = require("unirest"); const req = unirest("POST", "https://payments.zoho.com/api/v1/payments"); req.query({ "account_id": "23137556" }); req.headers({ "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "application/json" }); req.type("json"); req.send({ "field1": "value1", "field2": "value2" }); req.end(function (res) { if (res.error) throw new Error(res.error); console.log(res.body); });
const request = require('request'); const options = { method: 'POST', url: 'https://payments.zoho.com/api/v1/payments', qs: {account_id: '23137556'}, headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: {field1: 'value1', field2: 'value2'}, json: true }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
require 'uri' require 'net/http' require 'openssl' url = URI("https://payments.zoho.com/api/v1/payments?account_id=23137556") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["Authorization"] = 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' request["content-type"] = 'application/json' request.body = "{\"field1\":\"value1\",\"field2\":\"value2\"}" response = http.request(request) puts response.read_body
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://payments.zoho.com/api/v1/payments?account_id=23137556", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "{\"field1\":\"value1\",\"field2\":\"value2\"}", CURLOPT_HTTPHEADER => [ "Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type: application/json" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
<?php $request = new HttpRequest(); $request->setUrl('https://payments.zoho.com/api/v1/payments'); $request->setMethod(HTTP_METH_POST); $request->setQueryData([ 'account_id' => '23137556' ]); $request->setHeaders([ 'Authorization' => 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type' => 'application/json' ]); $request->setBody('{"field1":"value1","field2":"value2"}'); try { $response = $request->send(); echo $response->getBody(); } catch (HttpException $ex) { echo $ex; }
<?php $client = new http\Client; $request = new http\Client\Request; $body = new http\Message\Body; $body->append('{"field1":"value1","field2":"value2"}'); $request->setRequestUrl('https://payments.zoho.com/api/v1/payments'); $request->setRequestMethod('POST'); $request->setBody($body); $request->setQuery(new http\QueryString([ 'account_id' => '23137556' ])); $request->setHeaders([ 'Authorization' => 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type' => 'application/json' ]); $client->enqueue($request)->send(); $response = $client->getResponse(); echo $response->getBody();
var client = new RestClient("https://payments.zoho.com/api/v1/payments?account_id=23137556"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"field1\":\"value1\",\"field2\":\"value2\"}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Post, RequestUri = new Uri("https://payments.zoho.com/api/v1/payments?account_id=23137556"), Headers = { { "Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }, }, Content = new StringContent("{\"field1\":\"value1\",\"field2\":\"value2\"}") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } } }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://payments.zoho.com/api/v1/payments?account_id=23137556" payload := strings.NewReader("{\"field1\":\"value1\",\"field2\":\"value2\"}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") req.Header.Add("content-type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = JSON.stringify({ "field1": "value1", "field2": "value2" }); const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("POST", "https://payments.zoho.com/api/v1/payments?account_id=23137556"); xhr.setRequestHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); xhr.setRequestHeader("content-type", "application/json"); xhr.send(data);
curl --request POST \ --url 'https://payments.zoho.com/api/v1/payments?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
{ "customer_id": "1987000000724207", "payment_method_id": "1987000000724211", "amount": 100.5, "currency": "USD", "customer_on_session": true, "browser_info": { "user_agent": "Mozilla/5.0", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "screen_height": 1080, "screen_width": 1920, "language": "en-US", "time_zone_offset": -300, "color_depth": 24 }, "statement_descriptor": "Zoho Payments", "description": "Payment for INV-000008", "shipping_address": { "name": "Charles", "address_line1": "123 Main St", "address_line2": "Apt 4B", "city": "Detroit", "state": "Michigan", "country": "US", "postal_code": "12345" }, "meta_data": [ { "key": "Key1", "value": "Value1" } ] }

Response Example

{ "code": 0, "message": "Payment successful!", "payment": { "payment_id": "1987000000724215", "amount": "200.00", "currency": "USD", "payments_session_id": "1987000000724213", "receipt_email": "charles@example.com", "reference_number": "4113662000000240001", "amount_captured": "200.00", "fee_amount": "4.00", "total_fee_amount": "4.72", "exchange_rate": 1, "status": "partially_refunded", "date": 1715163045, "payment_method": { "type": "card", "card": { "card_holder_name": "Charles", "last_four_digits": "3212", "expiry_month": "01", "expiry_year": "26", "brand": "visa", "funding": "debit" } } } }

Retrieve Payment List

Used to retrieve the details of all payments.
OAuth Scope : ZohoPay.payments.READ

Query Parameters

account_id
long
(Required)
The Zoho Payments account ID.
status
string
Status can be: Status.All, Status.Failed, Status.Succeeded, Status.Refunded or Status.Disputed.
search_text
string
Search payments using payment ID, customer name, or email.
filter_by
string
Filter the payments list using date intervals: ChargeDate.Today, ChargeDate.ThisMonth, ChargeDate.ThisYear, ChargeDate.PreviousMonth, ChargeDate.PreviousYear, ChargeDate.CustomDate, ChargeDate.Last_30_Days.
from_date
string
If the given filter_by is ChargeDate.CustomDate, this param is required. (e.g., 2024-08-06 )
to_date
string
If the given filter_by is ChargeDate.CustomDate, this param is required. (e.g., 2024-08-10 )
payment_method_type
string
Payment method types can be: card or ach_debit.
per_page
integer
Indicates the number of payments to list per page. The default value is 25 per page, and the maximum limit is 200.
page
integer
Indicates the page number of the payments list. (e.g., 1 )

Request Example

Click to copy
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://payments.zoho.com/api/v1/payments?account_id=23137556") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
HttpResponse<String> response = Unirest.get("https://payments.zoho.com/api/v1/payments?account_id=23137556") .header("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .asString();
const options = { method: 'GET', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://payments.zoho.com/api/v1/payments?account_id=23137556', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
const settings = { "async": true, "crossDomain": true, "url": "https://payments.zoho.com/api/v1/payments?account_id=23137556", "method": "GET", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; $.ajax(settings).done(function (response) { console.log(response); });
import http.client conn = http.client.HTTPSConnection("payments.zoho.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/payments?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.com", "port": null, "path": "/api/v1/payments?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();
const unirest = require("unirest"); const req = unirest("GET", "https://payments.zoho.com/api/v1/payments"); req.query({ "account_id": "23137556" }); req.headers({ "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }); req.end(function (res) { if (res.error) throw new Error(res.error); console.log(res.body); });
const request = require('request'); const options = { method: 'GET', url: 'https://payments.zoho.com/api/v1/payments', qs: {account_id: '23137556'}, headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
require 'uri' require 'net/http' require 'openssl' url = URI("https://payments.zoho.com/api/v1/payments?account_id=23137556") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' response = http.request(request) puts response.read_body
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://payments.zoho.com/api/v1/payments?account_id=23137556", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
<?php $request = new HttpRequest(); $request->setUrl('https://payments.zoho.com/api/v1/payments'); $request->setMethod(HTTP_METH_GET); $request->setQueryData([ 'account_id' => '23137556' ]); $request->setHeaders([ 'Authorization' => 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' ]); try { $response = $request->send(); echo $response->getBody(); } catch (HttpException $ex) { echo $ex; }
<?php $client = new http\Client; $request = new http\Client\Request; $request->setRequestUrl('https://payments.zoho.com/api/v1/payments'); $request->setRequestMethod('GET'); $request->setQuery(new http\QueryString([ 'account_id' => '23137556' ])); $request->setHeaders([ 'Authorization' => 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' ]); $client->enqueue($request)->send(); $response = $client->getResponse(); echo $response->getBody();
var client = new RestClient("https://payments.zoho.com/api/v1/payments?account_id=23137556"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Get, RequestUri = new Uri("https://payments.zoho.com/api/v1/payments?account_id=23137556"), Headers = { { "Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }, }, }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://payments.zoho.com/api/v1/payments?account_id=23137556" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = null; const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("GET", "https://payments.zoho.com/api/v1/payments?account_id=23137556"); xhr.setRequestHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); xhr.send(data);
curl --request GET \ --url 'https://payments.zoho.com/api/v1/payments?account_id=23137556' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "success", "payments": [ { "payment_id": "1987000000724215", "amount": "200.00", "currency": "USD", "payments_session_id": "1987000000724213", "receipt_email": "charles@example.com", "reference_number": "4113662000000240001", "amount_captured": "200.00", "amount_refunded": "100.00", "fee_amount": "4.00", "net_tax_amount": "0.72", "total_fee_amount": "4.72", "net_amount": "95.28", "status": "partially_refunded", "statement_descriptor": "Zoho Payments", "description": "Payment for INV-000008", "date": 1715163045, "payment_method": { "type": "card", "card": { "card_holder_name": "Charles", "last_four_digits": "3212", "expiry_month": "01", "expiry_year": "26", "brand": "visa", "funding": "debit" } } }, {...}, {...} ] }

Retrieve Payment Details

Used to retrieve details of a specific payment.
OAuth Scope : ZohoPay.payments.READ

Path Parameters

payment_id
long
(Required)
A unique identifier for the payment.

Query Parameters

account_id
long
(Required)
The Zoho Payments account ID.

Request Example

Click to copy
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://payments.zoho.com/api/v1/payments/731000001449003?account_id=23137556") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
HttpResponse<String> response = Unirest.get("https://payments.zoho.com/api/v1/payments/731000001449003?account_id=23137556") .header("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .asString();
const options = { method: 'GET', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://payments.zoho.com/api/v1/payments/731000001449003?account_id=23137556', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
const settings = { "async": true, "crossDomain": true, "url": "https://payments.zoho.com/api/v1/payments/731000001449003?account_id=23137556", "method": "GET", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; $.ajax(settings).done(function (response) { console.log(response); });
import http.client conn = http.client.HTTPSConnection("payments.zoho.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/payments/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.com", "port": null, "path": "/api/v1/payments/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();
const unirest = require("unirest"); const req = unirest("GET", "https://payments.zoho.com/api/v1/payments/731000001449003"); req.query({ "account_id": "23137556" }); req.headers({ "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }); req.end(function (res) { if (res.error) throw new Error(res.error); console.log(res.body); });
const request = require('request'); const options = { method: 'GET', url: 'https://payments.zoho.com/api/v1/payments/731000001449003', qs: {account_id: '23137556'}, headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
require 'uri' require 'net/http' require 'openssl' url = URI("https://payments.zoho.com/api/v1/payments/731000001449003?account_id=23137556") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' response = http.request(request) puts response.read_body
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://payments.zoho.com/api/v1/payments/731000001449003?account_id=23137556", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
<?php $request = new HttpRequest(); $request->setUrl('https://payments.zoho.com/api/v1/payments/731000001449003'); $request->setMethod(HTTP_METH_GET); $request->setQueryData([ 'account_id' => '23137556' ]); $request->setHeaders([ 'Authorization' => 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' ]); try { $response = $request->send(); echo $response->getBody(); } catch (HttpException $ex) { echo $ex; }
<?php $client = new http\Client; $request = new http\Client\Request; $request->setRequestUrl('https://payments.zoho.com/api/v1/payments/731000001449003'); $request->setRequestMethod('GET'); $request->setQuery(new http\QueryString([ 'account_id' => '23137556' ])); $request->setHeaders([ 'Authorization' => 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' ]); $client->enqueue($request)->send(); $response = $client->getResponse(); echo $response->getBody();
var client = new RestClient("https://payments.zoho.com/api/v1/payments/731000001449003?account_id=23137556"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Get, RequestUri = new Uri("https://payments.zoho.com/api/v1/payments/731000001449003?account_id=23137556"), Headers = { { "Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }, }, }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://payments.zoho.com/api/v1/payments/731000001449003?account_id=23137556" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = null; const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("GET", "https://payments.zoho.com/api/v1/payments/731000001449003?account_id=23137556"); xhr.setRequestHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); xhr.send(data);
curl --request GET \ --url 'https://payments.zoho.com/api/v1/payments/731000001449003?account_id=23137556' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "success", "payment": { "payment_id": "1987000000724215", "phone": "+1 555-0100", "amount": "200.00", "currency": "USD", "payments_session_id": "1987000000724213", "receipt_email": "charles@example.com", "reference_number": "4113662000000240001", "amount_captured": "200.00", "amount_refunded": "100.00", "fee_amount": "4.00", "net_tax_amount": "0.72", "total_fee_amount": "4.72", "net_amount": "95.28", "status": "partially_refunded", "statement_descriptor": "Zoho Payments", "description": "Payment for INV-000008", "date": 1715163045, "payment_method": { "type": "card", "card": { "card_holder_name": "Charles", "last_four_digits": "3212", "expiry_month": "01", "expiry_year": "26", "brand": "visa", "funding": "debit" } }, "meta_data": [ { "key": "Key1", "value": "Value1" } ] } }