2.5 KiB
Stripe Donations
RanaZe: Step 3 Trainer accepts authenticated, one-time USD contributions through Stripe-hosted Checkout. The API enforces a minimum contribution of $5 and a maximum of $10,000. Payment card data never passes through or is stored by RanaZe.
Contributions are not tax-deductible.
Stripe test-mode setup
-
In the Stripe Dashboard, switch to test mode.
-
Create the UAT test-mode webhook endpoint at:
https://us3q.ranaze.com/api/donations/stripe-webhook -
Subscribe the endpoint to these events:
checkout.session.completedcheckout.session.async_payment_succeededcheckout.session.async_payment_failedcheckout.session.expired
-
Copy the webhook signing secret (
whsec_...). -
Copy a test secret API key (
sk_test_...). -
Add both values as Gitea Actions secrets in the API repository:
UAT_STRIPE_SECRET_KEYUAT_STRIPE_WEBHOOK_SECRET
The deployment workflow writes these values to the environment's
step3-runtime-secrets Kubernetes secret. Never commit either value to the
repository.
Stripe account settings
Configure RanaZe branding in Stripe Checkout and enable successful-payment email receipts in Stripe customer email settings. Stripe Checkout collects the contributor's email address.
Verification
After deployment:
- Sign in to RanaZe and open Support RanaZe from the sidebar.
- Confirm that amounts below $5 and above $10,000 are rejected.
- Start a $5 test contribution.
- Complete Checkout using Stripe's standard test card
4242 4242 4242 4242, any future expiration date, and any CVC. - Return to RanaZe and confirm the contribution changes from pending to confirmed.
- In Stripe, confirm the Checkout Session and webhook delivery both succeeded.
- In MongoDB, confirm the corresponding
Donationsdocument hasStatus: "paid"and a populatedPaidUtcvalue.
The client-visible status endpoint returns only the donation ID, amount, currency, status, creation time, and paid time. Stripe payment identifiers and webhook metadata remain server-side.
Live-mode cutover
- Create
https://s3q.ranaze.com/api/donations/stripe-webhookin Stripe live mode. - Set
PRD_STRIPE_SECRET_KEYto the live secret key (sk_live_...). - Set
PRD_STRIPE_WEBHOOK_SECRETto that endpoint's signing secret. - Trigger a deployment and complete a small real contribution.
- Confirm the payment, receipt, webhook delivery, and
paidstatus before announcing availability.
Test and live webhook signing secrets are different. Both Stripe secrets must always belong to the same Stripe mode.