#shah_80546
1 messages ยท Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- shah_80546, 6 days ago, 30 messages
Hi ๐ you can't. You will need to use price_data to create a new Price adhoc for that, or create the new Price before creating your new Subscription.
what all details you require to create a price_data
The full structure of that hash is shown here:
https://stripe.com/docs/api/subscriptions/create#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.
but if i create a new price for this exisiting product will it update existing product with new price
meaning if i go in dashbard and see product will it show new price there too
Products can have many Prices associated with them, but I believe using price_data also sets the created Price to not be reusable. I would recommend trying it in testmode and see if it displays in the dashboard as you hope, we aren't as familiar with the dashboard side of these flows and primarily focus on helping with our API.
ok thanks
how do i set subscription start as future date meaning subscription start from this date and its monthly and it run for a year
i can easliy set it through dashbaord but how can i do thru api
That's done through a Subscription Schedule.
Example of starting in the future:
https://stripe.com/docs/billing/subscriptions/subscription-schedules/use-cases#start-subscription-future
Key thing you need to change from the sample is the end_behavior, sounds like you want it to be set to cancel instead of release.
where do i provide end date for example i want subscription to complete in one year from start date meaning let say i set start date to 18 jan 2024 then last invoice should be 18 dec 2024 meaning 12 months only
You likely don't want to set an end date on the Subscription as it's really tedious to do that well, instead you'll want to leave iterations set to 12, as shown in the sample, and then set end_behavior to cancel. I'm pretty sure those settings on the Subscription Schedule will do what you want, and would recommend using a Test Clock to see that behavior in your testmode and check it:
https://stripe.com/docs/billing/testing/test-clocks
can i set payment setting and payment behavior in that api for example i want to use acss debit as payment for my subscription
Like you already have an ACSS Debit Payment Method for your Customer that you want to use?
no once subscription is created he will setup acss_debit for that susbcription
No, as far as I'm aware you can't set Subscription specific details to accomplish that. You can likely accomplish that if you set collection_method to send_invoice and have ACSS Debit set up as an accepted payment method type via the Hosted Invoice Page, but I'm not getting the sense that's how you want to approach this.
Not a Subscription Schedule integration
so whats difference between too meanin subscription and subscription schedule
Subscription Schedules are wrappers for Subscriptions, they're used to schedule future changes for Subscriptions.
but i do not have any other future change then i want my subscription to start from a specific date rest is same
Well starting a Subscription in the future is one of the key use cases for using a Subscription Schedule
ok if i want to start subscription from today then i use subscription api and if i want my subscription to start in any future date then i use scheudle is that what you are saying ?
Yup
and you think you can use pre authroized debit as payment method for schedule correct?
Not sure offhand. I think if you already had one set up, it'd be easy. I'm a little fuzzy on whether they'd be able to create a new ACSS Payment Method, but it may depend on the flow you have built to collect those details. I would recommend starting to play around with Subscription Schedules in test mode and get a feel for them. You can create them inside of a Test Clock, where you're able to advance time, so you can see their full lifecycle and test exactly how they'll behave with the rest of your flow.
ok one last question in case i am using subscription how do i set iteration meaning same flow start form today for 12 month montly
Subscriptions don't have iterations, that's a Subscription Schedule parameter.
They have cancel_at_period_end, which you don't want to use if you're setting them to cancel that far ahead.
Instead cancel_at is the best option:
https://stripe.com/docs/api/subscriptions/update#update_subscription-cancel_at
Make sure you test that, as using cancel_at will lead to prorations being added to the Subscription's final Invoice if you don't set it to cancel at exactly the end of the billing period.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok thanks
i am getting this error when i am trying to create a scheudule: Cannot read properties of undefined (reading 'payment_intent')
is payment intent mandatory before creating schedule
No, you do not create a Payment Intent before creating either a Subscription or Subscription Schedule, the full list of supported parameters for creating those objects is in our API spec:
https://stripe.com/docs/api/subscriptions/create
https://stripe.com/docs/api/subscription_schedules/create
Subscriptions automatically create Invoices which automatically create Payment Intents.
Subscription Schedules automatically create Subscriptions which triggers the above chain.
so any reason why it is throwing that error
Not without more context, do you have the ID of the request returning that error?
Is that error thrown after the request? My guess would be you're inspecting the created object, but aren't finding a Payment Intent because there isn't one yet for Subscription Schedules
wired thing is it throws error but also create a subscription
๐ stepping in for my teammate. Do you have a request ID and/or details about the error you're receiving?
Sending one-off questions like this is making it hard to assist. Could you summarize where you're currently blocked?
previous issue i have resolved it now going back to how do we setup acss debit as payment method for subscription schedule created is my original question
I think you'll want to use this flow (SetupIntents) to collect ACSS details: https://stripe.com/docs/payments/acss-debit/set-up-payment
then use schedules to create a subscription that starts in the future
but how do i provide that payment details in subscription meaning how does it know which payment it has to use for subscription
After you've created and confirmed the ACSS SetupIntent, you should be able to inspect the SetupIntent to pull out the ACSS PaymentMethod ID
You can also retrieve SetupIntents for a given customer and pull their PM ID and mandate ID: https://stripe.com/docs/api/setup_intents/list
ok but how to add them in subscriptiion api calls meaning how to associate them with subscription
As my teammate mentioned, I recommend testing this out. When you create a subscription schedule and a phase, you can specify the default payment method to use: https://stripe.com/docs/api/subscription_schedules/create#create_subscription_schedule-phases-default_payment_method
ok let me try