Request
Endpoint: !AutoRefund
https://secure.trust-provider.com/products/!AutoReject
Use the POST method for this endpoint.
Submit parameters in the x-www-form-urlencoded format.
Request parameters
The following table lists the required and optional variables.
| Parameter | Requirement | Type | Max.Length | Description |
|---|---|---|---|---|
|
required |
string |
64 chars |
The account username. This value is case sensitive. |
|
required |
string |
128 chars |
The account password. This value is case sensitive. |
|
required |
string |
The order number for which you want to request a refund. |
|
|
required |
integer |
The reason for the refund. The possible values are:
|
Sample request
curl --location 'https://secure.trust-provider.com/products/!AutoRefund' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'loginName=login_name' \
--data-urlencode 'loginPassword=login_password' \
--data-urlencode 'orderNumber=order_number' \
--data-urlencode 'refundReasonCode=1'
Response
The request is successful when the server returns a response with the status code 0.
Any errorCode less than 0 indicates an error condition.
|
The list of codes and their descriptions can be found in Error codes. |
The response format is restricted to the newline-delimited parameters.
Response parameters
The response may contain the following parameters:
| Parameter | Description |
|---|---|
|
A numeric code that identifies the type of the error. For more information, see Error codes. |
|
The error message. |
Error codes
The following table outlines error responses returned by the AutoRefund API endpoint.
Each error response consists of an errorCode and an errorMessage indicating why the request failed.
| Error Code | Error Message | Description |
|---|---|---|
|
|
The request must be submitted over HTTPS. |
|
|
The request contains an unsupported argument. |
|
|
A required argument is missing from the request. |
|
|
The provided argument value is not valid. |
|
|
An unspecified error occurred while processing the refund request. |
|
|
The account does not have permission to perform this refund request. |
|
|
The request must use the HTTP |
|
|
The refund request failed. The response message provides additional details about why the refund request failed. |