Checkout Flow (PayCollect)
PayCollect Authorize Payment (Auth Only)
Authorize a hosted PayCollect payment without capturing funds — captureTxn false, then capture or reverse later. No card data in your request.
POST
/
gl
/
v1
/
payments
/
initiate
/
paycollect
PayCollect authorize payment — auth only (request body)
curl --request POST \
--url https://api.payglocal.in/gl/v1/payments/initiate/paycollect \
--header 'Content-Type: application/json' \
--header 'x-gl-token-external: <api-key>' \
--data '
{
"merchantTxnId": "23AEE8CB6B62EE2AF07",
"merchantUniqueId": "IFNN939494NJFJ",
"captureTxn": false,
"paymentData": {
"totalAmount": "10.00",
"txnCurrency": "INR",
"billingData": {
"firstName": "John",
"lastName": "Doe",
"addressStreet1": "221B Baker Street",
"addressCity": "Bengaluru",
"addressCountry": "IND",
"emailId": "john.doe@example.com",
"callingCode": "+91",
"phoneNumber": "9999999999"
}
},
"merchantCallbackURL": "https://api.prod.payglocal.in/gl/v1/payments/merchantCallback"
}
'import requests
url = "https://api.payglocal.in/gl/v1/payments/initiate/paycollect"
payload = {
"merchantTxnId": "23AEE8CB6B62EE2AF07",
"merchantUniqueId": "IFNN939494NJFJ",
"captureTxn": False,
"paymentData": {
"totalAmount": "10.00",
"txnCurrency": "INR",
"billingData": {
"firstName": "John",
"lastName": "Doe",
"addressStreet1": "221B Baker Street",
"addressCity": "Bengaluru",
"addressCountry": "IND",
"emailId": "john.doe@example.com",
"callingCode": "+91",
"phoneNumber": "9999999999"
}
},
"merchantCallbackURL": "https://api.prod.payglocal.in/gl/v1/payments/merchantCallback"
}
headers = {
"x-gl-token-external": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.post("https://api.payglocal.in/gl/v1/payments/initiate/paycollect")
.header("x-gl-token-external", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"merchantTxnId\": \"23AEE8CB6B62EE2AF07\",\n \"merchantUniqueId\": \"IFNN939494NJFJ\",\n \"captureTxn\": false,\n \"paymentData\": {\n \"totalAmount\": \"10.00\",\n \"txnCurrency\": \"INR\",\n \"billingData\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"addressStreet1\": \"221B Baker Street\",\n \"addressCity\": \"Bengaluru\",\n \"addressCountry\": \"IND\",\n \"emailId\": \"john.doe@example.com\",\n \"callingCode\": \"+91\",\n \"phoneNumber\": \"9999999999\"\n }\n },\n \"merchantCallbackURL\": \"https://api.prod.payglocal.in/gl/v1/payments/merchantCallback\"\n}")
.asString();const url = 'https://api.payglocal.in/gl/v1/payments/initiate/paycollect';
const options = {
method: 'POST',
headers: {'x-gl-token-external': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
merchantTxnId: '23AEE8CB6B62EE2AF07',
merchantUniqueId: 'IFNN939494NJFJ',
captureTxn: false,
paymentData: {
totalAmount: '10.00',
txnCurrency: 'INR',
billingData: {
firstName: 'John',
lastName: 'Doe',
addressStreet1: '221B Baker Street',
addressCity: 'Bengaluru',
addressCountry: 'IND',
emailId: 'john.doe@example.com',
callingCode: '+91',
phoneNumber: '9999999999'
}
},
merchantCallbackURL: 'https://api.prod.payglocal.in/gl/v1/payments/merchantCallback'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"gid": "gl_o-a057c4d6b6c620741apzp0ZX2",
"status": "INPROGRESS",
"message": "Transaction Created Successfully",
"timestamp": "02/06/2026 21:47:33",
"reasonCode": "200",
"data": {
"redirectUrl": "https://api.uat.payglocal.in/gl/payflow-ui/?x-gl-token=example",
"statusUrl": "https://api.uat.payglocal.in/gl/v1/payments/gl_o-a057c4d6b6c620741apzp0ZX2/status?x-gl-token=example",
"merchantTxnId": "23AEE8CB6B62EE2AF07"
},
"errors": null
}{
"gid": "gl_9c2645ed09edb22e",
"timestamp": "10/01/2026 15:00:00",
"reasonCode": "VALIDATION_ERROR",
"data": {},
"errors": null,
"errorDetails": [
{
"fieldName": "paymentData.totalAmount",
"message": "This field is required"
}
]
}{
"gid": "gl_9c2645ed09edb22e",
"timestamp": "10/01/2026 15:00:00",
"reasonCode": "UNAUTHORIZED",
"data": {},
"errors": null,
"errorDetails": [
{
"fieldName": "authorization",
"message": "Invalid x-gl-token-external"
}
]
}Authorize payment (auth only)
Authorize a PayCollect payment without capturing funds immediately. This flow places a hold on the customer’s funds so you can capture or reverse the authorization later. The customer completes authentication on PayGlocal’s hosted checkout (redirectUrl). You do not send card or token data in the API request.
The same PayCollect initiate API as GPI is used for authorization. Set captureTxn to false in Request body.
When to Use
Use this flow when you need to verify and reserve funds before completing the transaction, such as:- Hotel and hospitality bookings
- Vehicle rentals
- Delayed order fulfillment
- Inventory confirmation workflows
- Any scenario requiring payment approval before final settlement
- Capture the authorized amount to complete the payment — standalone capture
- Reverse the authorization to release the held funds — auth reversal
Supported payment methods
Authorize (auth only) on hosted checkout supports cards and international Apple Pay only. UPI and net banking are not supported for auth transactions (they are available on GPI sale flows).| Method | Domestic | International |
|---|---|---|
| Cards | ✓ | ✓ |
| Apple Pay | — | ✓ |
Notes
- Do not send
cardDataortokenData— payment details are collected on the hosted page. - Set
captureTxntofalsein Request body, withpaymentData(amount, currency,billingData) as for GPI.
API
| Method | POST |
| Path | /gl/v1/payments/initiate/paycollect |
| Production | https://api.payglocal.in/gl/v1/payments/initiate/paycollect |
| Sandbox | https://api.uat.payglocal.in/gl/v1/payments/initiate/paycollect |
GPI, on-demand SI, auto-debit, and authorize all call this path. Only the JSON request body differs.
Headers
| Header | Mandatory | Description |
|---|---|---|
Content-Type | Yes | application/json |
x-gl-token-external | Yes | RSA-signed JWS of the request body (see Key Management) |
x-gl-merchantid | Yes | Your PayGlocal merchant ID (MID) |
x-gl-kid | Yes | Key ID of the private key used to sign the JWS |
x-gl-token-external, then POST to the URL above.
Only one successful capture is allowed per authorisation.
Next steps
| Action | API |
|---|---|
| Capture | POST /payments//capture |
| Reverse hold | POST /payments//auth-reversal |
| Status | Get transaction status — expect AUTHORIZED until capture |
| Refund | After SENT_FOR_CAPTURE — Refund |
Authorizations
RSA-signed JWS (JSON Web Signature) token carrying the request payload.
- Header:
{ "alg": "RS256", "kid": "<merchant-key-id>", "iss": "<merchant-id>", "x-gl-enc": "false", "is-digested": "true" } - Payload: the exact JSON body sent in the request (or its SHA-256 digest when
is-digested=true). - Signed with the merchant's RSA private key; PayGlocal verifies with the matching public key.
Used by all
/gl/v1/payments/*endpoints.
Body
application/json
PayCollect auth-only initiate (captureTxn must be false).
Do not send cardData, tokenData, or standingInstruction in the request body.
Hosted checkout for auth supports cards and international Apple Pay only — not UPI or net banking.
Response
Returned immediately from initiate. Redirect the customer to data.redirectUrl, then poll data.statusUrl or Get Transaction Status. Expect AUTHORIZED until you capture. No mandateId in data.
Response envelope for PayCollect initiate (200).
PayCollect authorize payment — auth only (request body)
curl --request POST \
--url https://api.payglocal.in/gl/v1/payments/initiate/paycollect \
--header 'Content-Type: application/json' \
--header 'x-gl-token-external: <api-key>' \
--data '
{
"merchantTxnId": "23AEE8CB6B62EE2AF07",
"merchantUniqueId": "IFNN939494NJFJ",
"captureTxn": false,
"paymentData": {
"totalAmount": "10.00",
"txnCurrency": "INR",
"billingData": {
"firstName": "John",
"lastName": "Doe",
"addressStreet1": "221B Baker Street",
"addressCity": "Bengaluru",
"addressCountry": "IND",
"emailId": "john.doe@example.com",
"callingCode": "+91",
"phoneNumber": "9999999999"
}
},
"merchantCallbackURL": "https://api.prod.payglocal.in/gl/v1/payments/merchantCallback"
}
'import requests
url = "https://api.payglocal.in/gl/v1/payments/initiate/paycollect"
payload = {
"merchantTxnId": "23AEE8CB6B62EE2AF07",
"merchantUniqueId": "IFNN939494NJFJ",
"captureTxn": False,
"paymentData": {
"totalAmount": "10.00",
"txnCurrency": "INR",
"billingData": {
"firstName": "John",
"lastName": "Doe",
"addressStreet1": "221B Baker Street",
"addressCity": "Bengaluru",
"addressCountry": "IND",
"emailId": "john.doe@example.com",
"callingCode": "+91",
"phoneNumber": "9999999999"
}
},
"merchantCallbackURL": "https://api.prod.payglocal.in/gl/v1/payments/merchantCallback"
}
headers = {
"x-gl-token-external": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.post("https://api.payglocal.in/gl/v1/payments/initiate/paycollect")
.header("x-gl-token-external", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"merchantTxnId\": \"23AEE8CB6B62EE2AF07\",\n \"merchantUniqueId\": \"IFNN939494NJFJ\",\n \"captureTxn\": false,\n \"paymentData\": {\n \"totalAmount\": \"10.00\",\n \"txnCurrency\": \"INR\",\n \"billingData\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"addressStreet1\": \"221B Baker Street\",\n \"addressCity\": \"Bengaluru\",\n \"addressCountry\": \"IND\",\n \"emailId\": \"john.doe@example.com\",\n \"callingCode\": \"+91\",\n \"phoneNumber\": \"9999999999\"\n }\n },\n \"merchantCallbackURL\": \"https://api.prod.payglocal.in/gl/v1/payments/merchantCallback\"\n}")
.asString();const url = 'https://api.payglocal.in/gl/v1/payments/initiate/paycollect';
const options = {
method: 'POST',
headers: {'x-gl-token-external': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
merchantTxnId: '23AEE8CB6B62EE2AF07',
merchantUniqueId: 'IFNN939494NJFJ',
captureTxn: false,
paymentData: {
totalAmount: '10.00',
txnCurrency: 'INR',
billingData: {
firstName: 'John',
lastName: 'Doe',
addressStreet1: '221B Baker Street',
addressCity: 'Bengaluru',
addressCountry: 'IND',
emailId: 'john.doe@example.com',
callingCode: '+91',
phoneNumber: '9999999999'
}
},
merchantCallbackURL: 'https://api.prod.payglocal.in/gl/v1/payments/merchantCallback'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"gid": "gl_o-a057c4d6b6c620741apzp0ZX2",
"status": "INPROGRESS",
"message": "Transaction Created Successfully",
"timestamp": "02/06/2026 21:47:33",
"reasonCode": "200",
"data": {
"redirectUrl": "https://api.uat.payglocal.in/gl/payflow-ui/?x-gl-token=example",
"statusUrl": "https://api.uat.payglocal.in/gl/v1/payments/gl_o-a057c4d6b6c620741apzp0ZX2/status?x-gl-token=example",
"merchantTxnId": "23AEE8CB6B62EE2AF07"
},
"errors": null
}{
"gid": "gl_9c2645ed09edb22e",
"timestamp": "10/01/2026 15:00:00",
"reasonCode": "VALIDATION_ERROR",
"data": {},
"errors": null,
"errorDetails": [
{
"fieldName": "paymentData.totalAmount",
"message": "This field is required"
}
]
}{
"gid": "gl_9c2645ed09edb22e",
"timestamp": "10/01/2026 15:00:00",
"reasonCode": "UNAUTHORIZED",
"data": {},
"errors": null,
"errorDetails": [
{
"fieldName": "authorization",
"message": "Invalid x-gl-token-external"
}
]
}
