Refunds via the refund
Method
The refund
method is used to process refunds for successfully completed payments (with the succeeded
status). The minimum refund amount must not be less than 1 USD (or an equivalent amount in UZS), and the maximum refund amount, both one-time and cumulative, must not exceed the original transaction amount.
Important!
The refund amount cannot exceed 10 million sum per transaction, but there is no limit on the number of transactions.
Method refund
- URL:
https://secure.octo.uz/refund
- Method:
POST
- Content-type:
application/json
Request Example
json
{
"octo_shop_id": "{{merchant_id}}",
"shop_refund_id": "{{$randomUUID}}",
"octo_secret": "{{merchant_secret}}",
"octo_payment_UUID": "{{octo_payment_UUID}}",
"amount": 1000.00
}
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
octo_shop_id | int | Yes | The shop's unique ID, available in the shop's Personal Account. |
shop_refund_id | string | Yes | The unique refund request ID, generated by the system. |
octo_secret | string | Yes | The shop's personal secret key, generated in the shop's Personal Account. |
octo_payment_UUID | string | Yes | The unique payment ID, generated by the OCTO system. |
amount | decimal | Yes | Refund amount. |
Successful Response Example
json
{
"error": 0,
"errMessage": null,
"data": {
"octo_payment_UUID": "6b6b4477-ab8b-49dc-97eb-638b15b9b3e9",
"refund_id": "9ddd6a6c-e8c7-4859-9943-70c5bf7b4405",
"refund_time": "2024-12-18 16:59:39",
"status": "succeeded"
},
"errorMessage": null,
"apiMessageForDevelopers": "The ErrorMessage field is outdated. Please switch to errMessage for unification of the responses. Also, please know that in the future, all fields except error and errMessage will be passed to data. For more information, please contact the technical support of the service."
}
Successful Response Parameters
Parameter | Type | Required | Description |
---|---|---|---|
error | int | Yes | Error code. 0 means the request was successful. |
errMessage | string | No | Error message, if an error occurred. If not, then null . |
data.octo_payment_UUID | string | Yes | The unique payment ID in the Octo system. |
data.refund_id | string | Yes | The unique refund ID. |
data.refund_time | string | Yes | Time of successful refund in ISO 8601 format. |
data.status | string | Yes | Refund status. Possible values: succeeded , failed , pending . |
apiMessageForDevelopers | string | No | Message for developers about API status or changes. |
Example of Unsuccessful Responses
Error with Incorrect Refund Amount
json
{
"error": 22,
"errMessage": "Wrong amount to refund.",
"data": null,
"errorMessage": "Wrong amount to refund.",
"apiMessageForDevelopers": "The ErrorMessage field is outdated. Please switch to errMessage for unification of the responses. Also, please know that in the future, all fields except error and errMessage will be passed to data. For more information, please contact the technical support of the service."
}
Error with Incorrect Secret Key
json
{
"error": 2,
"errMessage": "Wrong secret",
"data": null,
"errorMessage": "Wrong secret",
"apiMessageForDevelopers": "The ErrorMessage field is outdated. Please switch to errMessage for unification of the responses. Also, please know that in the future, all fields except error and errMessage will be passed to data. For more information, please contact the technical support of the service."
}
Unsuccessful Response Parameters
Parameter | Type | Required | Description |
---|---|---|---|
error | int | Yes | Error code. |
errMessage | string | Yes | Error message. |
data | object | No | Main data about the transaction (can be null if an error occurred). |
errorMessage | string | No | Outdated field for error messages (use errMessage instead). |
apiMessageForDevelopers | string | No | Message for developers about API status or changes. |
Note
The refund
method applies only to transactions with the succeeded
status. The minimum refund amount is 1 USD (or equivalent in UZS). For questions or support, contact the technical support team.