#sanket8360
1 messages · Page 1 of 1 (latest)
Hello Rubeus
Hello! No, the smallest interval we have is day: https://stripe.com/docs/api/prices/object#price_object-recurring-interval
If you want to charge hourly you would need to handle that manually on your end.
Maybe? What's your use case? Can you provide more details?
Sure
I have one e-learning portal
And that portal has many subscription plans
Like monthly and yearly.
So, for example, right now on the Admin backend we can select "month" or "year" to display... well for the other categories in actual implementation like in the Tutoring and College Advising category we have now, those are paid for with # of hours packages (like $400 for 20 hours, for example). So if the admin can select "# hours package" where the admin can select the number of hours by inputting a number like "20", then "20 hours package" would show up on the Pricing page. This allows us to set and change and create packages with different # of hours for a created package. For example, if the following packages exist on the Pricing page and we want to change one of them from:
$400 / 20 hour package
to
$500 / 15 hour package
👋 stepping in as Rubeus needs to step away
Hmm okay but are these packages for a recurring model?
That just sounds like a one-time purchase to me?
It would be great if it could be repeated.
Ah okay well then yeah the minimum interval is daily
Yes i know
So you would want to create repeating one-time payments in this case if you want a shorter interval
I'm going with a one time payment when I know Stripe doesn't have hourly intervals.
But can you guide me how can I archive it in one time payment?
Sure
Have you decided which integration you want to use?
Stripe Checkout vs. the custom Elements flow?
Or are you already collecting payment method details in some way?
Actually I have to integrate both subscription and one time payment.
Okay well Stripe Checkout is the easiest way to go about this. The basic integration guide for that is here for one-time payments: https://stripe.com/docs/payments/accept-a-payment and here for Subscriptions: https://stripe.com/docs/billing/subscriptions/build-subscriptions
I have already done an integrated subscription method.
Then, for recurring one-time payments you would create PaymentIntents off-session like we show here: https://stripe.com/docs/payments/save-during-payment?platform=web#charge-saved-payment-method
It only stores payment methods and purposes. am i right
Not sure what you mean by that, sorry.
For One time payment
Is there a way to use an existing payment method for a one-time purchase?
Yep see that link above.
It shows you how to charge a saved payment method using a PaymentIntent
I have to use this form for one time payment.
Sure, that looks like your custom form? Or maybe you are working with a third party?
Yes I have my custom form.
Regardless, you need to call your backend and create/confirm a PaymentIntent and pass the PaymentMethod ID that you want to charge.
Subscriptions also work using this form and are fully functional using the Laravel Cashier package.
So I also have to make one time payment using this form.
Okay so you likely want to just create another button other than your "Subscribe With Existing Card" button that is something like "Create one-time payment with existing card".
Then when that button is clicked you call your backend and create/confirm a PaymentIntent
Yes it is but I don't want to open the Stripe checkout page.