Upload Document via Presigned URL
Attaches a supporting document (e.g. invoice) to an FFMS transaction using a presigned
URL you already control. Provide the presignedUrl in the request body; the backend
downloads the file from that URL and stores it. This is a single-call alternative to
uploading the file directly as multipart form data.
curl --request POST \
--url https://gcc.prod.payglocal.in/gcc/v1/ffms/external/transaction/{gid}/upload-presigned \
--header 'Content-Type: application/json' \
--header 'x-gl-auth: <api-key>' \
--data '
{
"amount": "1000.00",
"currency": "USD",
"invoiceType": "INVOICE",
"paymentType": "CARD",
"merchantId": "merchant_001",
"customerFullName": "John Doe",
"shippingDetails": "Bangalore, India",
"invoiceNumber": "INV-2026-00321",
"purposeCode": "P0102",
"fxRate": "83.12",
"fileName": "invoice_INV-2026-00321.pdf",
"presignedUrl": "https://your-bucket.s3.amazonaws.com/invoice.pdf?X-Amz-Signature=..."
}
'import requests
url = "https://gcc.prod.payglocal.in/gcc/v1/ffms/external/transaction/{gid}/upload-presigned"
payload = {
"amount": "1000.00",
"currency": "USD",
"invoiceType": "INVOICE",
"paymentType": "CARD",
"merchantId": "merchant_001",
"customerFullName": "John Doe",
"shippingDetails": "Bangalore, India",
"invoiceNumber": "INV-2026-00321",
"purposeCode": "P0102",
"fxRate": "83.12",
"fileName": "invoice_INV-2026-00321.pdf",
"presignedUrl": "https://your-bucket.s3.amazonaws.com/invoice.pdf?X-Amz-Signature=..."
}
headers = {
"x-gl-auth": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.post("https://gcc.prod.payglocal.in/gcc/v1/ffms/external/transaction/{gid}/upload-presigned")
.header("x-gl-auth", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"1000.00\",\n \"currency\": \"USD\",\n \"invoiceType\": \"INVOICE\",\n \"paymentType\": \"CARD\",\n \"merchantId\": \"merchant_001\",\n \"customerFullName\": \"John Doe\",\n \"shippingDetails\": \"Bangalore, India\",\n \"invoiceNumber\": \"INV-2026-00321\",\n \"purposeCode\": \"P0102\",\n \"fxRate\": \"83.12\",\n \"fileName\": \"invoice_INV-2026-00321.pdf\",\n \"presignedUrl\": \"https://your-bucket.s3.amazonaws.com/invoice.pdf?X-Amz-Signature=...\"\n}")
.asString();const url = 'https://gcc.prod.payglocal.in/gcc/v1/ffms/external/transaction/{gid}/upload-presigned';
const options = {
method: 'POST',
headers: {'x-gl-auth': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '1000.00',
currency: 'USD',
invoiceType: 'INVOICE',
paymentType: 'CARD',
merchantId: 'merchant_001',
customerFullName: 'John Doe',
shippingDetails: 'Bangalore, India',
invoiceNumber: 'INV-2026-00321',
purposeCode: 'P0102',
fxRate: '83.12',
fileName: 'invoice_INV-2026-00321.pdf',
presignedUrl: 'https://your-bucket.s3.amazonaws.com/invoice.pdf?X-Amz-Signature=...'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"gid": "gl_XXXXXXXXXXXXXXXX",
"status": "201 CREATED",
"message": "Request completed",
"timestamp": "05/03/2026 17:35:10",
"reasonCode": "GL-201-001",
"data": null,
"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"
}
]
}{
"gid": "gl_9c2645ed09edb22e",
"timestamp": "10/01/2026 15:00:00",
"reasonCode": "VALIDATION_ERROR",
"data": {},
"errors": {},
"errorDetails": [
{
"field": "panNumber",
"message": "Required field is missing"
}
]
}{
"gid": "gl_9c2645ed09edb22e",
"timestamp": "10/01/2026 15:00:00",
"reasonCode": "VALIDATION_ERROR",
"data": {},
"errors": {},
"errorDetails": [
{
"field": "panNumber",
"message": "Required field is missing"
}
]
}{
"gid": "gl_9c2645ed09edb22e",
"timestamp": "10/01/2026 15:00:00",
"reasonCode": "VALIDATION_ERROR",
"data": {},
"errors": {},
"errorDetails": [
{
"field": "panNumber",
"message": "Required field is missing"
}
]
}{
"gid": "gl_9c2645ed09edb22e",
"timestamp": "10/01/2026 15:00:00",
"reasonCode": "VALIDATION_ERROR",
"data": {},
"errors": {},
"errorDetails": [
{
"field": "panNumber",
"message": "Required field is missing"
}
]
}When to Use
Call this when you receive anMCA_FUND_RECEIVED webhook with status DOCUMENT_PENDING and you already have the supporting document (e.g. invoice) hosted at a presigned URL you control. Include that presignedUrl in the request body — the backend downloads the file from it and stores it for the transaction. This is a single-call alternative to uploading the file directly as multipart form data.
Upload Flow
POST this endpoint with presignedUrl in the request body → document is fetched and stored
presignedUrl you provide must be reachable at the time of the request — the backend
fetches it immediately during this call. It is not stored or reused afterward.Error Scenarios
| Scenario | HTTP Code |
|---|---|
| Missing or invalid fields | 400 |
| Invalid or missing API key | 401 |
merchantId does not match the transaction | 403 |
gid does not exist | 404 |
| Document already uploaded for this transaction | 409 |
| Internal server error | 500 |
Authorizations
Static API Key generated from the PayGlocal Partner Dashboard.
Path Parameters
Unique FFMS transaction identifier (from the MCA_FUND_RECEIVED webhook).
Body
Transaction amount.
"1000.00"
ISO 4217 currency code.
"USD"
Type of document being uploaded.
"INVOICE"
Payment type classification.
"CARD"
Merchant identifier. Must match the transaction.
"merchant_001"
File name including extension (extension max 10 characters).
"invoice_INV-2026-00321.pdf"
A presigned URL you control, pointing to the file to attach. The backend downloads the file from this URL and stores it in GCC's storage. Use this instead of a multipart file upload. The URL must remain accessible when the request is made.
"https://your-bucket.s3.amazonaws.com/invoice.pdf?X-Amz-Signature=..."
Full name of the customer (3–150 characters).
3 - 150"John Doe"
Shipping information (1–120 characters).
120"Bangalore, India"
Invoice reference number (1–100 characters).
100"INV-2026-00321"
Purpose code for remittance reporting.
"P0102"
Foreign exchange rate applied.
"83.12"
curl --request POST \
--url https://gcc.prod.payglocal.in/gcc/v1/ffms/external/transaction/{gid}/upload-presigned \
--header 'Content-Type: application/json' \
--header 'x-gl-auth: <api-key>' \
--data '
{
"amount": "1000.00",
"currency": "USD",
"invoiceType": "INVOICE",
"paymentType": "CARD",
"merchantId": "merchant_001",
"customerFullName": "John Doe",
"shippingDetails": "Bangalore, India",
"invoiceNumber": "INV-2026-00321",
"purposeCode": "P0102",
"fxRate": "83.12",
"fileName": "invoice_INV-2026-00321.pdf",
"presignedUrl": "https://your-bucket.s3.amazonaws.com/invoice.pdf?X-Amz-Signature=..."
}
'import requests
url = "https://gcc.prod.payglocal.in/gcc/v1/ffms/external/transaction/{gid}/upload-presigned"
payload = {
"amount": "1000.00",
"currency": "USD",
"invoiceType": "INVOICE",
"paymentType": "CARD",
"merchantId": "merchant_001",
"customerFullName": "John Doe",
"shippingDetails": "Bangalore, India",
"invoiceNumber": "INV-2026-00321",
"purposeCode": "P0102",
"fxRate": "83.12",
"fileName": "invoice_INV-2026-00321.pdf",
"presignedUrl": "https://your-bucket.s3.amazonaws.com/invoice.pdf?X-Amz-Signature=..."
}
headers = {
"x-gl-auth": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.post("https://gcc.prod.payglocal.in/gcc/v1/ffms/external/transaction/{gid}/upload-presigned")
.header("x-gl-auth", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"1000.00\",\n \"currency\": \"USD\",\n \"invoiceType\": \"INVOICE\",\n \"paymentType\": \"CARD\",\n \"merchantId\": \"merchant_001\",\n \"customerFullName\": \"John Doe\",\n \"shippingDetails\": \"Bangalore, India\",\n \"invoiceNumber\": \"INV-2026-00321\",\n \"purposeCode\": \"P0102\",\n \"fxRate\": \"83.12\",\n \"fileName\": \"invoice_INV-2026-00321.pdf\",\n \"presignedUrl\": \"https://your-bucket.s3.amazonaws.com/invoice.pdf?X-Amz-Signature=...\"\n}")
.asString();const url = 'https://gcc.prod.payglocal.in/gcc/v1/ffms/external/transaction/{gid}/upload-presigned';
const options = {
method: 'POST',
headers: {'x-gl-auth': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '1000.00',
currency: 'USD',
invoiceType: 'INVOICE',
paymentType: 'CARD',
merchantId: 'merchant_001',
customerFullName: 'John Doe',
shippingDetails: 'Bangalore, India',
invoiceNumber: 'INV-2026-00321',
purposeCode: 'P0102',
fxRate: '83.12',
fileName: 'invoice_INV-2026-00321.pdf',
presignedUrl: 'https://your-bucket.s3.amazonaws.com/invoice.pdf?X-Amz-Signature=...'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"gid": "gl_XXXXXXXXXXXXXXXX",
"status": "201 CREATED",
"message": "Request completed",
"timestamp": "05/03/2026 17:35:10",
"reasonCode": "GL-201-001",
"data": null,
"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"
}
]
}{
"gid": "gl_9c2645ed09edb22e",
"timestamp": "10/01/2026 15:00:00",
"reasonCode": "VALIDATION_ERROR",
"data": {},
"errors": {},
"errorDetails": [
{
"field": "panNumber",
"message": "Required field is missing"
}
]
}{
"gid": "gl_9c2645ed09edb22e",
"timestamp": "10/01/2026 15:00:00",
"reasonCode": "VALIDATION_ERROR",
"data": {},
"errors": {},
"errorDetails": [
{
"field": "panNumber",
"message": "Required field is missing"
}
]
}{
"gid": "gl_9c2645ed09edb22e",
"timestamp": "10/01/2026 15:00:00",
"reasonCode": "VALIDATION_ERROR",
"data": {},
"errors": {},
"errorDetails": [
{
"field": "panNumber",
"message": "Required field is missing"
}
]
}{
"gid": "gl_9c2645ed09edb22e",
"timestamp": "10/01/2026 15:00:00",
"reasonCode": "VALIDATION_ERROR",
"data": {},
"errors": {},
"errorDetails": [
{
"field": "panNumber",
"message": "Required field is missing"
}
]
}
