#mathiasm8

1 messages · Page 1 of 1 (latest)

tulip needleBOT
silent lagoon
#

Hello! Can you talk in this thread instead of the main channel?

#

And I don't think adding invoice items when creating the subscription works, since I'm using the payment link generated by stripe?

flat gate
#

Hi, yes sure thing.

silent lagoon
#

So it seems like you asked a lot of different things there, but does it boil down to "how does my platform take an applicaiton fee on a Subscription"?

flat gate
#

Actually not an application fee. In the platform I'm building, I would like my customers (connected users) to be able to create subscription plans for their customers which works fine. But I can't seem to get my head around how they can charge there customers for a sign-up fee.

silent lagoon
#

A one-time sign-up fee is typically added to the first Subscription Invoice using add_invoice_items as you're doing it above. Is that not working the way you want?

flat gate
#

I haven't tested it out yet. The reason I'm asking is that I'm 100% depend on receiving a subscription_created webhook, for this to work. Since the end users are signing up for a subscription with the payment_link from Stripe. If I should miss this webhook for some reason or another my customer would not charge their customers for a fee. I see a risk in this?

#

So the only way I would know an end user signs up for a subscription is by the webhook, since they are doing it directly with Stripe and after I receive the webhook when this finishes I would do the add_invoce_items thing.

silent lagoon
#

Sorry, I'm not sure I understand. The code you have above that uses add_invoice_items creates a Subscription. Why would you run that when you receive a webhook about a Subscription being created? Do you want to end up with two separate Subscriptions?

flat gate
#

Yes and I think it would work. However this code only runs when I receive a webhook from Stripe (subscription_created). I'm not in control when subscriptions are being created on my platform, since users are using payment_links directly from Stripe.

#

I would also listen earlyer in the subscription creating process (on another webhook) the main issue is that I worry abount being depinding on receiving a webhook for making a sign-up fee to subscriptions.

#

could*

silent lagoon
#

I don't think what you want to do is going to work.

#

It sounds like you want to update a Subscription that's already been created, but I think by that point it's too late.

flat gate
#

So let me ask in another way. If my connected accounts are handeling out payment_links from Stripe to their customers. How can I add a on-etime fee to that?

silent lagoon
#

You can't. At least not on the first Invoice.

flat gate
#

Ahh okay.

#

Or else they chould carge it manually afterwards

silent lagoon
#

You can add a one-time fee to the next Invoice by updating the Subscription, but with Payment Links you can't add something to the first Invoice after the fact.

flat gate
#

Is there a better way than using payment links?

#

That would work?

silent lagoon
#

I don't know enough about your use case to make a recommendation. Can you tell me more?

flat gate
#

I as just wonering if Stripe supports another way than payment_links for allowing users to sing up to subscriptions. A way that would make me more in control with the process to be able to add a fee on the first subscription invoice?

silent lagoon
#

Yeah, there are a lot of ways. You can create Checkout Sessions, you can create the Subscriptions directly...

#

Why are you using Payment Links?

flat gate
#

I'm developing a SaaS solution for gyms where gym owners can add multiple memberships (subscriptions) an usually some of thoose require some kind of fee at sign-up like if you would hand out keys etc.

#

I was just thinking that was the best way to do it.

silent lagoon
flat gate
#

Okay in that way I would be able to create fees on the first invoice?

silent lagoon
#

You can add two line items, one for the recurring Subscription payment, one for the one-time fee.

#

Then you send the customer to the Checkout Session's URL to pay for that.

flat gate
#

Nice, I would use that instead. Thank you very much for your help!

tulip needleBOT