#verox_subscription-retries
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1237027436961726485
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
$subscription = Cashier::stripe()->subscriptions->create([
'customer' => $user->stripe_id,
'items' => [
[
'price_data' => [
'currency' => $currency,
'product' => config('cashier.products.server'),
'unit_amount' => $data['amount_due'],
'recurring' => [
'interval' => $data['metadata']['period'] == 'monthly' ? 'month' : 'year'
]
],
],
],
'expand' => ['latest_invoice.payment_intent'],
// Make sure each invoice is being sent out 7 days before the period ends
'billing_cycle_anchor' => Carbon::now()->addDays($data['metadata']['period'] == 'monthly' ? (23) : (358))->timestamp,
'currency' => $currency,
'collection_method' => 'charge_automatically',
'payment_behavior' => 'default_incomplete',
'payment_settings' => [
'save_default_payment_method' => 'on_subscription',
'payment_method_types' => config('cashier.charge.' . $currency),
],
]);
This is my current approach
Hi there ๐ this isn't possible, Invoices are generated when the billing period changes. There isn't currently a way to separate those two actions, but I'll capture your feedback that this is something you'd be interested in seeing added in the future.
Is there a way to add something like a grace period, so the subscription is not immediately cancelled on a failed payment?
Yes, you can control your payment retry schedule, and the behavior of Subscriptions that aren't successfully paid by one of those retries, in your dashboard here:
https://dashboard.stripe.com/settings/billing/automatic
In the Prevent failed payments section
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Thanks! I'll try that.