Refund API
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
| Field | Type | Required | Description |
|---|---|---|---|
| transactionId | String (ULID) | M | The transactionId from the IPN or transaction query. E.g. 01jza90dy6w82dfrrqvadn5vs4 |
| amount | Float | M | Refund amount. Minimum: 0.10. Maximum: remaining refundable amount. E.g. 50.00 |
| reason | String(max:1000) | O | Short description of the refund reason. Default when omitted: empty — no reason is stored. E.g. Customer request |
| signature | String(max:750) | M | RSA-MD5 signature. See Signature |
Response
All responses are wrapped:
| Field | Type | Description |
|---|---|---|
| status | String | success or error |
| message | String | Human-readable message |
| data | JSON | Refund details. See data object below |
data object:
| Field | Type | Description |
|---|---|---|
| refundId | String (ULID) | GLODIPAY refund ID |
| refundNumber | String | GLODIPAY 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
| HTTP | Message | Cause |
|---|---|---|
| 422 | Only full refund is allowed. (in errors) | Partial refund not allowed for this transaction |
| 422 | Signature is invalid. (in errors, as a string) | Signature check failed |
| 400 | Can 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 |
| 400 | A 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 |
| 400 | Refunds are not supported for this payment provider. | Processor has no refund API |
| 400 | Insufficient merchant balance to cover the refund amount and refund fee. | Merchant balance too low |
| 403 | Merchant status is {status} | Merchant account not active |
Query Refund Status
Endpoint: POST /v2/refund/query
Content-Type: application/json
Request
| Field | Type | Required | Description |
|---|---|---|---|
| refundId | String (ULID) | M | GLODIPAY refund ID (from Refund API response or Refund IPN). E.g. 01jzabk09xc4pbgwe8hyg4cwbf |
| signature | String(max:750) | M | RSA-MD5 signature. See Signature |
Response
| Field | Type | Description |
|---|---|---|
| status | String | success |
| message | String | Empty string |
| data | JSON | Refund details object |
All values in data are strings. Empty fields (null, empty, 0) are omitted.
data object fields:
| Field | Type | Description |
|---|---|---|
| transactionId | String | GLODIPAY original transaction ID |
| ref | String | Merchant's orderRef |
| refundId | String | GLODIPAY refund ID |
| currency | String | ISO 4217 currency code |
| refundAmount | String | Refund amount. E.g. "50.00" |
| status | String | Refund status. See Status Codes |
| statusCode | String | Numeric status code as a string. See Status Codes |
| metadata | String | metadata exactly as sent when the transaction was created (JSON string) |
| reason | String | Refund reason |
| message | String | Human-readable status message |
| originalRefundCreatedAt | ISO 8601 datetime | Refund creation time at the PSP |
| refundCreatedAt | ISO 8601 datetime | Refund creation time in GLODIPAY system |
| transactionCreatedAt | ISO 8601 datetime | Original transaction creation time |
| signature | String | RSA-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.
| Field | Type | Required | Description |
|---|---|---|---|
| transactionId | String | M | GLODIPAY original transaction ID |
| ref | String | M | Merchant's orderRef |
| refundId | String | M | GLODIPAY refund ID |
| currency | String | M | ISO 4217 currency code |
| refundAmount | String | M | Refund amount |
| status | String | M | Refund status. See Status Codes |
| statusCode | String | M | Numeric status code as a string |
| metadata | String | O | metadata exactly as sent when the transaction was created (JSON string) |
| reason | String | O | Refund reason |
| message | String | O | Human-readable status message |
| originalRefundCreatedAt | ISO 8601 datetime | M | Refund creation time at the PSP |
| refundCreatedAt | ISO 8601 datetime | M | Refund creation time in GLODIPAY system |
| transactionCreatedAt | ISO 8601 datetime | M | Original transaction creation time |
| signature | String | M | RSA-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"
}
| Field | Type | Required | Description |
|---|---|---|---|
| returnCode | String | M | Must be "100" to acknowledge receipt |
| description | String(max:1500) | O | Optional description |
Source
This page is derived from GLODIPAY_Refund_API_Specification_v2.