#samip_unexpected
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1282902261642559498
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
The first Screenshot is before forwaring time and the second is after forwarding time. These are test data.
Could you share the example subscription schedule ID?
sub_sched_1PxKW3Gei7MrDZaxXsm9uz8A
There was no default payment method on the subscription or customer, so payment attempt was failed since no payment method was available to charge
How did it succeed the first time around ? Also, how do you think I can get around this ?
In the first invoice sub_1PxKVrGei7MrDZaxnXY0PBoZ, default_payment_method was set on the subscription as the payment method was created from Checkout Session
If you wish to use the saved payment method on customer, default_settings.default_payment_method should be set on the Subscription Schedule creation request: https://docs.stripe.com/api/subscription_schedules/object#subscription_schedule_object-default_settings-default_payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Do I extract this from the subscription that was deleted ? i.e sub_1PxKVrGei7MrDZaxnXY0PBoZ this one ?
The default payment method I mean.
I have a case where a customer subscribes to product A and then when they decide to upgrade I cancel their product A but create a subscription using a subscription schedule for them.
So, inorder to get their payment details do I need to first extract it from the subscription that I am deleting and then use that when creating a subscription ?
Is this a good option ?
Also, it would be greatful if you could tell me if there is a workaround for that DRAFT state as I want the payment to go immediately and not stay in DRAFT for the time being .
Why can't you change the price on the subscription directly? https://docs.stripe.com/billing/subscriptions/upgrade-downgrade
There is no need to cancel the existing subscription and create a new one
These are different products.
Product A and Product B are different products but we allow an update from Product A to Product B
This is supported in Subscription by changing different products
Are you facing any error in updating a subscription to a different product?
A price belongs to a product. By updating the price, the product will be updated as well
I am trying to create a distinguishion between Product A and Product B
When a customer upgrades to Product B, then I currently expire Product A and create a subscription schedule for them for Product B.
However, the invoice goes to draft mode for 1 hour which is something known to us but was wondering if there is a way to make sure the customer pays the amount when the subscription schedule is released
What are you trying to achieve here? Could you share your scenario in an example?
By updating the subscription directly should solve the use case you described and there shouldn't be any need to delete an existing subscription and creating a new one. When you update the subscription, you would have been able to distinguish the product A and product B
I still don't see your use case why Subscription Schedule should be used
I am trying to achieve a cross product update if that makes sense
Subscription Schedule should only be used if you attempt to schedule a subscription or its changes in the future
Otherwise, Subscription Schedule shouldn't be used
I am trying to achieve a cross product update if that makes sense
What is the problem you're facing if you update the subscription directly?
I think adding additional prices makes sense
I can see why you'd want me to do that.
Hi @untold moon I'm taking over this thread, let me know if you have any questions.
Hi jack, River has given me some pointers to work on I will use that and re-open the thread if I cannot still solve it
Hi @valid birch , just following on the above.
I tried to use one product with multiple prices to manage the subscription and perform upgrade and downgrades. But, the same product can have a different name based on price.
For example If I have a product A with three prices : $99 , $29 and $19.
When in checkout page, I want customer to see something like this when they get to the checkout session:
- If the product price is $99 -> The product name is Product A
- If the Product Price is $29 -> The product name is Product A Lite
- If the Product Price is $19 -> The product name is Product A Lighter ....
How do I configure this ?
I know I am not supposed to mention but mentioning because this thread has been idle for a while, sorry in advance !
I am using a Stripe Hosted Page in my checkout session
Hmm, I think you can just name your products "Product A ", "Product A Lite" and "Product A Lighter", does it work for you?
But that takes me back to making 3 different products and makes me circle around the original issue
It's a long thread, can you briefly tell me the original issue that you want to solve?
I have an need to upgrade a customer to a different product using the API . The way I do it is to expire the customer's existing subscription and create a new subscription using subscription schedule for them. Understandably, it keeps it in the draft status until 1 hour, but when I used test clock to forward the time it failed with a retry.
- This happened due to a missing card.
- I cannot afford to have a
DRAFTstate when upgrading.
Now I have two options :
- Create one product with multiple pricing and somehow differentiate between them in the checkout page.
- Create 16 different products and cross update a customer, so that when a customer wants to go from Product A to Product A lite, I will have to update the subscription with the new product ?
No you don't need to cancel the subscription, you can update it with the new price directly https://docs.stripe.com/billing/subscriptions/upgrade-downgrade
New price of the newer product ?
It can be the new price of a new product, or a new price of an existing product
So, if the customer is going from "Product A Lite" to "Product A Lighter" then I should have two products with the name and then upgrade them ?
Whilst upgrading them using the Product A Lighter's priceID
I'd recommend you creating a new product with a new name, so that it can be reflected in the invoice / receipt that your customer receives.
Okay, if that's the case I am happy to create those three different products.
The problem arises when I have 4 different pricing tier for the product
So, lets assume we are serving Russia, UAE, AU and Nepal
Product A Lighter can have different prices for Russsia, UAE, AU and Nepal
Does this mean I now need to setup a new product for each country ?
That would be a looooot of products thought
Can I not just update the stripe page product description based on price ?
No, you can create one product (i.e., Product A), and associate it with prices created for Russia, UAE, AU and Nepal
You can create a product with prices in different currencies
That is amazing !