Step 3: Manage subscriptions: Free AI Prompt | SheCodes

Free AI prompt · The Launch Book

Step 3: Manage subscriptions

A ready-to-use prompt from the chapter Payments. Paste it into Claude, ChatGPT, Lovable, Bolt or any AI coding tool.

The prompt

“Add subscription management to my app. On the account page, add an 'Update Payment Method' button and a 'Cancel Subscription' button. When the signed-in customer clicks either one, send them to the matching Paddle page for their subscription. Keep my Paddle key in a safe place so it's never visible to visitors.”

How to use it

  1. Copy the prompt and paste it into your AI coding tool.
  2. Check the result in the preview, then ask for changes one at a time: "make the buttons bigger", "use my brand colours".
  3. Read the chapter to understand why it works and what to do next.

More prompts like this

All prompts

Step 1: Set up Stripe Checkout

“Add Stripe Checkout to my app for a product called [Product Name] priced at [amount] USD. When the visitor clicks 'Buy Now', send them to Stripe's hosted checkout page so Stripe handles the whole payment. After a successful payment, bring them back to my /success page. Keep my Stripe keys in a safe place so they're never visible to visitors.”

Step 2: Handle payment confirmation

“Create a /success page that shows a thank-you message after payment. Also set up a listener so Stripe can tell my app whenever a payment actually goes through. When that happens, save the customer's email and the amount they paid. Make sure the listener checks that the message is really from Stripe (using the secret Stripe gives me for this), so nobody can fake a payment.”

Step 3: Add a customer portal

“Add a 'Manage Subscription' button that sends the signed-in customer to Stripe's Customer Portal. The portal is a page hosted by Stripe where customers can update their payment method, view past invoices, and cancel their subscription. When they're done, bring them back to my /account page.”

Step 1: Add checkout with Managed Payments

“I'm using Stripe Managed Payments so Stripe handles sales tax for me. Add a 'Buy Now' button to my pricing page that sends visitors to a Stripe Checkout page for my product [product name or price ID], with Managed Payments turned on. Pass the customer's email if they're logged in so the checkout form is pre-filled.”

Step 2: Handle payment confirmation

“Set up a listener so Stripe can tell my app whenever a purchase or subscription change happens. When a checkout completes, mark the customer as having purchased. When a subscription changes plans, update their plan in my database. Make sure the listener checks that the message is really from Stripe (using the secret Stripe gives me for this), so nobody can fake a purchase.”

Step 1: Add PayPal buttons

“Add PayPal Smart Payment Buttons to my checkout page. Show both a PayPal button and a Debit/Credit Card button. When the visitor clicks Pay, start an order for [amount] USD with the description [Product Name]. Once PayPal confirms the payment, send the visitor to my success page. Keep my PayPal keys in a safe place so they're never visible to visitors.”