billing

GET /v1/subscriptions/{subscriptionId}/prepay-quote

Price paying for several billing periods at once.

Tous les points de terminaison billing

Authentification

Envoyez une clé API en tant que jeton du porteur. La clé doit posséder l'autorisation billing.payment.manage ; une clé qui ne l'a pas est refusée avec le code 403, et non 404.

Cet endpoint ne prend aucun identifiant d'organisation. Votre clé identifie déjà l'organisation à laquelle elle appartient, et la réponse y est limitée.

Essayer

Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau de bord.

curl -X GET https://api.zinndigital.com/v1/subscriptions/{subscriptionId}/prepay-quote?periods=<periods> \
  -H "Authorization: Bearer zdk_live_…"

Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API

Détails

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.

Paramètres

NomTypeObligatoireQu'est-ce que c'est
subscriptionId (path)UuidOuiThe subscription being quoted for.
periods (query)integerOuiHow many whole billing periods to price.

Réponse

NomTypeObligatoireQu'est-ce que c'est
subscription_idUuidOuiUUIDv7 identifier — sortable by creation time (docs/02 §8).
periodsintegerOui
intervalstring<monthly, annual>Oui
unit_amount_minorintegerOuiThe captured per-period price in minor units (§2.8) — never re-derived from the catalogue.
total_amount_minorintegerOuiNet of tax; tax is added on the order.
currencystringOui
current_period_endstringOui
extends_tostringOui
max_periodsintegerOuiThe most periods one payment may buy.

Erreurs que cet point de terminaison peut renvoyer

401 · 403 · 404 · 422 · 429