#Asad
1 messages · Page 1 of 1 (latest)
Hi there!
You can list all subscriptions of a specific customer using this: https://stripe.com/docs/api/subscriptions/list
i want the latest one
through customer_id
list returns me list of subscriptions of the user
I think the latest one would be the first one in the list.
can you please confirm?
and how i can update the next billing date of subscription?
👋 taking over for my colleague. Let me catch up.
all lists are ordered by creation date desc
so the first one will be the latest right?
what is the scenario?
the latest one created yes
if a user had signup with Yearly premium package and lets say after 2 days he just upgrades his membership to paid. then the next billing date should be at 1 year + 12 days (left from trial)
so what you're saying is that you want to keep the subscription in trial mode for whatever time is left from that, and then just want to change the price?
no no
if a user is in the trial and after 2 days he just paid for the subscription then i want to add remaining trial days(in this case 12 days) and the subscription interval (which is year).i want to set the next billing date to 1 year + 12 days.
in Stripe it's not possible to have a Billing period more than a year
which means that you need to keep the subscription in trial mode and then change it to paid after 12 days which means that the next billing cycle would be eventually in 1y+12d
how can i do this? as in my current scenario i am using price_........ (price_id for trial ) and then when it upgrades payment is done through pri_..... (paid price_id) so stripe charge at instant how i can tell stripe the user still has trial so cut the payment after the trial.
as trial is already activated and now he chooses paid subscription with different price_id
in Stripe we don't encourage using prices for trial periods
but in all cases if you wish to do so, when you do update to the new price you can add a trial period of x days (e.g. 12) in order to give them the extra amount of days
yes
yes
so what about the charge?
would it be deducted on instant or it'll be done after trial?
after trial if you leave it as is
let's say i've added 12 days in trial, what will happened after 12 days? did customer will be charged again?
if you change with a trial period, the customer won't be charged until the end of the trial period
then it'll be bad idea,isn't it? as we are encouraging him to pay on instant. But if we'll add trial to the paid price_id it'll be charged after trial.
one thing you can do is to create a Customer Credit Balance (either via Checkout Session or with Payment Intent) https://stripe.com/docs/billing/customer/balance which means that the customer will pay upfront and then on the day of the invoice, the amount will be deducted automatically from the balance
that's much complicated.
not really, it's easy to create a Customer Credit Balance
in all cases these are the only options we can provide you for now
i got one more question here
yes sure
how i can send email through stripe to customer when they update to a new plan or made a payment?
I have used this one https://dashboard.stripe.com/settings/emails and allowed email for sucesfull payment, in the bottom is kept sending, but i didn't recieved any email yet!
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
in test mode we don't send emails
so when it'll be live email will be send automatically?
yes upon successful payments
great!