-
Notifications
You must be signed in to change notification settings - Fork 0
Stripe‐powered donation pages
gammaw edited this page Dec 21, 2023
·
1 revision
- We rely on Stripe as a payment provider (for card payments).
- We used to use PayPal for similar solutions and switched to Stripe in early 2024 (for cheaper and more agile).
- We use no code Stripe services wherever possible.
- We use use some customisation wherever needed.
- Stripe does not support name-your-price recurring payments (i.e., the price of a recurring payment needs to be pre-defined and the user cannot edit the amount).
- Backend (in this repo): creates custom checkout session by submitting the show's name as metadata (see plugin code here).
- Frontend (see in this repo): calls backend as Wordpress API to return checkout page (see code here).
- As the backend API call is implemented as a GET request, the show host parameter is sent through as a name-value pair in the request URL.
- Some environment variables are used to configure the exact behaviour of backend and frontend:
- Backend: for example, the cancel page URL is the site that is jumped to when the user hits back on the checkout page; see all backend-side environment variables here.
- Frontend: there is currently single environment variable in use here (
SUBSCRIPTION_CANCEL_URL), which defines the URL of the so called customer portal for users to cancel their subscriptions (see frontend environment variable file here).