Errors
When a request fails, NogorPay returns a non-2xx status and a JSON body with success: false and a human-readable message.
{ "success": false, "message": "amount must be a valid positive number"}Branch on the HTTP status code, not on the message text. Messages can change.
Status codes
Section titled “Status codes”| Status | Meaning | What to do |
|---|---|---|
200 |
Success. | |
201 |
A charge was created. | |
400 |
The request is invalid: a field is missing or wrong, or the webhook domain isn’t allowed. | Fix the request. Don’t retry it unchanged. |
401 |
The API key is missing or invalid. | Check the NOGORPAY-API-KEY header. |
403 |
The account is deactivated, or a plan limit was reached (limitExceeded: true). |
Check your account or upgrade your plan on the Billing page. |
404 |
The brand or charge wasn’t found. | Check the ID you sent. |
500 |
Something went wrong on NogorPay’s side. | Retry after a short wait. |
503 |
NogorPay is under scheduled maintenance. The body has status: "maintenance". |
Retry later. |
Maintenance response
Section titled “Maintenance response”{ "success": false, "status": "maintenance", "message": "System is under scheduled maintenance. No API calls or device syncs are being accepted.", "maintenance": { "...": "details such as the expected end time" }}Retrying safely
Section titled “Retrying safely”POST /charge/createdoesn’t move money. Retrying it creates a second checkout session, which is harmless if the customer only uses one. Pass your ownorder_idso you can match them up.GETrequests are always safe to retry.- Use a timeout of about 15 seconds and back off between retries (for example 1 s, 2 s, 4 s).
