Our gateway returns a response to the POS that includes:
The status code you receive depends on whether the request was successful or unsuccessful.
| 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. |
| 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 your request triggers more than one error, our gateway returns only the first error that it 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 your request is successful, our gateway returns objects in the response that are relevant to your request. For more information about the objects we return in the response, see the Response fields section of each method.
If your request is unsuccessful, our gateway returns an error object in the response that provides details of why our gateway couldn’t process your request. For a list of fields, see the error object.
| Field | Type | Description |
|---|---|---|
| code | String | Text that indicates the reason the gateway couldn’t process the request. For a list of possible values, see the Error response codes section. |
| message | Object | Text that describes the error. |
| detail | String | 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 scenario |
|---|---|---|
processing_forbidden | Our gateway 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 gateway. | Our gateway 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. |
This API supports HATEOAS responses. When you send a request to our gateway, we return a list of endpoint URLs in the links object of the response.
Depending on the type of request you sent, the links object includes sub-objects for each type of transaction identifier you can use. For example, a sale request returns a sub-object for sale_id and a sub-object for reference_id. Each sub-object contains the information described in the Sub-object fields table.
| Field | Type | Description |
|---|---|---|
| href | String | Endpoint URL for the follow-on transaction. |
| relation | String | Relationship between the endpoint you sent the original request to and the endpoint for the follow-on transaction. The value is one of the following: • return - Follow-on transaction uses a returns endpoint.• self - Follow-on transaction uses the same type of endpoint as the original request.• void - Follow-on transaction uses a voids endpoint. |
| method | String | HTTP method for sending the transaction. The value is one of the following: • GET• PATCH• POST• PUT |
| description | String | Text that describes the follow-on transaction, for example, get a sale transaction using sale id. |
To send a request using the HATEOAS response: