UPI Intent
PayCollect UPI Intent flow — minimal and enriched requests, initiation response (redirectUrl), post-success statusData, headers, and merchant callback.
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.
When to Use
Use UPI Intent when your merchant uses hosted PayCollect for INR UPI and wants PayGlocal to collect the approval flow on its hosted checkout. Your backend calls GPI (Checkout Flow) (POST /gl/v1/payments/initiate/paycollect); the JSON body is the payment intent. PayGlocal returns a hosted redirectUrl so the shopper completes UPI_INTENT via QR or in-flow approval.
redirectUrl / statusUrl (session created, customer not finished); (2) after successful authorization on a status or payflow payload — data.statusData with paymentMethod: "UPI_INTENT" and UI-oriented blocks.UPI (India)
Hosted PayCollect is the standard entry point for UPI in India: your server calls this endpoint with amount and callback URL, then sends the customer toredirectUrl. For the customer journey and funds flow see UPI. This page covers UPI Intent request/response details, including optional billingData / riskData and the post-success statusData payload.
Merchant Endpoint
| Environment | Base URL | Initiate (PayCollect) |
|---|---|---|
| Sandbox | https://api.uat.payglocal.in | POST /gl/v1/payments/initiate/paycollect |
| Production | https://api.payglocal.in | POST /gl/v1/payments/initiate/paycollect |
gcc.uat.payglocal.in (merchant console “Test transaction”) may use a different path and browser cookies. For production integrations, call only api.uat.payglocal.in or api.payglocal.in with RSA-signed JWS in x-gl-token-external.Request Body
The JSON is the plaintext your client signs (or wraps per your encryption settings). You can send a minimal body for UPI or addpaymentData.billingData and riskData for richer risk scoring and display.
Minimal (UPI-ready)
With optional billing and risk data
The example below matches a fuller integration: billing contact lines, customer history, line-itemorderData, and shippingData (required patterns for some alternate payment methods may still apply globally—validate with your integration spec for UPI-only traffic).
What the fields mean (plain language)
merchantTxnId: Your unique order reference. It appears in the hosted checkout, theredirectUrlsession, and the callback so you can match UI screenshots and server logs to an order.paymentData.totalAmount/paymentData.txnCurrency: The amount and currency for this session (e.g.1044/INR).paymentData.billingData: Optional shopper contact and address lines used for receipts and richer display on the hosted page, and for fraud scoring when allowed.riskData.customerData: Merchant-provided signals about the shopper (merchant-assigned id, account age, successful-order count) used to improve risk decisions.riskData.orderData: Line items and unit prices to help reconciliation and give context to fraud engines.riskData.shippingData: Shipping/delivery address info; required for some alternate payment methods and uses ISO-style country codes foraddressCountry.merchantCallbackURL: HTTPS endpoint PayGlocal POSTs to after checkout completes; verify thex-gl-tokenin the callback before trusting the payload (see Payment Initiation Flow).
Response A — After initiation (session / QR phase)
Immediately after a successful PayCollect API call, the envelope may nest twice insidedata. Use the innermost object for the hosted session links.
- Outer
gid/status/reasonCode: Outcome of the initiate HTTP call. data.gid: PayGlocal order / payflow id (gl_o-...) for the hosted session.data.data.redirectUrl: HTTP GET target for the browser; customer completes UPI here.data.data.statusUrl: Optional browser or integration URL carrying a status token; prefer server Get Status and validated callbacks for truth.data.data.merchantTxnId: Echo of your transaction id.
Response B — After successful payment (status / payflow UI payload)
After the customer completes UPI and the transaction moves to a captured (or sent-for-capture) state, some responses returndata.statusData — a UI-oriented block for confirmation screens and deep links. paymentMethod is set to UPI_INTENT for this rail.
How to read statusData
headerInfo: Display metadata such asmid,merchantTxnId, andmerchantShortName(optional logo/product fields appear when present).amountInfo:amount,currency, andcurrencySymbolfor the success UI (e.g. ₹ + 1044 + INR).paymentMethod:UPI_INTENTidentifies the rail used for this session.messageBlock.displayMessage: Template string for the success line; replace SYMBOL/AMOUNT/CURRENCY withamountInfowhen rendering.messageBlock.status: Lifecycle state returned to the UI (e.g.SENT_FOR_CAPTURE).messageBlock.reasonCode: PayGlocal reason code aligned with the message (e.g.GL-201-001).merchantCallback: Full callback URL (includingx-gl-token) for redirect-style handoff to your domain — treat the token as a secret and always validate server-side.forms: Reserved/extended fields; often an empty{}for standard UPI Intent.
HTTP Headers (server-to-server)
| Header | Required? | Notes |
|---|---|---|
Content-Type | Yes | application/json for JSON bodies (unless your client sends encrypted content per JWE setup). |
x-gl-token-external | Yes | RSA-signed JWS for the Payment API per Key Management. |
x-gl-merchantid, x-gl-kid | Often | Added by official sample clients alongside signing. |
:authority, :method, :path, :scheme | No | HTTP/2 pseudo-headers set by the client stack. |
cookie, origin, referer, sec-*, user-agent | No | Typical browser-only noise when copying DevTools from the GCC console—not part of your merchant server contract. |
After redirectUrl
- HTTP GET redirect the shopper to
redirectUrlfrom Response A (Payment Initiation Flow). - Customer completes UPI on the hosted page.
- PayGlocal POSTs to your
merchantCallbackURLwithx-gl-token; validate and show your confirmation page. - Use Get Transaction Status with the payflow / order
gidwhenever you need authoritative state.
Error Scenarios
| Scenario | Typical signal | Action |
|---|---|---|
| Initiate validation failure | HTTP 4xx, errors populated | Fix body fields per OpenAPI / support feedback and retry. |
| Auth / signing failure | HTTP 401 | Check x-gl-token-external, key id, and clock skew. |
| Customer abandons hosted page | No callback | Poll Get Status and expire your own checkout session. |
| Token validation fails on callback | Invalid x-gl-token | Use Get Status with stored gid / merchantTxnId before showing success. |
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
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.
Merchant's unique transaction identifier. Alphanumeric only.
4 - 50"23AEE8CB6B62EE2AF07"
Customers are redirected here post payment completion.
"https://api.prod.payglocal.in/gl/v1/payments/merchantCallback"
Hosted checkout payment details for PayCollect standing instruction registration.
Do not send cardData, tokenData, or authenticationData — the customer registers the mandate on redirectUrl.
Must be false for authorise-only.
false Optional stable merchant-side ID for idempotency and reconciliation. Alphanumeric only.
15 - 40"IFNN939494NJFJ"
Recommended for fraud checks and processor compliance.
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).
PayGlocal transaction ID. Use for status, capture, and refund APIs.
"gl_9c2645ed09edb22e"
High-level status. Typically INPROGRESS immediately after initiate.
"INPROGRESS"
Human-readable status message.
"Transaction Created Successfully"
Response timestamp (DD/MM/YYYY HH:MM:SS).
"02/06/2026 21:47:33"
Success code on initiate (e.g. 200). See 4xx responses for error codes.
"200"
null on success.

