#Mok9
1 messages · Page 1 of 1 (latest)
👋 happy to help
Hi, I would like to confirm that, will the checkout session with subscription mode automatically charge the customer's every day/week/month/year?
This is my php code
$checkoutSession = $this->stripe->checkout->sessions->create([
'customer' => $user->stripe_customer_id,
'line_items' => [[
'price' => $plan->stripe_price_id,
'quantity' => 1,
]],
'mode' => 'subscription',
'success_url' => config('app.url') . "/subscription/success?user_subscription_id=$subscription->id",
'cancel_url' => config('app.url') . "/subscription/cancel?user_subscription_id=$subscription->id",
]);
sorry for the late response.
when you create a Checkout Session in subscription mode, the Payment Method would be saved for the payments of future invoices on that Susbcription
So I will need to use webhook to listen to some events right?
you can if you want to fulfill your orders that way
you can read more about this on these 2 docs
https://stripe.com/docs/payments/checkout/fulfill-orders
https://stripe.com/docs/billing/subscriptions/webhooks
let me know if you need any more help