Skip to navigation

Preview the Next Subscription Charge

View as Markdown

Return what the next invoice of the caller’s renewing Stripe subscription will charge and when, after coupons and credits, so a fully discounted plan reads 0. Read live from Stripe and never stored. 404 when the caller has no renewing Stripe subscription (none, cancelling, or App Store); 503 when Stripe is unavailable.

Authentication

AuthorizationBearer

Your aVenture API key (https://aventure.vc/settings/api-keys) or OAuth access token

Response headers

X-RateLimit-LimitintegerOptional

Requests allowed per client IP in the current rate-limit window.

X-RateLimit-RemainingintegerOptional

Requests left before the tightest applicable rate-limit bucket rejects.

X-RateLimit-ResetintegerOptional

Seconds until the exhausted rate-limit bucket admits another request; 0 when none is exhausted.

Response

OK
amountDuelong

Amount the next invoice will charge in the currency’s minor unit, after discounts, credits, and usage so far; 0 when a discount covers it

chargeAtdatetime
When the next invoice is raised and charged. When the subscription ends before raising another invoice, this is that end and both amounts are 0.
currencystring
ISO 4217 currency code.
discountlist of objects

Discounts applied to the next invoice; empty when none apply

totalExcludingTaxlong

Next invoice total in the currency’s minor unit after discounts, before tax and account credit; compare it, not amountDue, with the plan’s price

complimentaryContinuationobject or nullOptional

The account’s choice to keep its complimentary plan on paid billing; absent until it chooses, after an Undo, and once the conversion could not carry it out. Its undoable says whether DELETE /v1/billing/subscription/complimentary-continuation can still undo it.

complimentaryContinuationOfferRevisionstring or nullOptional

Opaque revision to send to PUT /v1/billing/subscription/complimentary-continuation to keep this complimentary plan on paid billing when it ends, or to change the plan it continues on; present only while the account can still choose: an administrator granted the plan for a term that ends at complimentaryUntil, within the current billing period, on a plan the web sells, with no pending plan change or cancellation, and the conversion has not started. It changes whenever the subscription, plan, term end, or recorded choice changes, including an Undo. Absent for every other subscription. While it is present, POST /v1/billing/plan-changes answers 409 for a target on this plan’s tier: that tier continues only through the PUT

complimentarySincedatetime or nullOptional

When the administrator’s complimentary plan with a term started; absent for every other subscription

complimentaryUntildatetime or nullOptional

When the free stretch ends: the end of a complimentary plan granted for a term, or the first renewal that coupons no longer make free; the plan charge is 0 until then. Absent when coupons do not make the next invoice’s plan charge free, or when it stays free with no end

complimentaryUsageobject or nullOptional

What the account used since complimentarySince, present only when that usage is significant: its profile views or its research runs reach the server’s configured threshold for that count

paidChargeAtdatetime or nullOptional

When money is next collected after coupons, complimentary terms, and account credit: chargeAt when amountDue is above 0, otherwise the first later renewal they no longer cover. Absent when nothing is charged before the subscription ends, or ever. Renewals after the next invoice are estimated from the plan price and exclude usage

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
406
Not Acceptable Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error