Skip to main content

Refund API

Ask AI

Initiate refunds for completed transactions and query their status.


Initiate Refund

Endpoint: POST /v2/refund
Content-Type: application/json

Refunds can be full or partial (subject to per-provider constraints — some providers only support full-amount refunds). Refunds may be auto-processed immediately or held for manual approval, depending on merchant configuration.

The maximum refundable amount per refund is: paidAmount minus the total already refunded for the transaction.

Request

FieldTypeRequiredDescription
transactionIdString (ULID)MThe transactionId from the IPN or transaction query. E.g. 01jza90dy6w82dfrrqvadn5vs4
amountFloatMRefund amount. Minimum: 0.10. Maximum: remaining refundable amount. E.g. 50.00
reasonString(max:1000)OShort description of the refund reason. E.g. Customer request
signatureString(max:750)MRSA-MD5 signature. See Signature

Certain providers (PayAgency, SmartPay, ClisaPay, FinvyPay, WPay) only support full-amount refunds.

Response

All responses are wrapped:

FieldTypeDescription
statusStringsuccess or error
messageStringHuman-readable message
dataJSONRefund details. See data object below

data object:

FieldTypeDescription
refundIdString (ULID)GLODIPAY refund ID
refundNumberStringGLODIPAY human-readable refund number

Auto-processed immediately:

{
"status": "success",
"message": null,
"data": {
"refundId": "01jzabk09xc4pbgwe8hyg4cwbf",
"refundNumber": "2507-1751420414"
}
}

Pending manual approval:

{
"status": "success",
"message": "Refund created and waiting for approval.",
"data": {
"refundId": "01jzabk09xc4pbgwe8hyg4cwbf",
"refundNumber": "2507-1751420414"
}
}

Validation error (HTTP 422):

{
"status": "error",
"message": "Invalid request data.",
"errors": [
{
"field": "amount",
"message": ["The amount must be between 0.1 and 100."]
}
]
}

Query Refund Status

Endpoint: POST /v2/refund/query
Content-Type: application/json

Request

FieldTypeRequiredDescription
refundIdString (ULID)MGLODIPAY refund ID (from Refund API response or Refund IPN). E.g. 01jzabk09xc4pbgwe8hyg4cwbf
signatureString(max:750)MRSA-MD5 signature. See Signature

Response

FieldTypeDescription
statusStringsuccess
messageStringHuman-readable message
dataJSONRefund details object

data object fields:

FieldTypeDescription
transactionIdStringGLODIPAY original transaction ID
refStringMerchant's orderRef
refundIdStringGLODIPAY refund ID
currencyStringISO 4217 currency code
refundAmountFloatRefund amount
statusStringRefund status. See Status Codes
statusCodeNumberNumeric status code. See Status Codes
metadataJSONKey-value pairs from the original session
reasonStringRefund reason
messageStringHuman-readable status message
originalRefundCreatedAtISO 8601 datetimeRefund creation time at the PSP
refundCreatedAtISO 8601 datetimeRefund creation time in GLODIPAY system
transactionCreatedAtISO 8601 datetimeOriginal transaction creation time
signatureStringRSA-MD5 signature — verify with RSA Public Key

Example:

{
"status": "success",
"message": "",
"data": {
"transactionId": "01jza90dy6w82dfrrqvadn5vs4",
"ref": "ORDER-001",
"refundId": "01jzabk09xc4pbgwe8hyg4cwbf",
"currency": "USD",
"refundAmount": 50.00,
"status": "refund_successful",
"statusCode": 11,
"metadata": { "orderId": "12345" },
"reason": "Customer request",
"message": null,
"originalRefundCreatedAt": "2026-04-14T11:00:00+00:00",
"refundCreatedAt": "2026-04-14T11:00:01+00:00",
"transactionCreatedAt": "2026-04-14T10:00:00+00:00",
"signature": "base64-encoded-rsa-signature"
}
}

Refund IPN Notification

GLODIPAY sends an HTTP POST to the notificationUrl of the original transaction when a refund status changes.

Method: POST
Content-Type: application/json

Retry policy: If your server does not return {"returnCode":"100"} within 30 seconds, GLODIPAY will retry delivery.

Payload

FieldTypeRequiredDescription
transactionIdStringMGLODIPAY original transaction ID
refStringMMerchant's orderRef
refundIdStringMGLODIPAY refund ID
currencyStringMISO 4217 currency code
refundAmountFloatMRefund amount
statusStringMRefund status. See Status Codes
statusCodeNumberMNumeric status code
metadataJSONOKey-value pairs from the original session
reasonStringORefund reason
messageStringOHuman-readable status message
originalRefundCreatedAtISO 8601 datetimeMRefund creation time at the PSP
refundCreatedAtISO 8601 datetimeMRefund creation time in GLODIPAY system
transactionCreatedAtISO 8601 datetimeMOriginal transaction creation time
signatureStringMRSA-MD5 signature — verify with RSA Public Key

Example IPN Payload:

{
"transactionId": "01jza90dy6w82dfrrqvadn5vs4",
"ref": "ORDER-001",
"refundId": "01jzabk09xc4pbgwe8hyg4cwbf",
"currency": "USD",
"refundAmount": 50.00,
"status": "refund_successful",
"statusCode": 11,
"metadata": { "orderId": "12345" },
"reason": "Customer request",
"message": null,
"originalRefundCreatedAt": "2026-04-14T11:00:00+00:00",
"refundCreatedAt": "2026-04-14T11:00:01+00:00",
"transactionCreatedAt": "2026-04-14T10:00:00+00:00",
"signature": "base64-encoded-rsa-signature"
}

Acknowledgement

Your server must respond within 30 seconds:

{
"returnCode": "100",
"description": "Received"
}
FieldTypeRequiredDescription
returnCodeStringMMust be "100" to acknowledge receipt
descriptionString(max:1500)OOptional description

Source

This page is derived from GLODIPAY_Refund_API_Specification_v2.

Bookmarks

No bookmarks yet.
Hover over a heading and click to save a section.