Skip to content
ZytePedevelopersDashboard
DocsAPI reference
API reference

Merchant Balance

Returns wallet, collection, settlement-lock, and payout-deposit balances for the merchant identified by the signed API key.

GET/payments/balancePlugin signed
Use your enabled merchant account. Examples run on your server, never in this documentation.

Authentication

Use plugin-signed headers. The signature scheme differs from merchant HMAC. Local source clarifies Unix-second timestamps and hexadecimal output; confirm deployment compatibility.

See authentication.

Workflow notes

  • The merchant is resolved from the API key; do not send a merchant_id.
  • Sign the empty GET body using timestamp + ".GET./payments/balance.".
  • The request is restricted to an active merchant and its approved source IPs.

Before you send

Check the field labels and use your enabled merchant account. Examples illustrate the API contract; confirm deployment-specific limits and error handling before launch. This page never sends a request.

Request example

Choose Node.js, Python, PHP, Ruby, Java or cURL. Run signed requests on your backend. PHP, Ruby and Java include signing directly. Java requires JDK 17 or newer.

import { pluginSignedHeaders } from './plugin-signing.mjs';
const path = `/payments/balance`;
const query = '';
const body = ''; // GET requests have no body
const headers = pluginSignedHeaders({
  method: 'GET', path, body,
  keyId: process.env.ZYTEPE_API_KEY_ID,
  secret: process.env.ZYTEPE_API_SECRET,
});
const url = 'https://api.zytepe.com' + path + (query ? '?' + query : '');
const response = await fetch(url, { method: 'GET', headers });
if (!response.ok) throw new Error('Request failed: HTTP ' + response.status);
const result = await response.json();
// Store the returned identifiers securely. Do not log customer data.

Request body

No request body for GET.

Example response

JSON · response
{
  "account_id": "merchant-account-uuid",
  "available_balance": 1000,
  "locked_balance": 100,
  "collection_balance": 5000,
  "collection_locked_balance": 500,
  "payout_deposit_balance": 2000,
  "payout_deposit_locked_balance": 200,
  "pending_settlements": 500,
  "currency": "INR"
}