API Docs
/
No Results Found
Payments

Payments

A payment object describes details regarding a particular customer payment. There can be multiple payments for a single invoice. Multiple invoices can be paid in a single payment as well.

Attribute

payment_id
string
Unique ID of the payment generated by the server.
payment_mode
string
Mode through which payment is made. This can be check, cash, creditcard, banktransfer, bankremittance, autotransaction or others.
amount
double
Amount paid in the respective payment.
amount_refunded
double
Amount that is refund. Refunds are applicable only for payments whose payment_mode is autotransaction. Refunds would be made to the respective card provided by the customer.
bank_charges
double
Denotes any additional bank charges.
date
string
Date on which payment is made.
status
string
Status of the payment. It can either be success or failure.
reference_number
string
Reference number generated for the payment. A string of your choice can also be used as the reference number.
description
string
Description about the payment.
customer_id
string
Customer ID of the customer involved in the payment.
customer_name
string
Name of the customer to whom the invoice is raised.
email
string
Email address of the customer involved in the payment.
autotransaction
object
If the payment 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.
Show Sub-Attributes arrow
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 provided by the gateway for the transaction.
gateway_error_message
string
Gateway error message for a failed transaction.
card_id
string
Card ID of the card associated with the transaction.
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.
invoices
array
List of invoices associated with the payment. Each invoice object contains invoice_id, invoice_number, date, invoice_amount, amount_applied and balance_amount.
Show Sub-Attributes arrow
invoice_id
string
Invoice ID of the required invoice.
invoice_number
string
Unique ID (starts with INV) of an invoice.
date
Date on which the invoice was raised.
invoice_amount
double
Total amount raised for the invoice.
amount_applied
double
Amount paid for the invoice.
balance_amount
double
Unpaid amount of the invoice.
currency_code
string
Currency code in which the payment is made.
currency_symbol
string
Customer's currency symbol.
custom_fields
array
Additional fields for the payments.
Show Sub-Attributes arrow
index
integer
Index of the custom field. It can hold any value from 1 to 10.
value
string
Value of the custom field.
label
string
Label of the custom field.
data_type
string
Data type of the custom field.

Example

{ "payment_id": "9030000079467", "payment_mode": "cash", "amount": 450, "amount_refunded": 50, "bank_charges": 10, "date": "2016-06-05", "status": "success", "reference_number": "INV-384", "description": "Payment has been added to INV-384", "customer_id": "903000000000099", "customer_name": "Bowman Furniture", "email": "benjamin.george@bowmanfurniture.com", "autotransaction": { "autotransaction_id": "90300000079465", "payment_gateway": "payflow_pro", "gateway_transaction_id": "B10E6E0F31BD", "gateway_error_message": "Gateway error message for a failed transaction.", "card_id": "90300000079226", "last_four_digits": 1111, "expiry_month": 9, "expiry_year": 2030 }, "invoices": [ { "invoice_id": "90300000079426", "invoice_number": "INV-384", "date": "2016-06-05", "invoice_amount": 450, "amount_applied": 450, "balance_amount": 0 } ], "currency_code": "USD", "currency_symbol": "$", "custom_fields": [ { "index": 1, "value": 129890, "label": "label", "data_type": "text" } ] }

Create a payment

Create a new payment.
oauthscope : ZohoSubscriptions.payments.CREATE

Arguments

customer_id
string
(Required)
Customer ID of the customer involved in the payment.
payment_mode
string
(Required)
Mode through which payment is made. This can be check, cash, creditcard, banktransfer, bankremittance, autotransaction or others.
amount
double
(Required)
Amount paid in the respective payment.
date
string
Date on which payment is made.
reference_number
string
Reference number generated for the payment. A string of your choice can also be used as the reference number.
description
string
Description about the payment.
invoices
array
List of invoices associated with the payment. Each invoice object contains invoice_id, invoice_number, date, invoice_amount, amount_applied and balance_amount.
Show Sub-Attributes arrow
invoice_id
string
(Required)
Invoice ID of the required invoice.
amount_applied
double
(Required)
Amount paid for the invoice.
exchange_rate
double
, default is 1
Exchange rate for the currency used in the invoices and customer's currency. The payment amount would be the multiplicative product of the original amount and the exchange rate.
bank_charges
double
Denotes any additional bank charges.
tax_account_id
string
Unique ID of the account which was used for transaction.
account_id
string
Unique ID of the account.
custom_fields
array
Additional fields for the payments.
Show Sub-Attributes arrow
label
string
Label of the custom field.
value
string
Value of the custom field.

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/payments -X POST -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "customer_id": "903000000000099", "payment_mode": "cash", "amount": 450, "date": "2016-06-05", "reference_number": "INV-384", "description": "Payment has been added to INV-384", "invoices": [ { "invoice_id": "90300000079426", "amount_applied": 450 } ], "exchange_rate": 1, "bank_charges": 10, "tax_account_id": "903000000000370", "account_id": "903000000000361", "custom_fields": [ { "label": "label", "value": 129890 } ] }

Response Example

{ "code": 0, "message": "The payment has been created.", "payment": { "payment_id": "9030000079467", "payment_mode": "cash", "amount": 450, "amount_refunded": 50, "bank_charges": 10, "date": "2016-06-05", "status": "success", "reference_number": "INV-384", "description": "Payment has been added to INV-384", "customer_id": "903000000000099", "customer_name": "Bowman Furniture", "email": "benjamin.george@bowmanfurniture.com", "autotransaction": { "autotransaction_id": "90300000079465", "payment_gateway": "payflow_pro", "gateway_transaction_id": "B10E6E0F31BD", "gateway_error_message": "Gateway error message for a failed transaction.", "card_id": "90300000079226", "last_four_digits": 1111, "expiry_month": 9, "expiry_year": 2030 }, "invoices": [ { "invoice_id": "90300000079426", "invoice_number": "INV-384", "date": "2016-06-05", "invoice_amount": 450, "amount_applied": 450, "balance_amount": 0 } ], "currency_code": "USD", "currency_symbol": "$", "custom_fields": [ { "index": 1, "value": 129890, "label": "label", "data_type": "text" } ] } }

Update a payment

Update an existing payment information.
oauthscope : ZohoSubscriptions.payments.UPDATE

Arguments

customer_id
string
(Required)
Customer ID of the customer involved in the payment.
payment_mode
string
(Required)
Mode through which payment is made. This can be check, cash, creditcard, banktransfer, bankremittance, autotransaction or others.
amount
double
(Required)
Amount paid in the respective payment.
date
string
Date on which payment is made.
reference_number
string
Reference number generated for the payment. A string of your choice can also be used as the reference number.
description
string
Description about the payment.
invoices
array
(Required)
List of invoices associated with the payment. Each invoice object contains invoice_id, invoice_number, date, invoice_amount, amount_applied and balance_amount.
Show Sub-Attributes arrow
invoice_id
string
(Required)
Invoice ID of the required invoice.
amount_applied
double
(Required)
Amount paid for the invoice.
exchange_rate
double
, default is 1
Exchange rate for the currency used in the invoices and customer's currency. The payment amount would be the multiplicative product of the original amount and the exchange rate.
bank_charges
double
Denotes any additional bank charges.
tax_account_id
string
Unique ID of the account which was used for transaction.
account_id
string
Unique ID of the account.
custom_fields
array
Additional fields for the payments.
Show Sub-Attributes arrow
label
string
Label of the custom field.
value
string
Value of the custom field.

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/payments/{payment_id} -X PUT -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "customer_id": "903000000000099", "payment_mode": "cash", "amount": 450, "date": "2016-06-05", "reference_number": "INV-384", "description": "Payment has been added to INV-384", "invoices": [ { "invoice_id": "90300000079426", "amount_applied": 450 } ], "exchange_rate": 1, "bank_charges": 10, "tax_account_id": "903000000000370", "account_id": "903000000000361", "custom_fields": [ { "label": "label", "value": 129890 } ] }

Response Example

{ "code": 0, "message": "The payment details have been updated.", "payment": { "payment_id": "9030000079467", "payment_mode": "cash", "amount": 450, "amount_refunded": 50, "bank_charges": 10, "date": "2016-06-05", "status": "success", "reference_number": "INV-384", "description": "Payment has been added to INV-384", "customer_id": "903000000000099", "customer_name": "Bowman Furniture", "email": "benjamin.george@bowmanfurniture.com", "autotransaction": { "autotransaction_id": "90300000079465", "payment_gateway": "payflow_pro", "gateway_transaction_id": "B10E6E0F31BD", "gateway_error_message": "Gateway error message for a failed transaction.", "card_id": "90300000079226", "last_four_digits": 1111, "expiry_month": 9, "expiry_year": 2030 }, "invoices": [ { "invoice_id": "90300000079426", "invoice_number": "INV-384", "date": "2016-06-05", "invoice_amount": 450, "amount_applied": 450, "balance_amount": 0 } ], "currency_code": "USD", "currency_symbol": "$", "custom_fields": [ { "index": 1, "value": 129890, "label": "label", "data_type": "text" } ] } }

Retrieve a payment

Details of an existing payment.
oauthscope : ZohoSubscriptions.payments.READ

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/payments/{payment_id} -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "success", "payment": { "payment_id": "9030000079467", "payment_mode": "cash", "amount": 450, "amount_refunded": 50, "bank_charges": 10, "date": "2016-06-05", "status": "success", "reference_number": "INV-384", "description": "Payment has been added to INV-384", "customer_id": "903000000000099", "customer_name": "Bowman Furniture", "email": "benjamin.george@bowmanfurniture.com", "autotransaction": { "autotransaction_id": "90300000079465", "payment_gateway": "payflow_pro", "gateway_transaction_id": "B10E6E0F31BD", "gateway_error_message": "Gateway error message for a failed transaction.", "card_id": "90300000079226", "last_four_digits": 1111, "expiry_month": 9, "expiry_year": 2030 }, "invoices": [ { "invoice_id": "90300000079426", "invoice_number": "INV-384", "date": "2016-06-05", "invoice_amount": 450, "amount_applied": 450, "balance_amount": 0 } ], "currency_code": "USD", "currency_symbol": "$", "custom_fields": [ { "index": 1, "value": 129890, "label": "label", "data_type": "text" } ] } }

Delete a payment

Delete an existing payment.
oauthscope : ZohoSubscriptions.payments.DELETE

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/payments/{payment_id} -X DELETE -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "The payment has been deleted." }