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. Partial refunds depend on the processor of the transaction: when they are not allowed, amount must equal the remaining refundable amount. 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. Default when omitted: empty — no reason is stored. E.g. Customer request
signatureString(max:750)MRSA-MD5 signature. See Signature

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",
"data": {
"refundId": "01jzabk09xc4pbgwe8hyg4cwbf",
"refundNumber": "2507-1751420414"
}
}

message is omitted when empty. If the processor rejects the refund, status is error and message carries the processor's reason.

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 not be greater than 100."]
}
]
}

Errors​

HTTPMessageCause
422Only full refund is allowed. (in errors)Partial refund not allowed for this transaction
422Signature is invalid. (in errors, as a string)Signature check failed
400Can not create request because this transaction is in another refund process.A refund for this transaction is still in progress, or the processor allows only one partial refund
400A refund for this transaction was made on the provider side and is being reconciled. Please contact support.Refund made directly at the processor, not yet reconciled
400Refunds are not supported for this payment provider.Processor has no refund API
400Insufficient merchant balance to cover the refund amount and refund fee.Merchant balance too low
403Merchant status is {status}Merchant account not active

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
messageStringEmpty string
dataJSONRefund details object

All values in data are strings. Empty fields (null, empty, 0) are omitted.

data object fields:

FieldTypeDescription
transactionIdStringGLODIPAY original transaction ID
refStringMerchant's orderRef
refundIdStringGLODIPAY refund ID
currencyStringISO 4217 currency code
refundAmountStringRefund amount. E.g. "50.00"
statusStringRefund status. See Status Codes
statusCodeStringNumeric status code as a string. See Status Codes
metadataStringmetadata exactly as sent when the transaction was created (JSON string)
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",
"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"
}
}

Errors: HTTP 422 Invalid request data. when refundId is missing or not a ULID, or the signature is invalid (Signature is invalid.); HTTP 403 Merchant status is {status} when the merchant account is not active.


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

Delivery: Sent when the refund status changes. The request times out after 15 seconds and is not retried on a schedule — use Query Refund Status to recover a missed notification.

Payload​

Same fields as the Query Refund Status data object: all values are strings and empty fields are omitted.

FieldTypeRequiredDescription
transactionIdStringMGLODIPAY original transaction ID
refStringMMerchant's orderRef
refundIdStringMGLODIPAY refund ID
currencyStringMISO 4217 currency code
refundAmountStringMRefund amount
statusStringMRefund status. See Status Codes
statusCodeStringMNumeric status code as a string
metadataStringOmetadata exactly as sent when the transaction was created (JSON string)
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",
"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 15 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.