Capture & reversal
Standalone Capture
Capture an authorized payment to trigger settlement.
POST
/
gl
/
v1
/
payments
/
{gid}
/
capture
Capture Authorized Transaction
curl --request POST \
--url https://api.payglocal.in/gl/v1/payments/{gid}/capture \
--header 'Content-Type: application/json' \
--header 'x-gl-token-external: <api-key>' \
--data '
{
"captureType": "F"
}
'import requests
url = "https://api.payglocal.in/gl/v1/payments/{gid}/capture"
payload = { "captureType": "F" }
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/{gid}/capture")
.header("x-gl-token-external", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"captureType\": \"F\"\n}")
.asString();const url = 'https://api.payglocal.in/gl/v1/payments/{gid}/capture';
const options = {
method: 'POST',
headers: {'x-gl-token-external': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({captureType: 'F'})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"gid": "gl_9c2645ed09edb22e",
"status": "SENT_FOR_CAPTURE",
"timestamp": "10/01/2026 15:00:00",
"reasonCode": "",
"data": {
"gid": "gl_9c2645ed09edb22e",
"status": "SENT_FOR_CAPTURE",
"capturedAmount": "100.00"
}
}{
"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"
}
]
}When to Use
Capture anAUTHORIZED transaction (i.e., one initiated with captureTxn=false). Until captured, the authorization holds funds on the customer’s card but does not settle them to you.
Full vs Partial
captureType=F— full capture of the authorized amount. OmitpaymentData.totalAmount.captureType=P— partial capture.paymentData.totalAmountis required and must be ≤ the authorized amount.
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
Unified request body for payment initiation, capture, refund, reversal, and SI operations.
Most fields are optional — which fields are required depends on the operation. See each
endpoint's required: list for operation-specific rules.
Note: required: lists are best-effort and derived from current integration examples —
validate against your integration spec or contact your PayGlocal implementation lead.
Response
Capture accepted.
Standard PayGlocal response envelope (GlocalApiResponse).
Capture Authorized Transaction
curl --request POST \
--url https://api.payglocal.in/gl/v1/payments/{gid}/capture \
--header 'Content-Type: application/json' \
--header 'x-gl-token-external: <api-key>' \
--data '
{
"captureType": "F"
}
'import requests
url = "https://api.payglocal.in/gl/v1/payments/{gid}/capture"
payload = { "captureType": "F" }
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/{gid}/capture")
.header("x-gl-token-external", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"captureType\": \"F\"\n}")
.asString();const url = 'https://api.payglocal.in/gl/v1/payments/{gid}/capture';
const options = {
method: 'POST',
headers: {'x-gl-token-external': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({captureType: 'F'})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"gid": "gl_9c2645ed09edb22e",
"status": "SENT_FOR_CAPTURE",
"timestamp": "10/01/2026 15:00:00",
"reasonCode": "",
"data": {
"gid": "gl_9c2645ed09edb22e",
"status": "SENT_FOR_CAPTURE",
"capturedAmount": "100.00"
}
}{
"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"
}
]
}
