First time working with Stripe API. Implementing it on WordPress using PHP and JS. Working on a donation form. Donor should be able to choose a suggested amount (radio buttons-25,50,75,100) or pay as he/she wishes (text field after selecting 'other'). I was able to get this working.
There is a check box to set the amount up as a recurring payment. I created recurring payment plans for the fixed options like 25, 50, 100 etc.
How do I set up a recurring payment if the donor chooses a custom amount? Can't find the relevant API. Please help.
Stripe Billing is the fastest way for your business to bill customers with subscriptions or invoices. Capture more revenue, support new products or business models, and accept recurring payments globally.
Click on + to add a new subscription plan to your Stripe account. Set up the Stripe recurring payment information (Product/Service name, amount, frequency). Click Save.
Example of how to set up recurring paymentsSelect the customer you want to bill automatically. Select the product or service you want to bill them for on an ongoing basis. Choose a credit card as the payment method and enter the customer's payment details. Choose “make recurring” and enter a name for your template.
This is low tech, but the easiest thing I found was to use as little of the Stripe API as possible. Instead of creating subscription plans and products and things like that, you just:
If you already know how to charge somebody, you just have to figure out how to create the customer, and then the rest is good to go.
This means you shift some of Stripe's cleverness to our own infrastructure, but I actually found this easier to think about/maintain than thinking through all of Stripe's API docs and features.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With