Stripe
User App#
Here are the steps to integrate Stripe and allow payment with credit cards.#
- Create Stripe Account.
- Add your business details to activate your account.
- Go to
Developers → API
Keys and get your publishable key
and paste it in constants.dart
file.
Free plan setup#
- Sign up for a Cloudflare account. Cloudflare workers
- Access the Cloudflare Workers dashboard
- Click on the “Create a Worker” button to start creating a new serverless function. Give your Worker a name.
- Open
create-payment.js
and search for variable named stripeSecretKey
and put your stripe secret key there. - Select and copy the entire code from the “create-payment.js” file and then Paste the code into the serverless function on Cloudflare.
- Save and deploy the Worker
- Copy the URL of the serverless function and paste it in
constants.dart
file.