#mochihealth
1 messages · Page 1 of 1 (latest)
There are two possible ways I can think of:
- Apply discount: https://stripe.com/docs/billing/subscriptions/coupons
- Set up a pricing model that charges 20 units at the price of 10 units
would I create a unique promotion code for every customer or would I have one promotion and on my side create a unique id for every user and use that to link to to the the one promotion or coupon
so I get that the person who is signing up for the subscription would use a coupon or promotion code but is there a way to build up like a credit for the referrer that I can apply to their next subscriptions at my discretion
would I create a unique promotion code for every customer or would I have one promotion and on my side create a unique id for every user and use that to link to to the the one promotion or coupon
You can have a coupon for the referral program and apply it accordingly
so I get that the person who is signing up for the subscription would use a coupon or promotion code but is there a way to build up like a credit for the referrer that I can apply to their next subscriptions at my discretion
Stripe offers customer balance which can be applied to the next invoice: https://stripe.com/docs/billing/customer/balance
I was just speaking with a stripe support specialist and they are saying that its not possible to do this and that I should use the stripe partner for this rewardful
I am confused
Hi @jovial plank I'm taking over, give me a sec to catch up
I believe river has already answered your question, can you tell me the specific problem that makes you confused?
for the use of the balance is their no way to split up the credits over multiple invoices
What do you mean by to split up the credits over multiple invoices ?
and If i did want to do that would I have to go the route of keeping track in my own database what the credits of each customer was and apply neagtive invoice line items?
like if a customer has a 50 dollar subscription and 20 dollars in credit can i apply 10 dollars to the next invoice and 10 dollars to the invoice after that
at my own discretiion
and if I wanted to do that what would be the best api to use for that
No, Stripe will automatically apply the credit to new invoices, you can't specify the credit amount for each invoice.
so can i achieve this through any other stripe api
No I don't think there's a such API.
I cant use the invoice api?
to create negative line items
on existing subscriptions
You can do that, but the credit will still be applied automatically.
im saying instead of giving the referrer stripe credits when someone uses their referral link I can keep track on our side and then redeem them at my discretion through the creation of negative invoice items?
I don't quite understand what you mean. As I said before, Stripe will automatically apply the available credit on new invoices, so you can't specify not to apply credit on a particular invoice
what i mean is I can choose not to use the balance api at all right and just keeps track of the credits on my side and use the invoice api to achieve this functionality right?
I don't see why Balances API should be invovled here.
or I can keep track of the credits on my side and then use the balance api at my discretion only releasing certain credits everymonth
what do you mean?
The Balances API (https://stripe.com/docs/api/balance/balance_retrieve#retrieve_balance) is to keep track of your Stripe account balance, it has nothing to do with customer credit.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
this one
sorry about the confusion
No worries, you can keep track of the customer balance through https://stripe.com/docs/api/customers/object#customer_object-balance
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
so like I said I would have to cobble something together on my side if I wanted to split credits over multiple billing cycles right?
would the invoice.created webhook be a good event to listen to to apply credits to a customer so they would be applied to the upcoming invoice before tis finalized?
You can get this information fro the invoice object directly. see https://stripe.com/docs/api/invoices/object#invoice_object-pre_payment_credit_notes_amount
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
that just shows if their are any credits being applied but how would I actually apply them?
my thinking is I would keep track of the credits that I owe in my own db and then listen to the inoice.creation webhook event to then create a customer balance credit before the invoice is finalized. do you thing that would work?
I believe I repeated it multiple times, you don't apply credits, Stripe will automatically apply credits on newly created invoices.
The credit balance automatically applies toward the next invoice finalized to a customer.
You can’t choose a specific invoice to apply the credit balance to.
You can’t choose to not apply the credit balance to an invoice.
The credit balance is in the customer’s currency.
Customers with a cash balance can’t keep a positive balance. In other words, they can’t increase the amount due on the next invoice.
I konw what but I want to only credit the customer when i get that webhook event for an upcoming invoice for subscription renewal. so after i get that webhook and create a credit for the customer in stripe will it still be applied to the upcoming invoice or does the credit have to be there before the invoice is created?
It's a different question now. When exactly are you creating the credit, before invoice finalization?
yea I believe there is an hour between invoice creation and finalization correct
so I would listen to the invoice creation webhook check if the user was owed a credit and if they were create some credit in stripe for them
OK. Yes you can do that. Stripe will apply the credit during invoice finalization.
All good, and happy to help.
just one more question
lets say that the subscription was 20 dollars a month
and i credited the user 30 dollars
what would happen?
Assume the customer has only one subscription and the first 20 dollars was applied to the invoice, the customer will have 10 dollars remaining in their balance which will be applied in the next invoice.
if the cusomer has multiple subscripitions does the credit just get applied to the first one that is invoiced?
The credit can be applied to invoices generated by other subscriptions as well. For instance, the customer has two subscriptions A and B, the credit is 50
- The invoice generated by Sub A cost 40, finalized on 1 July 2023.
- The invoice generated by Sub B cost 20, finalized on 2 July 2023.
Stripe will apply 40 on the 1st invoice on 1 July, so the customer doesn't need to pay anything.
Later Stripe will apply 10 on the 2nd invoice on 2 July, so the customer only need to pay 10