Skip to content

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 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.
503 Service Unavailable
{
"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" }
}
  • POST /charge/create doesn’t move money. Retrying it creates a second checkout session, which is harmless if the customer only uses one. Pass your own order_id so you can match them up.
  • GET requests 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).