Capture & reversal
Auth Reversal
Reverse (void) an authorized payment before it is captured.
POST
/
gl
/
v1
/
payments
/
{gid}
/
auth-reversal
Reverse Authorized Transaction
curl --request POST \
--url https://api.payglocal.in/gl/v1/payments/{gid}/auth-reversal \
--header 'Content-Type: application/json' \
--header 'x-gl-token-external: <api-key>' \
--data '{}'import requests
url = "https://api.payglocal.in/gl/v1/payments/{gid}/auth-reversal"
payload = {}
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}/auth-reversal")
.header("x-gl-token-external", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();const url = 'https://api.payglocal.in/gl/v1/payments/{gid}/auth-reversal';
const options = {
method: 'POST',
headers: {'x-gl-token-external': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"gid": "gl_9c2645ed09edb22e",
"status": "REVERSED",
"timestamp": "10/01/2026 15:00:00",
"reasonCode": "",
"data": {
"gid": "gl_9c2645ed09edb22e",
"status": "REVERSED"
}
}{
"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
Void anAUTHORIZED transaction that has not yet been captured. This releases the hold on the customer’s card.
Only full reversals are supported. If the payment has already been captured, use the Refund service instead.
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
Authorization reversed.
Standard PayGlocal response envelope (GlocalApiResponse).
Reverse Authorized Transaction
curl --request POST \
--url https://api.payglocal.in/gl/v1/payments/{gid}/auth-reversal \
--header 'Content-Type: application/json' \
--header 'x-gl-token-external: <api-key>' \
--data '{}'import requests
url = "https://api.payglocal.in/gl/v1/payments/{gid}/auth-reversal"
payload = {}
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}/auth-reversal")
.header("x-gl-token-external", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();const url = 'https://api.payglocal.in/gl/v1/payments/{gid}/auth-reversal';
const options = {
method: 'POST',
headers: {'x-gl-token-external': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"gid": "gl_9c2645ed09edb22e",
"status": "REVERSED",
"timestamp": "10/01/2026 15:00:00",
"reasonCode": "",
"data": {
"gid": "gl_9c2645ed09edb22e",
"status": "REVERSED"
}
}{
"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"
}
]
}
