#Mathieu-Checkout

1 messages · Page 1 of 1 (latest)

sweet tide
#

Hi there, if the payment method is for subscription purpose, I'll suggest to use off_session, so that the payment is more likely to go through when your customers are not on_session.

#

However, you still need to handle the scenario when customer's authorization is required (i.e., the payment_intent status becomes requires_action)

#

and you'll need to bring customers back to your app and confirm the payment.

night mauve
#

What webhook should i listen to handle this scenario ?

#

On an other project where i did custom integration i listen to invoice.payment_failed and check the $subscription->latest_invoice->payment_intent->status being equal to requires_action if so i send the user a notification email.
Is it the same for the checkout scenario ?

keen horizon
#

Yes, you will have your status on payment intent

sweet tide
night mauve
#

Ok and what is the code-less way to deal with this event on the front application (after sending the email notification from the backend) ? Redirect to the client portal ?

#

Also what is the best practice about dealing with the customer object in this scenario ? Created it first and pass it to the Session or let the Session create it ?

junior otter
#

Ok and what is the code-less way to deal with this event on the front application (after sending the email notification from the backend) ?
The "code-less way" is to let Stripe handle everything for you! There are settings in the Stripe dashboard to automatically retry/email failed invoices for subscriptions https://dashboard.stripe.com/settings/billing/automatic

#

Also what is the best practice about dealing with the customer object in this scenario ? Created it first and pass it to the Session or let the Session create it ?
Both options work, this is completely up to you. If you already have an existing customer, pass it to the Checkout Session (to avoid duplicates). Otherwise you can let the Checkout Session create one for you automatically.

night mauve
#

ok i've got one more question about the customer portal. Can you create mutiple customer portal for one Stripe Account (like to have different product/price by portal) or is it best to have an account centered on one product ?

junior otter