# Error Codes

## Pay Instore Errors

The types of Pay Instore errors are:

| Pay Request Error Code | Description |
|  --- | --- |
| `PAY_REQUEST_NOT_FOUND` | Pay request not found |
| `PAY_REQUEST_CREATION_ERROR` | Error error when creating the Pay Request |
| `PAY_REQUEST_ALREADY_EXISTS` | Pay request with this "origin.transactionId" already exists with status: ${status} |
| `PAY_REQUEST_TRANSACTION_ID_EXISTS` | Pay request with this "origin.transactionId" already exists with alternate information |
| `PAY_REQUEST_INVALID_TRANSACTION_ID` | "origin.transactionId" must be a valid UUIDv4 |
| `PAY_REQUEST_INVALID_TOTAL` | Total is invalid and refund does not combine with goodsAndServices or cashout. |
| `PAY_REQUEST_NOT_CANCELLABLE` | Pay request cannot be cancelled |
| `MID_NOT_FOUND` | Merchant ID not found. |
| `INVALID_MID_FORMAT` | Merchant ID must be a number. |
| `POS_NOT_CONFIGURED` | POS config is missing for posId: ${posId} |
| `POS_UNAUTHORISED` | Not authorised for merchant. |
| `RATE_LIMIT_EXCEEDED` | Rate limit exceeded, actions on the same (mid + tid) can only occur once every 250ms |
| `SANDBOX_POS_ONLY` | Only sandbox POS is supported |
| `POS_SANDBOX_TID_INVALID` | POS is currently in sandbox mode and tid is not supported: ${tid} |
| `TERMINAL_NOT_PAIRED` | Terminal is not paired. Please establish a pairing key for this terminal |
| `TERMINAL_NOT_FOUND` | Terminal not found. |
| `TERMINAL_PAIRING_INVALID` | Pairing key out of sync. Please re-establish a pairing key for this terminal |


### Sample Error


```json
{
  "error": "Pay request not found",
  "errorCode": "PAY_REQUEST_NOT_FOUND"
}
```