Stripe Checkout (subscription mode)
Manages recurring payments through subscription-based billing.
Last updated
Manages recurring payments through subscription-based billing.
Last updated
When a user clicks on the "select plan" button in ⛏️Subscription Cards, custom workflows are triggered from the reusable element "🔐 SECURITY REDIRECT ", from which we use the Retrieve Subscription API Call to check if the user is subscribed to a plan as follows:
Calling the by passing the price ID and ensuring the "mode" parameter is set to subscription.
Triggering the 📚 Log API Response custom if step 1 returned an error. Here we capture the error details to use it to create a new dt_API_log record and trigger a toast displaying the error body.
Navigating the user to a stripe hosted page by using result of step 1's body url as the destination. This stripe page allows the user to checkout using a credit card (it can also be configured from the Stripe's dashboard to accept other means of payment).
Using the Stripe - Update Subscription action by passing in the subscription_id, items_id, and price_id parameters from the Retrieve Subscription API Call.
Triggering the 📚 Log API Response custom if step 1 returned an error. Here we capture the error details to use it to create a new dt_API_log record and trigger a toast displaying the error body.
Triggering a toast if step 1 was successful.