Errors
Lahza's API follows a RESTful architecture and utilizes conventional HTTP response codes to communicate the outcome of requests, indicating success or failure.
Outlined below are some frequently encountered errors along with their possible causes:
The authorization code provided either does not exist or has been deactivated.
All authorizations remain inactive until a transaction successfully occurs on the card. If you attempt to charge an inactive authorization, you will receive this message.
It is important to note that you can only charge an authorization for the customer who originally saved it. If an authorization is paired with the incorrect email, you may encounter this error message.
This authorization is not reusable
To utilize our charge authorization endpoint, only authorizations marked as reusable can be used. Prior to attempting a charge, please ensure that the authorization object has confirmed reusability. This step will help you avoid encountering this message.
Duplicate Transaction Reference
Each transaction within your integration on a specific domain must possess a unique reference. If you try to initiate a new transaction using a reference that has already been utilized, you will receive this message.
HTTP Codes
200, 201 | Request was successful and intended action was carried out. Note that we will always send a 200 if a charge or verify request was made. Do check the data object to know how the charge went (i.e. successful or failed). |
400 | A validation or client side error occurred and the request was not fulfilled. |
401 | The request was not authorized. This can be triggered by passing an invalid secret key in the authorization header or the lack of one |
404 | Request could not be fulfilled as the request resource does not exist. |
500, 501, 502, 503, 504 | Request could not be fulfilled due to an error on Lahza's end. This shouldn't happen so please report as soon as you encounter any instance of this. |
Last updated