#mochihealth

1 messages · Page 1 of 1 (latest)

dark schoonerBOT
delicate egret
jovial plank
#

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

delicate egret
#

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

Learn how to use the customer credit balance.

dark schoonerBOT
jovial plank
#

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

pseudo root
#

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?

jovial plank
#

for the use of the balance is their no way to split up the credits over multiple invoices

pseudo root
#

What do you mean by to split up the credits over multiple invoices ?

jovial plank
#

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

pseudo root
#

No, Stripe will automatically apply the credit to new invoices, you can't specify the credit amount for each invoice.

jovial plank
#

so can i achieve this through any other stripe api

pseudo root
#

No I don't think there's a such API.

jovial plank
#

I cant use the invoice api?

#

to create negative line items

#

on existing subscriptions

pseudo root
#

You can do that, but the credit will still be applied automatically.

jovial plank
#

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?

pseudo root
#

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

jovial plank
#

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?

pseudo root
#

I don't see why Balances API should be invovled here.

jovial plank
#

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

jovial plank
pseudo root
jovial plank
#

the customer credit balance api

#

that was referenced above

jovial plank
#

sorry about the confusion

pseudo root
jovial plank
#

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?

pseudo root
jovial plank
#

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?

pseudo root
#

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.
jovial plank
#

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?

pseudo root
#

It's a different question now. When exactly are you creating the credit, before invoice finalization?

jovial plank
#

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

pseudo root
#

OK. Yes you can do that. Stripe will apply the credit during invoice finalization.

jovial plank
#

thanks

#

sorry about all the confusion

pseudo root
#

All good, and happy to help.

jovial plank
#

just one more question

#

lets say that the subscription was 20 dollars a month

#

and i credited the user 30 dollars

#

what would happen?

pseudo root
#

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.

jovial plank
#

if the cusomer has multiple subscripitions does the credit just get applied to the first one that is invoiced?

pseudo root
#

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