V2 API authentication
Requests to/api/v2/ use HTTP Basic Auth. Use your API key as the username and your API secret as the password.
API_KEY:API_SECRET string as Base64. Use the Basic prefix, not Bearer. With cURL, --user creates this header for you:
key or hash in the request body. Omit both fields. You do not need to calculate a request hash or send "hash": "none".
Migrating collection requests from V1
For these methods, change the endpoint version, add Basic Auth, and remove the body
key and hash. The business parameters and success response formats stay the same.
- Create an order with
receipt_id. Fetch that order by sending the same receipt ID asid. - Amounts remain integer minor units, such as paise for INR. The create response’s
urlremains Base64-encoded. Decode it before redirecting the customer. - Existing V1 orders can be fetched through V2 for the same business account and environment. Use the matching test or live credentials.
- Existing active API credentials and valid
pg_pool_idvalues can be reused. Migrating to V2 does not require regenerating them or changing gateway configuration.
Collection webhooks
Changing the order API version does not itself change your configured collection webhooks. Keep webhook verification separate from API request authentication. Basic Auth does not replace webhook signature verification, and the V1 request-hashing example below is not a webhook-verification recipe. Collection senders can use different payload and hash inputs, including variants withorder_id. Confirm the payload and signing contract for your configured collection sender with support before changing your webhook handler. A payout webhook contract does not establish the collection webhook format.
Use an authenticated order fetch to confirm order_status, the receipt ID, amount, and currency against your records before marking a payment successful. Receiving a webhook alone does not establish payment success.
V1 request hashing
V1 requests still sendkey and hash in the JSON body. The following algorithm applies to V1 API requests, not V2 requests or webhook payloads.
- Exclude
hashand sort the request parameters by key. - Exclude nested objects and arrays from the hash input.
- Convert scalar values to strings. Represent
trueas1, andfalseornullas an empty string. - Join those values with
|, then append|and the API secret. - Compute the SHA-512 digest as lowercase hexadecimal and send it as
hash.

