Stripe Invoice Partial Payments - node.js

I'm trying to model a Stripe subscription where the collection method is send_invoice. However, I want to allow the customer to choose the amount they pay (ad-hoc, I believe its called), and then mark the invoice as paid when the total balance is received.
I can see that this is an option for ACH credit payments but only to handle mistakes from the customer. Is there any way to enable this for card payments on invoices too?

This isn't possible using Stripe out of the box. The Stripe hosted form for an Invoice does not allow the customer to input an amount of their choice. The amount listed on the Invoice is based on the parameters provided when creating the Invoice via the API.
You would need to create your own recurring logic to do the following as long as the full amount is not yet paid :
Get the ad-hoc amount your customer would like to pay. This would have to be via your own custom created form
Then create an Invoice for that ad-hoc amount
You would use webhooks to listen for the invoice.paid event to verify that the invoice is paid successfully. From the event details, you can retrieve the Invoice details and “link” it to the amount owed in the database for that customer.
Calculate the amount left unpaid
Example - I have a customer that owes me $100
Ask the customer how much they would like to pay. Customer decides that they want to pay $10.
Create an Invoice for $10.
After the invoice is successfully paid. Tie the Invoice details to the amount owed in the database.
Calculate the amount left.
Since there is still $90 left,
Ask the customer how much they would like to pay. Customer decides that they want to pay $90.
Create an Invoice for $90.
After the invoice is successfully paid. Tie the Invoice details to the amount owed in the database.
Calculate the amount left.
Mark the amount as fully paid in your database.

Related

How to use customer credit balance without invoice in stripe?

I want to create a system in bubble.io app with stripe, in which:
the customer while purchasing products will pay though their credit balance but the invoice should not generate (or without invoice).
if it possible, then how? and if not then:
customer should transfer money to stripe platform balance and whenever they make a purchase the money should transfer from stripe platform balance to the seller.
any solution?
The customer's credit balance automatically applies toward the next invoice of the customer. So if you are not using invoices, it won't work. The alternative is to keep track of the customer's balance on your end, and change the amount they need to pay accordingly.
If you want the platform account to charge the customer, and then later send the funds to the connected account(s), then you should use separate charges & transfers.

Programatic shipping and taxes with Stripe Subscription

I would like to use Stripe for a physical subscription site.
Small number of SKUs
Some customers pick up instead of ship
Customers whose addresses are in one state are charged state and local sales tax
I'd like to use Stripe Subscriptions to do this but shipping costs and state/local taxes will be slightly different for every single customer and but unlike in the Stripe Orders API, it does not look like Subscriptions allows for me to dynamically calculate shipping and taxes. Is my reading of this correct, or is there a way for me to programatically edit recurring shipping and taxes on a per-subscription basis?
Thank you!
Answer via #mattwc in #stripe freenode: An invoice is created by the subscription each period 1 hour before it is charged. You can subscribe to this event via webhook and edit the invoice to add shipping and tax information.

How to automatically bill Customer B depending on Customer A's subscription charge on Stripe?

We are looking for a way to bill one customer depending on how much another customer is charged weekly using Stripe Subscriptions. So the idea is to offer a weekly gym membership to full-time employees at city offices. The weekly fee will be $20 and we want the employees' company to contribute a certain amount to the weekly fee. For example, Customer A (employee) will pay $16 and Customer B (employee's Company) will pay the remaining $6. Is there a way to take Customer A's charge successful receipt and trigger Customer B's card to be charged automatically? The $20 subscription fee is not fixed as it will change depending on their usage ($20 is for 5 working days. If they use it for 3 days the total charge will be $12).
Since you are controlling Customer A's subscription and charge you can automate all of this. You indicated that you will change how much you charge Customer A each month. This is something that your code will handle and at that point it can automatically charge Customer B's card for the remainder of the fee.
Otherwise, you can use webhooks and listen for charge.succeeded events. Whenever Customer A has a successful charge, your webhook handler will find the corresponding Customer B in your database and create a Charge for the correct amount.

Recurring billing with Stripe - will Subscriptions suffice?

My application allows a customer to purchase credits for later in-app use.
I want to enable customers to buy credits throughout the month, and only get billed at the end of the month.
Should I be using a Stripe Subscription at an amount that equals the price of one credit, and change the quantity according to the number of credits the customer purchased?
(After a successful invoice - I'll reset the subscription quantity to 0)
Is there a better solution? Perhaps some clever method of using Stripe Checkout?
Your proposed approach sounds reasonable.
I've not tried it but an alternative I can think of would use a free plan and the Invoice Items part of the API.
Create a free plan with amount with amount field set to 0. As far as I can see from the docs, all the subscription lifecycle webhooks should be triggered for Customers who're subscribed to the plan.
Through the month, create InvoiceItems for the Customer. According to the docs, at the end of the billing cycle, those InvoiceItems are added to the customer's invoice.
Sometimes you want to add a charge or credit to a customer but only actually charge the customer's card at the end of a regular billing cycle. This is useful for combining several charges to minimize per-transaction fees or having Stripe tabulate your usage-based billing totals.
Beyond that, you'll want to consider if you should have Stripe generate/email your invoices.
I don't think this is the way to go, because subscriptions are billed the first time among other things.
The recommanded way is: stripe doc: Place a hold on a card
summary
You first ask authorization for a certain amount (the max amount). Eg: 1000$
Your custommer buy 50 credits in the month
At the end of the month you charge the customer for 50$ (it can not be greater that the maximum you authorized in the first step)
That's all :)

Stripe Implementation for subscriptions

Trying to engineer a payment system with stripe that will bill the customer on a weekly basis. The customer can have as many documents but each one is charged weekly. So if the customer has 2 documents he would have 2 charges every week until he canceled both or one of them. I would like to be able to have a detailed email invoice too.
Would the best way to do this would just keep updating the subscription quantity every time one is added or deleted. Or is there a better way to do this.
AKA: I am new to online payments
You can create the plan on Stripe with a validity of 7 days and subscribed the customer to that plan on the recurring basis. So the customer will be charged automatically every week.
For the quantity, you can change the quantity of subscription on stripe or you can subscribe a customer to different weekly plans(If you have different documents rate)
For sending an email just enable invoice email from admin setting and each time customer will pay an email will be sent.

Resources