İçeriğe geç
Lumean API

Açıklamalar İngilizce

Bölümün arayüzü dilinize çevrildi, ancak işlem, şema ve hata açıklamaları yalnızca Rusça ve İngilizce mevcut — burada İngilizce sürüm gösteriliyor.

402 — payment required

402Retry-After yok

Ne oldu

The order was not created and no money was charged. The code is returned by POST /orders and POST /orders/{order}/retry — they go through the same billing flow. The body always contains reason, and that is what determines whether this is an error or an offer to top up.

Neden

Three different cases live under the 402 code. payg_topup_required — the subscription quota was not enough, but the service allows pay-as-you-go: this is a payment decision point, not a refusal. insufficient_balance — there is not enough LMC on the balance. insufficient_allowance — the quota was not enough and PAYG is disabled for the service, so a top-up is not possible.

Şimdi ne yapmalı

Branch on reason, not on message: message wording changes without notice and is not an error code. Do not retry blindly: a retry without confirmation returns a fresh 402 with a new quote_token, while a blind retry WITH confirmation charges money without the user knowing.

Sırada hangi istek gönderilmeli

GET /subscriptions — the remaining quota is in items[].tokens_remaining. If it is zero and the reason was payg_topup_required, the next step is a confirmed top-up (see the code page).

Bu sayfayı yapay zekâya verin

.md sürümünü açllm.md

spesifikasyon 0.0.1