#theitaliandev
1 messages · Page 1 of 1 (latest)
Hi. Let me help you with this.
That's expected as Stripe Billing only handles the matter of payments (which happens once a year). You will need to have your own mechanism to renumerate the points in your system.
I have found after hours of research this kind of workaround suggested on Stripe Official Twitter
but it is not very clear on how to implement this
Yes, that's also possible. You can create a Subscription with a Price that has a unit amount of $0.
I tried to create a checkout session with two line items
one for the yearly and one for the monthly at $0 price
it resolves in an error
if both of the line items are monthly it works fine and subscribes the user to both of them
but one yearly and one monthly throws an error
any tips to implement this workaround?
You need to create a separate Subscription object.
You don't need to bring in the customer into the session, you can just use POST /v1/subscription to create a Subscription: https://stripe.com/docs/api/subscriptions/create
so after the checkout is complete I can post to /v1/subscription to create a monthly at $0 for the same customer who finalized the yearly
does it sound right?
Correct.