#Mikail-recurring-donations
1 messages · Page 1 of 1 (latest)
HI there 👋 do you already have an existing integration that you're looking to add this functionality to, or is this a new project?
This is a new project that is in test
Gotcha, and have you already selected an integration path that you plan to use, such as Checkout, or Stripe Elements?
Stripe Connect (standard account)
We own a platform and want to offer this functionality to our merchants
So the outline of what you need to do is:
- Create a form that allows your end-customers to define how much they'd like to donate
- Ingest that amount into your backend, and create the corresponding payment objects
- Have the customer complete the payment process.
If you're leveraging Checkout Sessions for example, then you can use the price_data parameter to dynamically define the price for the session during creation:
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yes this is correct but our pain point is recurring payments
Because stripe requires a subscription object, but the donation amount is custom
Can you elaborate on what you've tried so far and where you got stuck?
We tried to create a subscription object but it requires a predefined price object
that’s the problem we are facing right now
A predefined Product is required, but you can dynamically define the price via price_data:
https://stripe.com/docs/api/subscriptions/create?lang=java#create_subscription-items-price_data
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
thank you!
I will look into this, is it okay to reply in this thread if something else regarding this comes up?
until it closes of course
Sure, I'm about to step away, but will leave the thread open in case there are additional questions that arise while you try that out.