Loading...
Our REST API returns a response to the POS that includes:
| HTTP status code | Description |
|---|---|
| 200 | Transaction was successful. |
| 201 | Transaction was created. |
| 470 | Processor declined the transaction. |
| 471 | Processor approved only part of the transaction. |
| 472 | Processor declined the transaction and requests you call the card issuer. |
| 473 | Processor approved the transaction and the transaction had an AVS or CSC verification error. |
| 474 | Processor approved only part of the transaction and the transaction had an AVS or CSC verification error. |
| HTTP status code | Description |
|---|---|
| 400 | We cannot accept this request. Please check the request and try again. |
| 401 | Request did not include a valid API key. |
| 402 | Request failed. Please try again. |
| 403 | We cannot process the request with the data you have provided. |
| 404 | The resource you have requested does not exist.r. |
| 409 | Request conflicts with another existing request. This response can occur if you use the same idempotent key. |
| 429 | You have sent too many requests. Please wait and try again. |
| 500 | Internal server error. |
| 503 | Service is unavailable. |
Note: If the request contains more than one error, our REST API returns only the first error that is encountered.
| Field | Description |
|---|---|
| Content-Type | Describes the format of the data in the message body. |
| X-GP-Request-Id | Unique ID for the request. |
If the request is successful, our REST API returns objects in the response that are relevant to the request you sent.
If the request is unsuccessful, our REST API returns an error object in the response that provides details of why our REST API couldn’t process the request.
{
"error": {
"code": "invalid_input",
"message": "Invalid input data",
"detail": [
{
"description": "Value not allowed: 000",
"data_path": "/transaction/country_code"
},
{
"description": "Country code not allowed for region in request.",
"data_path": "/transaction/country_code"
}
],
"info": "https://developers.api.pit.paygateway.com/errors"
}
}| Field | Type | Description |
|---|---|---|
| code | String | Text that indicates the reason the REST API couldn’t process the request. For a list of possible values, see the Error response codes section. |
| message | String | Text that describes the error. |
| detail | Object | Information that specifies the error’s location in the message body. We return this object only when you receive a HTTP status code of 400. For a list of fields, see the detail object. |
| info | String | A link to our website for more information. |
| Field | Type | Description |
|---|---|---|
| description | String | Text that provides specific information about the error. |
| data_path | String | Location of the error, for example, transaction/create_token_reason. |
| Value | Description | Example |
|---|---|---|
| processing_forbidden | Our REST API couldn’t process the request. | The application used HTTP to send the request instead of HTTPS. |
| invalid_input | The request is missing parameters or contains incorrect parameter or header values. | A sale request doesn’t contain the amount parameter. |
| server_error | Indicates an issue connecting to our REST API. | Our REST API took too long to process a sale request |
| unauthorized | Indicates the request didn’t contain a valid API key. | A sale request contains an incorrect value for the X-GP-API-Key header field. |