Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.payglocal.in/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The Refund Service lets you initiate a refund for an already-successful payment. PayGlocal supports both full refunds and partial refunds.

Endpoint

POST /gl/v1/payments/{gid}/refund
Replace {gid} with the PayGlocal GID returned in the original GPI service response.

Request

{
  "merchantTxnId": "23AEE8CB6B62EE2AF07",
  "merchantUniqueId": "12345678",
  "refundType": "P",
  "paymentData": {
    "totalAmount": "10.00"
  }
}

Request Fields

FieldTypeRequiredDescription
merchantTxnIdStringYesYour unique transaction reference for this refund
merchantUniqueIdStringRecommendedYour internal unique ID for this refund request
refundTypeStringYesP = Partial refund, F = Full refund
paymentData.totalAmountStringConditionalAmount to refund — required when refundType = P

Response (Success)

{
  "gid": "gl-13bbd3c4-9817-4786-96c6-12fa6191f118",
  "status": "SENT_FOR_REFUND",
  "message": "Refund Initiated Successfully",
  "timestamp": "2021-04-12T07:47:18Z",
  "reasonCode": "",
  "data": {
    "Amount": "10.00",
    "Currency": "INR",
    "merchantTxnId": "23AEE8CB6B62EE2AF07"
  },
  "errors": null
}

Refund Status Values

StatusDescriptionType
SENT_FOR_REFUNDRefund has been initiated to the processorFinal
REQUEST_ERRORRequest has field-level issues — fix and retryFinal
SYSTEM_ERRORPayGlocal system issue — retry after some timeFinal

Checking Refund Status

To confirm whether a refund was successfully processed, use the Get Status Service with the GID of the original payment transaction.

Partial vs Full Refund

ScenariorefundTypepaymentData.totalAmount
Refund the full transaction amountFNot required
Refund a specific partial amountPRequired — must be ≤ original transaction amount

Important Notes

  • Refunds can only be initiated for transactions with a SENT_FOR_CAPTURE status.
  • The merchantTxnId in the refund request must be unique — it cannot be the same as the original GPI transaction ID.
  • Refund processing time depends on the card network and issuing bank; typically 5–7 business days for the customer to see the credit.