Payments
Test
1、Create a new account on Stripe and activate payments (boring, I know.. see you in a bit!)
2、In your Settings, Public Details, add your website URL
3、In your Settings, Branding, add your logo & colors
4、In your Settings, Customer Emails, turn on emails for successful payments & refunds
5、In your Settings, Customer Portal, activate link to customer portal (in case you need later)
6、In the search box, type 'rules' and click Fraud Prevention > Rules , make sure the first 3DS rule is enabled. I also turn on the second one (recommended). Make sure to block payments if CVC fails (check below)
7、Turn ON Test Mode
8、Create a new product and copy the price ID (price_xxx) in INIT.STRIPE.payment.price_one
in the server/config/sys.js
file.
9、In your Developers, copy your private keys and add to STRIPE_SECRET_KEY
in .env.local
10、To set up the webhook locally, follow the steps in Developers, Webhook, Test in local environment. After login to Stripe CLI, use this command to forward webhook events to our API:
stripe listen --forward-to localhost:5001/api/webhook/stripe
Copy the signing secret and add it to STRIPE_ENDPOINT_SECRET
in .env.local
Production
Going to production?
1.Turn OFF Test Mode in your Stripe Dashboard
2.In your Developers, copy your private keys and add to STRIPE_SECRET_KEY
in your production environment variables.
3.In your Developers, Webhook, Add Enpoint. Set your domain + /api/webhook/stripe. Select checkout.session.completed event (or more if needed). Copy the signing secret and add it to STRIPE_ENDPOINT_SECRET
in your production environment variables.
4.Optional: In Balance, Manage Payouts, set a specific date of the month to receive your payouts (I use the 10th of each month)