Skip to content

Launching and running it

How do I accept payments and restrict features to paying users?

Lumos · Updated

Use a payment provider to collect the payment, then have your server decide which features the customer's account can use. Keep that decision tied to verified payment or subscription information. Reaching a success page or hiding a button isn't enough to enforce paid access.

Start with a clear offer: what the customer buys, how long access lasts, and what happens after cancellation or a refund. Decide whether you need a one-time purchase or a recurring subscription before implementing checkout.

Connect the purchase to the account

Stripe Checkout is one option for a hosted payment page. The integration needs to associate the purchase with the intended app account and update its access after confirming the payment.

Payment providers can notify your server through a webhook, which is a message sent when something changes. Stripe's webhook documentation explains verifying that a message came from Stripe. Its subscription-event guide covers successful payments, failures, and subscription changes.

Have your server check access when a paid action is requested. Define how a cancellation at the end of a billing period differs from immediate cancellation. Decide how refunds and failed renewals affect access, then implement those rules explicitly.

Test a successful purchase, a declined payment, cancellation, and attempts to use a paid feature without entitlement. Use the provider's testing environment and test payment details. Ask the developer to test repeated or delayed notifications too, so access doesn't depend on receiving a message exactly once.

In the Builders Handbook

Make it work with real data covers account access rules that paid features also need. The current handbook leaves payment setup for a later part; the provider documentation supplies the integration details.