Batching Transactions in Stripe - stripe-payments

As we are aware that Stripe charges 2.9% + 30 cents per credit card charge. So for every $1 transaction, Stripe takes roughly 33 cents. Is there a way to batch multiple $ 1 transactions (by the same customer) and charge them altogether?
Say we do 100 transactions of $1 each, we end up paying approx $33 to Stripe. Could it be possible to charge all the transactions at once ,in this case Stripe will only charge $2.9+ 30 cents ie $3.2?

You can do this either by summing up the microtransactions on your end and creating a charge for the total amount, or subscribing your customers to a $0 plan then creating invoice items for each microtransaction. At the end of each billing period, Stripe will automatically create an invoice that includes all the items you created and charge the customer for the total amount.
You can find more information in this support article.

Related

Define a limit on which a stripe subscription invoice is effective or not

I've been using Stripe to start subscriptions for my clients recently and I have a specific issue.
I have a metered price for a product that's let's say 0.09€ per item (an SMS in that case) on a monthly cycle. Since you pay on Stripe for your invoices, I'd like to define an amount limit to have this invoice sent or not. For example, let's say this amount is 10€ and the the pending invoice amount at the end of the month for a user is 5€, I'd like to carry these 5€ over the next month.
I read about the billing_thresholds.amount_gte which does basically the opposite of what I need from what I understand.
Is this possible?

Stripe retrieve all the paid amount on a subscription

I have a subscription with proration. So for the first months, the client is charged 10 euros and for the last month the client is charged 9.99. Sometimes, some coupons are applied and the client is charged 5 euros. How can I get the total of all the amounts paid by this customer for this subscription? I need to get the sum of 10 x (number of months) + 9.99 + 5 x (number of months where coupons was applied).. In other words, I need to get all the amount of all the money he previously paid until now.
You can retrieve all the invoices for a given Customer https://stripe.com/docs/api/invoices/list. If you want the invoices for a particular Subscription, pass in the subscription parameter.
You can then iterate through all the invoices and sum the amounts paid. Note that you can only retrieve up to 100 invoices.

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 i.e. 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

How can I differentiate the recurring amount from initial amount in Stripe

I am using Stripe in my website. Is there any possibilities to send 2 different amounts into Stripe. One is initial amount and the second one is recurring amount, both are different.
I would like to register the user with $10 for the first time, and I don't want to collect same amount $10 for every month as recurring amount. I just want to continue the subscription with the amount $5.
I have verified in Stripe documents but didn't notice any thing helpful.
Thanks
Stripe Billing[0] will fulfill most your subscription related user case.
There are several way to do this. For example,
You could create a one-off invoice to charge the user $10s and then Subscribe the user to the $5 plan with 1 month trial[1] or a 100% discount coupon for the first month[2]
You could create two pricing plans for your product one with $10 per month and another $5 dollars. Subscribe the user to $10 dollars and then downgrade the subscription to $5 dollar plan[3] (This will give you some flexibility on how long you want charge the user for $10 dollars)
[0] https://stripe.com/docs/billing/quickstart
[1] https://stripe.com/docs/billing/subscriptions/trials
[2] https://stripe.com/docs/billing/subscriptions/discounts
[3] https://stripe.com/docs/billing/subscriptions/upgrading-downgrading#switching

Stripe - Subscriptions, prorated, and change in quantities during subscription period

There is a yearly subscription plan at $100/year. A customer can adjust the quantity of said subscription. So lets suppose a customer starts off with a quantity of 10. Half way through the period, the customer decides to increase the quantity from 10 to 20.
At the start of the next billing cycle... what will the customer be charged? Will it be $2500?
Beginning of Period 1: $100 * 10 = $1000
Beginning of Period 2: ($100 * 20) + (100 * 10)/2 = $2500
And if they decrease the quantity half way through, would they get a refund at the beginning of the next Period?
When the new plan is less expensive than the current plan, the prorated credit is larger than the new amount due. For example, if the customer switches from the $30/month plan to the $10/month plan exactly halfway through the billing cycle, the customer receives a net credit of $10: a credit of $15 for the unused portion of the old plan less a charge of $5 for the remaining time on the new plan. The next invoice, at the start of the next billing period, reflects the $10 credit and the $10 due for a full, upcoming month on the new plan, resulting in a net amount due of $0.
When credits are created, they’ll continue to apply to subsequent invoices until the credit is covered and payment is due again. For example, a move from a $50/month plan until a $10/month plan—exactly halfway through the billing period—results in a net credit of $20: a credit of $25 for the unused portion of the more expensive plan and a debit of $5 to pay for the remainder of the billing period on the new plan. The next two invoices would net to $0.
The prorated amount is calculated down to the second by Stripe. We calculate the difference between the two plans based on the time the API call was made to change the customer’s subscription, using the current billing period’s start and end times.
https://stripe.com/docs/subscriptions/upgrading-downgrading
So essentially yes - they would receive a discount on their next invoice if they downgraded their plan. If they increased their plan, the prorate amount would be added to their next invoice.

Resources