-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "open field" to /donate #75
Comments
If this is a question, then the answer is yes. |
Selecting a monthly payment option translates to one of the following planIds:
It looks like the selected planId is sent along with the payment requests to stripe. How are those planIds used? If a fill in custom option for monthly payment is created, what planId should it use? One suggestion is to have the planIds dynamic based on the amount. So instead of them looking like above, they can look like:
Then we can just append whatever custom number the users selects to the |
Here is the code that handles the payment request: https://github.com/nycmeshnet/nycmesh-stripe/blob/master/server.js It checks for a planId and either creates a customer, subscribes them to the plan, and creates an invoice for the one-time charge, or just makes a one-time charge (in absence of a planId). To handle a custom monthly payment, I believe we would have to create the custom subscription plan on the backend when processing the request, if it doesn't already exist. |
Thanks for the link to that code Oliver! I see what you mean. It looks like we're using Stripe's It looks like Stripe also allows per-unit subscriptions (https://stripe.com/docs/api/plans/create#create_plan-amount). If we created one that was set to $1 USD per unit, we could set the quantity to the amount for donations. So first we create a custom donation plan one time
And then when we create new subscribers instead of using the plan-id to set the amount like:
We set the quantity to the amount like:
|
No description provided.
The text was updated successfully, but these errors were encountered: