自動チャージはプランに含まれていません
この問題が発生すると、APIは402 Payment Requiredを返します。そのtypeはhttps://lingo.dev/docs/api/errors/auto-top-up-unavailableです。すべてのエラーに共通する形式については、エラーとステータスコードをご覧ください。
自動チャージにはクレジット残高を利用できるプランが必要ですが、組織<organizationId>は対象のプランを利用していません。まずプランをアップグレードし、その後、自動チャージを有効にしてください。
フィールド#
レスポンス本文には、標準のtype、status、title、detailの各メンバーに加え、以下のフィールドが含まれます。detailのテキストはこれらのフィールドから生成されるため、クライアント側で独自のテキストに置き換えて表示できます。
| フィールド | 型 |
|---|---|
organizationId | string |
例#
json
{
"detail": "Automatic top-ups need a plan that carries a credit balance, and organization <organizationId> is not on one. Upgrade the plan first, then enable top-ups.",
"organizationId": "<organizationId>",
"type": "https://lingo.dev/docs/api/errors/auto-top-up-unavailable",
"status": 402,
"title": "Automatic top-ups not in plan"
}このエラーを返すエンドポイント#
POST /v2/organizations/{orgId}/billing/auto-top-up