Skip to main content

Overview

When funds arrive in a merchant’s virtual account, PayGlocal requires a supporting document, typically an invoice, before the transaction can be settled. You provide it through a single-call presigned URL flow:
  1. Host the PDF yourself and generate a presigned URL for it from your own storage (for example an S3 bucket you control).
  2. Call PayGlocal’s upload endpoint with that presignedUrl in the request body. PayGlocal downloads the file from it and stores it for the transaction.
There is no separate “get a URL, then PUT the file” step. The presigned URL is yours, and PayGlocal is the one downloading from it.

When to Trigger This

Call the upload endpoint as soon as you receive an MCA_FUND_RECEIVED webhook with status DOCUMENT_PENDING. Take the gid from the webhook payload and pass it in the path.
The transaction must be in DOCUMENT_PENDING. If it is not, the call returns 400.

Request the Upload

Send your API key in the x-gl-auth header. No x-gl-digest is needed for this endpoint.
The sandbox host is https://gcc.uat.payglocal.in. Optional fields: Example request body:

What a 200 Response Means

A 200 OK means PayGlocal downloaded and stored the file. It does not mean the document is approved. After the 200:
  • The file is checked for size (10 MB maximum) and type (PDF).
  • PayGlocal’s compliance team reviews the document against the transaction.
If the file fails the size or type check after the 200, you receive no webhook. The transaction simply stays in DOCUMENT_PENDING. If a transaction has not moved to SENT_FOR_SETTLEMENT after you uploaded, upload a corrected file, or contact support with the gid.
The presignedUrl is fetched immediately during the request and is not stored or reused. Make sure it stays valid for at least a few minutes.

File Requirements

  • PDF only. The file name must end in .pdf.
  • 10 MB maximum.
  • Put the invoice number in the file name so the document is traceable (for example invoice_INV-2026-00321.pdf).

If PayGlocal Needs a Different Document

If the compliance team needs more information, you receive a CHANGE_REQUESTED alert webhook with a reason. The transaction goes back to DOCUMENT_PENDING. Upload a corrected document with the same endpoint and the same gid. See MCA Webhook Events.

Retrying and Re-uploading

  • If the call fails with Failed to download file from presigned URL, nothing was saved. Fix the URL and call again.
  • While a transaction is still DOCUMENT_PENDING, you can upload again with a new file.
  • Do not send two uploads for the same gid at the same time. The second one returns 409.

After the Upload

Once the document is accepted, PayGlocal will:
  1. Send you a TXN_SENT_FOR_SETTLEMENT webhook when the transaction is submitted for settlement.
  2. Send you a TXN_SETTLED webhook when the funds are settled to the merchant’s account.
  3. Send you a FIRC_RECEIVED webhook when the FIRC is ready.
You do not need to call any further API, just listen for the webhooks.

Errors

For the full API spec and interactive playground, see Upload Document via Presigned URL.