Skip to content

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

ParameterTypeRequiredDescription
octo_shop_idintYesThe shop's unique ID, available in the shop's Personal Account.
shop_refund_idstringYesThe unique refund request ID, generated by the system.
octo_secretstringYesThe shop's personal secret key, generated in the shop's Personal Account.
octo_payment_UUIDstringYesThe unique payment ID, generated by the OCTO system.
amountdecimalYesRefund 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

ParameterTypeRequiredDescription
errorintYesError code. 0 means the request was successful.
errMessagestringNoError message, if an error occurred. If not, then null.
data.octo_payment_UUIDstringYesThe unique payment ID in the Octo system.
data.refund_idstringYesThe unique refund ID.
data.refund_timestringYesTime of successful refund in ISO 8601 format.
data.statusstringYesRefund status. Possible values: succeeded, failed, pending.
apiMessageForDevelopersstringNoMessage 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

ParameterTypeRequiredDescription
errorintYesError code.
errMessagestringYesError message.
dataobjectNoMain data about the transaction (can be null if an error occurred).
errorMessagestringNoOutdated field for error messages (use errMessage instead).
apiMessageForDevelopersstringNoMessage 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.