简体   繁体   中英

Stripe - A Single Monthly & Metered Product

Building a SaaS service with a $30 monthly fee. There are additional 1-time-use services they can use during the month. To make the payment quick and nearly thoughtless, I want to also run a metered bill.

How would I setup a product in the dashboard for this? How would my invoice.succeeded / invoice.failed webhooks to discern if they've only paid the metered bill, only next month's bill, or both paid.

Example: Pays $30 for 1 month. Uses additional services (total $5)
Next Month Payment Cases:
If the user pays next month: $30 / month + $5 previous month (single payment totaling $35).
If the user doesn't pay next month: $5 for usage of previous month and subscription status marked as ' canceled '.

I spoke to the Support Chat (they're smart!). They've recommended doing a metered bill with a flat fee of $30. This is great except the monthly fee is paid at the end of the month. When they enroll, no deposit is made until an entire month of service.

The approach here is to have 2 Products/Prices (with the same billing period ie monthly) and to create the Subscription with both of these Prices. The first is the fixed price recurring monthly amount of $30. This will be billed up front on every billing cycle.

The second Product/Price should be a metered Price based on volume [1]. You then would report usage to the API during the billing period [2] (specifying the metered subscription item). That will be the one-time occasional use per month. In this model the upcoming Invoice will be for $35, 30 from the standard monthly subscription, and $5 that was reported as used during the previous month.

If a customer doesn't pay the Invoice, it follows the normal Invoice lifecycle [3]. There is no separate billing/payment for Subscription items.

[1] https://stripe.com/docs/billing/subscriptions/model#common-models

[2] https://stripe.com/docs/api/usage_records/create

[3] https://stripe.com/docs/billing/subscriptions/overview#invoice-lifecycle

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM