billing
GET /v1/subscriptions/{subscriptionId}/prepay-quote
Price paying for several billing periods at once.
Pagpapatotoo
Magpadala ng API key bilang isang bearer token. Kailangang taglayin ng key ang pahintulot na billing.payment.manage; ang key na wala nito ay tatanggihan gamit ang 403, hindi 404.
Ang endpoint na ito ay hindi nangangailangan ng id ng organisasyon. Natutukoy na ng iyong key ang organisasyong kinabibilangan nito, at nakatuon ang tugon dito.
Subukan ito
Palitan ang anuman sa loob ng mga panaklong na may anggulo ng iyong sariling mga halaga, at ang placeholder ng key na may key mula sa iyong dashboard.
curl -X GET https://api.zinndigital.com/v1/subscriptions/{subscriptionId}/prepay-quote?periods=<periods> \
-H "Authorization: Bearer zdk_live_…"Nakalagda? Ang API console sa iyong dashboard ay awtomatikong naglalagay ng iyong tunay na ID ng organisasyon at sariling susi, at pinapatakbo ang kahilingan laban sa live na API upang makita mo ang aktwal na tugon. Buksan ang endpoint na ito sa console ng API
Mga Detalye
What N more whole billing periods would cost, and the date the subscription would then run to. **Takes no money and creates no row**, so a slider can be moved without minting an order per keystroke. The price is the **captured** per-period price multiplied — never re-derived from the catalogue. A live subscriber keeps the price they were sold (docs/05 §1), so a customer on a legacy or discounted rate is not silently re-priced for choosing to pay early. ⛔ It makes **no claim about the customer's balance**. Funds are read once, at charge time. A quote that asserted "you have enough" would be quoting a number that can change before the customer presses the button — including by a downgrade crediting their account. Requires `billing.payment.manage`. `404` for a subscription in another tenant as well as for one that does not exist. `422` when the subscription cannot be prepaid — it has ended, it is comped, it is free, or it is on the PayPal rail — with a `code` in the error details naming which.
Mga Parameter
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
subscriptionId (path) | Uuid | Oo | The subscription being quoted for. |
periods (query) | integer | Oo | How many whole billing periods to price. |
Tugon
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
subscription_id | Uuid | Oo | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
periods | integer | Oo | — |
interval | string<monthly, annual> | Oo | — |
unit_amount_minor | integer | Oo | The captured per-period price in minor units (§2.8) — never re-derived from the catalogue. |
total_amount_minor | integer | Oo | Net of tax; tax is added on the order. |
currency | string | Oo | — |
current_period_end | string | Oo | — |
extends_to | string | Oo | — |
max_periods | integer | Oo | The most periods one payment may buy. |
Mga error na maibabalik ng endpoint na ito
401 · 403 · 404 · 422 · 429