#asif

1 messages ยท Page 1 of 1 (latest)

carmine fulcrumBOT
celest glacier
#

Hi ๐Ÿ‘‹ that is expected, as a Subscription Schedule created to start a Subscription in the future will not generate a client secret until the Subscription is started and it's first Invoice is generated.

I would suggest using a Payment Intent to process the one-time payment, use setup_future_usage: off_session while doing so to prepare the collected Payment Method for future usage, and then once you're notified that payment is successful create the Subscription Schedule to start the associated Subscription in the future.

red cedar
#

or should i create a subscription with free trial. and also create a payment intent for one time as well

celest glacier
#

If you're going to create a Subscription with a trial period, then you could include the one-time payment in add_invoice_items when creating the Subscription to process the one-time payment and create the Subscription simultaneously.

red cedar
#

will that charge one time payment instantly?

celest glacier
#

It will create an Invoice that will contain the one-time payment amount, it won't be payed automatically if there isn't a payment method already set up and provided though.

red cedar
#

i am also creating subscription before payment intent

#

i will be doing confirmPayment from frontend as well with the amount

celest glacier
red cedar
#

i dont know which route to take

celest glacier
red cedar
#

my use case is
i want to charge $1 for the first month and then 9.99 after

red cedar
celest glacier
red cedar
#

retrieved from subscription api

#

it is working if i have free trial or no free trial

#

now i am trying to add different amount in the subscription process

celest glacier
#

Sorry, I'm not sure I'm grasping what you're trying to accomplish that is giving you trouble currently. If you already have a flow for creating a Subscription, then creating those for different amounts/products/prices would involve adjusting your code that creates the Subscription to do so referencing different Price and Product objects.

Let's try taking a step back. What do you have currently, and what about that flow are you interested in changing?

red cedar
#

currently i have
We create a product/price id in dashboard
User can subscribe to the product/price id with or without free trial

Interested in :
User subscribes to the product/price id with reduced pricing for the first billing cycle, and then regular pricing in the future

celest glacier
red cedar
#

how do i pass that coupon in the subscription create api

#

just the coupon id

celest glacier
#

Yup, there are code snippets showing how to do that included in the Apply coupons to subscriptions section in the doc I linked to.

red cedar
#

let me see if i can do that

#

thank you for the help

celest glacier
#

Any time!

carmine fulcrumBOT
red cedar
#

quick question. can you add multiple coupons to the subscription or just one

celest glacier
#

Only one

red cedar
#

ok

#

works

#

thank you