Documentation Index
Fetch the complete documentation index at: https://docs.payglocal.in/llms.txt
Use this file to discover all available pages before exploring further.
This page covers authentication for the Partner Merchant Onboarding APIs (
/gcc/v2/partner/merchant/onboard/* and /gcc/v2/partner/merchant/verification/*).
The Payment APIs (/gl/v1/payments/*) use a different scheme — an RSA-signed JWS token sent in
the x-gl-token-external header. See Key Management → Overview.Overview
The Merchant Onboarding APIs use a two-header authentication scheme:| Header | Description |
|---|---|
x-gl-auth | Your static API Key, generated from the PayGlocal Partner Dashboard |
x-gl-digest | A per-request HMAC-SHA256 signature, Base64-encoded |
Credentials
Partners generate API credentials from the PayGlocal Partner Dashboard:- API Key — sent in the
x-gl-authheader. A static, non-secret identifier. Safe to store in environment variables. - API Secret — used as the HMAC signing key to generate
x-gl-digest. Treat this like a password. Never expose it in client-side code, logs, or version control.
Digest Generation
Algorithm
Signing Input Rules
| HTTP Method | Signing Input |
|---|---|
GET | The request URI path (including query string if present). Do not include the host or scheme. |
POST | The exact raw request body (JSON string) |
PUT | The exact raw request body (JSON string) |
Code Examples — POST / PUT Requests
Code Examples — GET Requests
Common Mistakes
| Mistake | Result |
|---|---|
| Using the API Key (not the Secret) as the HMAC key | 401 Unauthorized |
| Computing digest over parsed/re-serialized JSON instead of the raw body | 401 Unauthorized |
| Using the full URL (with host) for GET request digest instead of the request URI path | 401 Unauthorized |
| Using the body for GET request digest instead of the request URI path | 401 Unauthorized |
| Not Base64-encoding the HMAC output | 401 Unauthorized |
| Sending the digest as hex instead of Base64 | 401 Unauthorized |
Key Management
- Keys can be generated and rotated from the PayGlocal Partner Dashboard.
- PayGlocal supports multiple simultaneous active keys — activate the new key before deactivating the old one for zero-downtime rotation.
- Key expiration policies are configured in accordance with RBI regulations.
Create Onboarding
Your first authenticated API call.
Sandbox Testing
Test your auth setup with Sandbox credentials.
FAQ — 401 Errors
Diagnose and fix authentication failures.

