v1

latestOpenAPI 3.0.32026-07-26206388.3 KB
Payment

Refund Transaction

Initiates a full or partial refund against a captured transaction.

  • refundType=F for a full refund (omit totalAmount).
  • refundType=P for a partial refund (totalAmount required).
post/gl/v1/payments/{gid}/refund

Path parameters

gidstring required

PayGlocal gid of the original transaction.

Request body

merchantTxnIdstring

Merchant's unique transaction identifier. Required for /initiate and SI sale.

merchantUniqueIdstring

Merchant's secondary unique reference.

refundType'F' | 'P' required

Full or partial refund indicator (used on refund calls).

refundActionstring

Refund lifecycle action.

captureType'F' | 'P'

Full or partial capture indicator (used on capture calls).

captureTxnboolean

If true on /initiate, the transaction is auto-captured post-auth.

merchantCallbackURLstring uri

URL PayGlocal redirects to after payment completion.

merchantCustomPayloadobject

Opaque merchant metadata echoed back in callbacks.

dcc_indicatorboolean

Set true to enable Dynamic Currency Conversion.

dccReferenceGidstring

PayGlocal DCC quote reference (when dcc_indicator=true).

Example request

{
  "refundType": "P",
  "paymentData": {
    "totalAmount": "25.00",
    "txnCurrency": "INR"
  }
}

Response

Refund accepted.

gidstring

PayGlocal global transaction ID.

statusstring

High-level status of this API response.

messagestring

Human-readable message.

timestampstring

Response timestamp (DD/MM/YYYY HH:MM:SS).

reasonCodestring

Empty on success; populated on failure.

dataobject

Operation-specific payload. Shape varies by endpoint.

errorsobject

Field-level validation errors (populated on 4xx).

Example response

{
  "gid": "gl_9c2645ed09edb22e",
  "status": "SUCCESS",
  "timestamp": "10/01/2026 15:00:00"
}