SetupIntent
for the customer on your backend, and then propagate the returned intent client_secret
to the frontend.
It can then be used to initialize the stripe.elements
form in a secured manner.
Creating a SetupIntent
Exposing the SetupIntent to the client
client_secret``stripe.elements()
Provide the to options
payment_method
id on the return value.
payment_method
ID to the updateCustomer
method.
refresh
function to re-fetch the current customer data and the new entitlements.
entitlements.updated
webhook event to update third-party applications.
provisionSubscription
method will return an appropriate response.
customer.payment_failed
webhook. The customer should be instructed to replace the payment method with a different one and to try again.