402 Payment Required

This reserved status is used by some services for payment-related failures; the provider's error contract determines the details.

All HTTP status codes

What does HTTP 402 mean?

HTTP does not define a universal payment workflow for 402. One API may use it for a failed charge, another for depleted credits. The body and provider documentation are essential. A 402 page on your own site may originate from a dependency, so identify the failing service before changing checkout code or asking a customer to pay again.

An investigation example

Illustrative document-service investigation
Response: 402 Payment Required from the upstream API
Provider error: account credit balance exhausted
Your public page displays the upstream failure.
Action: restore service entitlement and handle the dependency error.
Verify: the document operation completes without a duplicate charge.

Common causes

  • A provider-specific API blocks an operation after the account runs out of credit.
  • An application uses a custom response for a subscription or paid-feature restriction.

Diagnose the response

Read the provider-specific error code and account state before deciding whether payment, quota or another restriction caused the rejection.

  • Read the service's error code and billing documentation. Distinguish account credit, subscription access and a failed payment rather than treating them as the same condition.
  • Check the correct organisation and environment in the provider account. A healthy personal account does not prove that the API key belongs to an active billing account.
  • Resolve the stated billing restriction before retrying. Do not loop payment attempts or supply financial details through an unverified link in an error response.

What it means for website monitoring

Treat 402 according to the emitting service's contract. Check the customer-facing journey after restoring entitlement; a reachable payment API does not establish that the page recovered.

Reference