API Docs
/
No Results Found
Payment Method

Payment Method

The Payment Method APIs provide details about a payment method. You can retrieve, update, and delete payment methods.

Attribute

payment_method_id
string
A unique identifier for the payment method.
customer_id
string
A unique identifier for the customer.
customer_name
string
Name of the customer.
customer_email
string
Email address of the customer.
type
string
The type of payment method. (e.g., card or ach_debit )
ach_debit
object
Contains ACH details
Show Sub-Attributes arrow
account_holder_name
string
Name of the account holder.
routing_number
string
Routing number.
account_holder_type
string
Account holder type. ( eg., individual or company)
bank_name
string
Name of the bank.
account_type
string
Type of the account. (eg., savings)
last_four_digits
string
The last four digits.
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.
card_checks
object
Contains card checks. Card check Status can be pass, fail, unavailable, or unchecked.
Show Sub-Attributes arrow
address_line_check
string
The result of the address line check.
postal_code_check
string
The result of the postal code check.
cvc_check
string
The result of the CVC check.
status
string
The status of the payment method. (e.g., active, expired, blocked, processing, or, deleted)
currency
string
The currency in which the payment method operates.
created_time
long
The timestamp (milliseconds) indicating when the payment method was created.
last_modified_time
long
The timestamp (milliseconds) indicating when the payment method was last modified.

Example

{ "payment_method_id": "1987000000724211", "customer_id": "1987000000724207", "customer_name": "Charles", "customer_email": "charles@example.com", "type": "card", "card": { "card_holder_name": "Charles", "last_four_digits": "3212", "expiry_month": "01", "expiry_year": "26", "card_checks": { "address_line_check": "pass", "postal_code_check": "pass", "cvc_check": "pass" } }, "status": "active", "currency": "USD", "created_time": 1708950672, "last_modified_time": 1708950672 }

Update Payment Method

This API endpoint allows you to update the details of a payment method.
OAuth Scope : ZohoPay.paymentmethods.UPDATE

Arguments

type
string
(Required)
The type of payment method. (e.g., card or ach_debit )
ach_debit
object
Show Sub-Attributes arrow
account_holder_type
string
Account holder type. ( eg., individual or company)
card
object
Show Sub-Attributes arrow
expiry_month
string
The month when the card expires, formatted as MM.
expiry_year
string
The year when the card expires, formatted as YY.
billing_address
object
Contains billing address details.
Show Sub-Attributes arrow
name
string
Billing name.
address_line1
string
First line of the customer’s billing address.
address_line2
string
Second line of the customer’s billing address.
city
string
City of the customer’s billing address.
state
string
State of the customer’s billing address.
country
string
(Required)
Country of the customer’s billing address.
postal_code
string
Postal Code of the customer’s billing address.

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.com/api/v1/paymentmethods/173000002315115?account_id=23137556") .put(body) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'PUT', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://payments.zoho.com/api/v1/paymentmethods/173000002315115?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.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("PUT", "/api/v1/paymentmethods/173000002315115?account_id=23137556", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "PUT", "hostname": "payments.zoho.com", "port": null, "path": "/api/v1/paymentmethods/173000002315115?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 PUT \ --url 'https://payments.zoho.com/api/v1/paymentmethods/173000002315115?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
{ "type": "card", "card": { "expiry_month": "01", "expiry_year": "26" }, "billing_address": { "name": "Charles", "address_line1": "123 Main St", "address_line2": "Apt 4B", "city": "Detroit", "state": "Michigan", "country": "United States", "postal_code": "12345" } }

Response Example

{ "code": 0, "message": "success", "payment_method": { "payment_method_id": "1987000000724211", "customer_id": "1987000000724207", "customer_name": "Charles", "customer_email": "charles@example.com", "type": "card", "card": { "card_holder_name": "Charles", "last_four_digits": "3212", "expiry_month": "01", "expiry_year": "26", "card_checks": { "address_line_check": "pass", "postal_code_check": "pass", "cvc_check": "pass" } }, "status": "active", "currency": "USD", "billing_address": { "name": "Charles", "address_line1": "123 Main St", "address_line2": "Apt 4B", "city": "Detroit", "state": "Michigan", "country": "United States", "postal_code": "12345" }, "created_time": 1708950672, "last_modified_time": 1708950672 } }

Retrieve Payment Method

This API endpoint allows you to retrieve the details of a specific payment method.
OAuth Scope : ZohoPay.paymentmethods.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.com/api/v1/paymentmethods/173000002315115?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.com/api/v1/paymentmethods/173000002315115?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.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/paymentmethods/173000002315115?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/paymentmethods/173000002315115?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.com/api/v1/paymentmethods/173000002315115?account_id=23137556' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "success", "payment_method": { "payment_method_id": "1987000000724211", "customer_id": "1987000000724207", "customer_name": "Charles", "customer_email": "charles@example.com", "type": "card", "card": { "card_holder_name": "Charles", "last_four_digits": "3212", "expiry_month": "01", "expiry_year": "26", "card_checks": { "address_line_check": "pass", "postal_code_check": "pass", "cvc_check": "pass" } }, "status": "active", "currency": "USD", "created_time": 1708950672, "last_modified_time": 1708950672 } }

Delete Payment Method

This API endpoint allows you to delete a payment method.
OAuth Scope : ZohoPay.paymentmethods.DELETE

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.com/api/v1/paymentmethods/173000002315115?account_id=23137556") .delete(null) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'DELETE', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://payments.zoho.com/api/v1/paymentmethods/173000002315115?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.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("DELETE", "/api/v1/paymentmethods/173000002315115?account_id=23137556", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "DELETE", "hostname": "payments.zoho.com", "port": null, "path": "/api/v1/paymentmethods/173000002315115?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 DELETE \ --url 'https://payments.zoho.com/api/v1/paymentmethods/173000002315115?account_id=23137556' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "Payment method deleted" }