#kiroolos
1 messages · Page 1 of 1 (latest)
// Create a subscription with a trial that ends on the first day of the next month at 12AM
const subscription = await stripe.subscriptions.create({
customer: customer.id,
items: [
{
price: process.env.STRIPE_PLAN_ID
}
],
trial_end: lastDayOfMonthWithTime, // set trial end to last day of the month at 11:59PM
collection_method: "send_invoice",
expand: ["latest_invoice.payment_intent"],
days_until_due: 1
});
Hi 👋 can you elaborate on where you're running into trouble accomplishing that?
i just want to stop sending user the email of asking to pay
as i already created a cronjob that pays automatically with adding extracost
All i need is to stop sending email to user asking to pay manually
Gotcha, I'll take a look to see what we have, but I'm not sure if that is possible when the collection_method is send_invoice.
I'm not as familiar with the email related settings, so you may want to double check this with our Support team who I believe is better versed on those settings than we are:
https://support.stripe.com/?contact=true
But I believe the setting you're looking for is the Send finalized invoices and credit notes to customers setting in the Manage invoices sent to customers section on this page:
https://dashboard.stripe.com/settings/billing/automatic
Thanks i will have a lookinto this