[POST] Create Order Refund Requests
Request Description
POST /v1/order/[order id]/refund
It allows you to create order refund/return requests.
You can create a refund/return request if an order meets the following conditions:
- Order status is paid
- Order price amount is greater than zero
- There is no other refund request processing of which has not yet been completed. In such a case, the order will have an additional status: Refund request has been sent or Refund info is being updated
Once created, the request will be processed individually on our end. More details on how processing is performed.
Connection Data
- Endpoint URL:
- Production environment: https://api.ecommerce.noventiq.com/v1/order/[order id]/refund
- Test environment: https://api.ecommerce.noventiq.com.demonqweb.com/v1/order/[order id]/refund
- Request Method: POST
- Format: JSON
- Authorization: token-based
You can get it from:
- Webhook (order_id)
- Request for getting lists of IDs of orders (ids)
- Request for license information for an order product
- Format:
Bearer [token]
- Replace [token] with the token value, you get in response to the request sent to the Authentication API
Including execution peculiarities: full or partial, refund or dispute settlement, etc. If you need to make a partial refund, you have to also specify the item to be returned.
Must not exceed 500 characters. UTF is supported.
Note that this is not your end customer's email. We will contact you using this email if we have any questions during refund/return processing. The request processing results will not be duplicated to this email.
Must not exceed 80 characters.
Request Example
{
"description": "Wrong product",
"email": "merchant@gmail.com"
}
Response Description
In response to the request, you receive the server response code corresponding to the processing result. Depending on the code, the response body may contain additional parameters.
Successful Response
If processing is successful, the following will return in response server response code: HTTP/1.1 200 OК
Error Response
If an error occurs while processing the request, you receive a server response code corresponding to the result of processing.
Depending on the code, the response body may contain additional parameters.
HTTP Server Response Error Code
HTTP code | Description |
HTTP/1.1 400 Bad Request | The request is not valid (error in parameters; necessary data is not transferred, etc.). An additional error code (one or more) will be transferred in the response body. |
HTTP/1.1 401 Unauthorized | Unsuccessful authorization. An additional error code (one or more) will be transferred in the response body. |
HTTP/1.1 404 Not found | Invalid request URL or no order having the identifier transferred is found. If no order is found, an additional additional error code will return in the response body. |
HTTP/1.1 500 Request Error | Internal Server Error. Please try again later or contact support. |
Additional Error Codes for HTTP 400
Error | Message | Description |
If at least one error from the list below is found, then it returns in response to a request, other errors are not validated. | ||
110 | JSON is not valid. | The request cannot be processed. Request field structure is not valid. Check the fields in the request body against the JSON format. |
111 | Invalid data format (Content-type). | The request cannot be processed. Invalid request header. Content-type must be equal to application/json. |
15000 | Unable to identify your configuration for accessing this API. Please contact technical support. | During processing, we could not identify your account setting unambiguously. Please contact support team. |
15030 | Order refund is impossible. Order status is not equal to "paid". | The system cannot accept the refund/return request. The status of the order is not paid. |
15040 | Order refund is impossible. Order price amount is equal to zero. | The system cannot accept the refund/return request. The price amount of the order is zero. |
15050 | Order refund is impossible. Order refund request already exists. | The system cannot accept the refund/return request. A refund/return request having status New/Processing already exists for the order. |
If at least one error from the list below is found, then request validation is not interrupted. Several errors may return in response. | ||
15010 | Invalid field value: [parametr name] | The request is not valid, e.g., the required parameter is not filled out, the parameter name is incorrect, the parameter value does not match with the data type provided, or the value format is incorrect. Moreover, the error will return if null is transferred in the parameter, and this value option is not set as valid in the parameter description. |
Additional Error Codes for HTTP 401
The errors are the same for all the APIs that use token authorization.
Additional Error Codes for HTTP 404
Error | Message | Description |
15060 | Order refund is impossible. Order not found. | No order with the identifier transferred is found, or you do not have the rights to get the data. |
Example of Error Response
{
"errors": [{
"error": 15020,
"message": "Order not found."
}
]
}