All error codes

billing_failed

HTTP 402Retryable

Chargebee billing for the premium number addon failed. The purchase was not completed.

How to resolve

  • Verify the payment method and retry with a new Idempotency-Key.

Example response

JSON

{
  "object": "error",
  "code": "billing_failed",
  "message": "Chargebee billing for the premium number addon failed. The purchase was not completed.",
  "request_id": "req_example123",
  "docs_url": "https://docs.statxt.com/api/errors/billing_failed",
  "retryable": true,
  "recommended_action": "Verify the payment method and retry with a new Idempotency-Key.",
  "retry_after_seconds": 30
}

SDK handling

TypeScript

import { StatxtClient, StatxtApiError } from "@statxt/sdk"

const client = new StatxtClient({ apiKey: process.env.STATXT_API_KEY! })

try {
  await client.messages.send({ ... })
} catch (err) {
  if (err instanceof StatxtApiError && err.code === "billing_failed") {
    // Chargebee billing for the premium number addon failed. The purchase was not completed.
    console.error(err.requestId) // include in support tickets
  }
}

Public reference: /docs/errors/billing_failed