Card Refunds
Description: When a merchant requests /gapi/v1/payment-page/:session ID/refund GAPI initiates a refund process of existing success attempt with debited funds.
As a result, the current endpoint returns an identifier and attributes of attempt being refunded.
session.error[x].invalid-params[x].reason | Description |
valueHasExtraLength | the length of value does not meet the field's validation requirement |
arrayHasExtraAttributes | the number of array attributes is exceeded within value, which does not meet the field’s validation requirement |
objectHasExtraAttributes | the number of object attributes is exceeded within value, which does not meet the field’s validation requirement |
valueIsNotPermited | value does not match the predefined list of field validation requirement values |
valueIsRequired | value of a required parameter must not be empty according to the field's validation requirement |
valueHasWrongFormat | value is not formatted according to the field's validation requirement |
post
/gapi/v1/payment-page/{sessionID}/refund
Refund
Sample:
{
"session":{
"id":null,
"error":[
{
"type":"validation-error",
"title":"Your request attributes didn't validate.",
"invalid-params":[
{
"name":"session.someKey",
"code":"4.20",
"reason":"valueHasExtraLength"
},
{
"name":"session.someKey2",
"code":"4.20",
"reason":"valueIsNotPermited"
}
]
}
]
}
}
Attribute errors[x].invalid-params[y].reason | Error code | Error description |
notFound | 1.3 | Session not found |
invalidParams | 4.20 | One of the request parameters has an incorrect value |
Event errors:
Attribute errors[x].type | Error code | Error description |
invalidAmount | 4.1 | Invalid amount of the refund. The refund amount less than 0.01 or is exceeded by the amount of the order. |
AFDeclined | 4.6 | The operation was rejected by the security system. |
invalidOrderState | 4.7 | The payment is in an invalid state. |
processingError | 4.10 | Bank refused the operation. Please, check input data and try again. |
facadeDeclined | 4.13 | Unexpected error. Contact to our support team. |
NotAllowedByAPI | 4.18 | This Payler API method is not allowed to be used from the IP address from which the request was made |
refundOfRecurrentNotSupported | 4.105 | Refunds of recurring payments are not supported by the bank |
partialRefundNotAllowed | 4.200 | Partial refunds are not supported (it is impossible to return to the customer part of the previously debited amount) |
multipleRefundNotSupported | 4.201 | Subsequent returns are not supported automatically. You need to contact support to get operation done. |
thereIsNewerAttempt | 4.608 | Newer payment attempt started, proceeding with the old is not possible. |
TransactionIsNotAllowed | 4.900 | The operation is not permitted for the merchant. Need to contact support |
declined | 4.903 | The operation was rejected. Need to contact support |
temporaryMalfunction | 4.904 | Temporary problem. Try the operation later |
emoneyRefundNotSupported | 4.1000 | Refunds are not supported for processed payments via e-wallet |
Last modified 1h ago