Master Zoho Payments Testing with APIDog: A Developer's Guide

Master Zoho Payments Testing with APIDog: A Developer's Guide

ImageURLs
Tags
Zoho
Testing
Payments
APIDog
Published
January 30, 2026
Author
Abhishek Tiwari

πŸ’³ Master Zoho Payments Testing with APIDog β€” A Complete OAuth + API Workflow Guide

Integrating a payment gateway like Zoho Payments can feel overwhelmingβ€”especially when OAuth authentication and webhook handling come into play.
In this guide, you’ll learn how to:
βœ… Register your Zoho OAuth client properly
βœ… Generate access & refresh tokens step-by-step
βœ… Test Zoho Payments APIs smoothly using APIDog
βœ… Validate webhooks before touching production code
By the end, you’ll have a fully tested payment flow with zero guesswork β€” perfect for building reliable fintech features.

πŸš€ Why Use APIDog for Zoho Payments?

While tools like Postman can send requests, APIDog gives you a full API lifecycle workspace, which is ideal for sensitive payment integrations.

Key Benefits:

  • πŸ” Design + Test + Document in one place
  • πŸ§ͺ Mock payment responses (success/failure flows)
  • πŸ€– Automated API testing
  • πŸ“„ Auto-generated code snippets (Node.js, Python, Go, etc.)
This lets you focus on business logic instead of debugging chaos.

βœ… Prerequisites

Before starting, make sure you have:
  • A Zoho Payments sandbox or test organization
  • APIDog installed
  • Access to Zoho Developer Console

πŸ” OAuth Setup for Zoho Payments (Complete Flow)

This is a one-time setup that gives your app secure access to Zoho APIs.
⚠️ Only Account Owners or Admins in Zoho Payments can generate OAuth tokens.

🧾 Step 1: Register a New OAuth Client

  1. Go to Zoho Developer Console
  1. Ensure the client type in the URL is set to ORG
  1. Enter:
Parameter
Description
Client Name
Name of your application
Homepage URL
Your website or app homepage
Authorized Redirect URI
Callback URL after authorization
  1. Click CREATE
πŸŽ‰ You’ll now receive:
  • Client ID
  • Client Secret
πŸ‘‰ Keep these secure β€” never expose them publicly.
notion image

πŸ”‘ Step 2: Generate Authorization Code

Create a GET request in your browser:
https://accounts.zoho.in/oauth/v2/org/auth?

Required Parameters:

Parameter
Description
scope
Permissions like ZohoPay.payments.CREATE, READ, UPDATE
client_id
From Developer Console
soid
Format: zohopay.{account_id}
response_type
code
redirect_uri
Same as registered
state
Random string
access_type
online or offline

Example:

https://accounts.zoho.in/oauth/v2/org/auth?scope=ZohoPay.payments.CREATE,ZohoPay.payments.READ&client_id=1005xxx&soid=zohopay.8xxxx&response_type=code&redirect_uri=https://www.premium.tempusmail.com/&access_type=offline
βœ” Click ACCEPT to grant access.
You’ll be redirected with:
?code=AUTHORIZATION_CODE
Β 

πŸ”„ Step 3: Generate Access & Refresh Tokens

Now make a POST request:
https://accounts.zoho.in/oauth/v2/token?

Parameters:

Parameter
Value
code
Authorization code
client_id
Your client ID
client_secret
Your secret
redirect_uri
Same callback URL
grant_type
authorization_code

You’ll receive:

  • πŸ” access_token (valid ~1 hour)
  • ♻️ refresh_token (long-lived)
notion image

πŸ” Step 4: Refresh Expired Access Tokens

When access token expires:
https://accounts.zoho.in/oauth/v2/token?

Parameters:

Parameter
Value
refresh_token
From previous step
client_id
Your client ID
client_secret
Your secret
grant_type
refresh_token
βœ… New access token generated instantly.
notion image

🚫 Revoke a Refresh Token (If Needed)

https://accounts.zoho.in/oauth/v2/token/revoke?
notion image
Parameter
Value
token
refresh_token

πŸ§ͺ Testing Zoho Payments APIs in APIDog

Once authenticated, store your token as a global environment variable:
access_token = your_token_here

πŸ”— Example: Create Payment Link

Method:

POST

URL:

{{base_url}}/hostedpages

Headers:

Authorization: Zoho-oauthtoken {{access_token}} X-com-zoho-subscriptions-organizationid: {{org_id}}

Body:

{ "customer_id":"9000000000000", "plan":{ "plan_code":"premium-monthly", "price":2900 } }
🎯 Response returns hosted payment page URL.

πŸ”” Webhook Testing (Highly Recommended)

In APIDog you can:
βœ” Define webhook schemas
βœ” Simulate payment success/failure
βœ” Validate real payload structure
This ensures your backend never breaks when real money flows in.

πŸŽ‰ Final Thoughts

By combining Zoho Payments OAuth with APIDog’s testing power, you get:
βœ… Secure authentication
βœ… Fully tested payment flows
βœ… Zero production surprises
βœ… Faster development
Once verified, export API-ready code and plug it directly into your application.