#samip_api

1 messages ยท Page 1 of 1 (latest)

carmine sluiceBOT
#

๐Ÿ‘‹ 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/1290918209821868062

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

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.

lucid cargo
#

Customer ID : cus_QxG7EsOvgIaBAB

simple talon
#

I'm checking how your subscription schedule was integrated

lucid cargo
#

Thank you.

simple talon
#

Learn to use webhooks to receive notifications of subscription activity.

#

This is the reason why subscription won't be updated to $29 in the upcoming cycles

lucid cargo
#

Is there a way I can avoid that ?

#

I want the subscription schedule to do a change over instead

#

I am using the 4242 card from Stripe so the payment shouldn't fail right ?

simple talon
lucid cargo
#

Can I grab the default payment method from here and attach it to the subscription schedule ? https://docs.stripe.com/api/payment_methods/customer_list

Or do I need to update the customer separately as per the link you've provided and then proceed to create the subscription schedule.

Also, I believe I need to attach it on the second phase only right ?

simple talon
#

Can I grab the default payment method from here and attach it to the subscription schedule ?
Yes! This will work too

You can set the default payment method to one of them:

  1. invoice_settings.default_payment_method on Customer
  2. default_payment_method on Subscription
  3. phases.default_payment_method on the Subscription Schedule
#

Also, I believe I need to attach it on the second phase only right ?
Yes! I'd recommend testing out in test mode

lucid cargo
#

Can you please leave this thread alive until then ? I will do a quick test by attaching it to the phases in subscription schedule

simple talon
#

We keep threads short lived but it'll stay open for ~30 minutes. If it's closed, you can ask a new question!

lucid cargo
#

Thanks, will do

#

req_wb3iYbzg05RGec

#

When I advance the test clock, I see two payments for $99 go through on the same date but not the new one ๐Ÿค”

#

This does not look correct (Please see attached image).

I expect the customer to be charged $99 once on 2nd of October (as I started paying to plan on the 2nd of october)

Then , on the 2nd of November, I want them to be charged $29 because they've downgraded.

Any further charges should only ever be $29.

#

However, I am getting charged twice on 2nd october and twice on 2nd November (albiet it's got a diffrent price)

#

And the customer portal still has this scheduled subscription, I thought it'd be replaced since end_behaviour is release ?

simple talon
#

First invoice was $99 and the subsequent ones were $29

lucid cargo
#

Yes, it does ๐Ÿค”

#

However, if you'd pull up this customer cus_QxGgN1yWp76UhU . You'll see that 4 payments has been taken out from the account . It should only be 2 ($99 and $29) and there should no longer be a subscription schedule instead a new subscription on the account with the previous one marked as canceled?

#

Even the recent activity indicates that the customer is being charged , $99 twice ?

simple talon
#

There were two subscriptions created on this customer.

https://dashboard.stripe.com/test/logs/req_wb3iYbzg05RGec using Subscription Schedule created sub_1Q5MAcGei7MrDZaxBZmq8P7B which behaved correctly.

sub_1Q5M9eGei7MrDZax2nbaOzrn was created from a Checkout Session: https://dashboard.stripe.com/test/logs/req_xrYGYKj6O5lHWu

#

Your system created two subscriptions on this customer

#

One through Checkout Session whereas another through Subscription Schedule

lucid cargo
#

hmmm, maybe that's the bit that's wrong.

However, I want to use the same subscription from the checkout session. Is that possible ?

#

I want to modify this sub_1Q5M9eGei7MrDZax2nbaOzrn itself and not create a a new subscription as creating a new subscription will break other functionalities in my system.

simple talon
lucid cargo
#

Sweet, let me try this. I will try this out and hopefully come back before the thread is inactive ๐Ÿ˜„

simple talon
#

Sounds good!

lucid cargo
#

Thank you

#

This is exactly what I wanted

#

However, I have a small question with this

#

For Customer ID : cus_QxH4XyCfWhRa83

Why does the subscription still say there is an update scheduled ? Did I miss passing a param for that ?

Request ID : req_u0nSXOcJzgEMXe

simple talon
#

The subscription schedule will only be released after the last phase is ended

lucid cargo
#

Can I make sure that it updates one once and it ends?

#

My iterations is set to 1

simple talon
#

In your second phase with iteration: 1, its end date is 2024-12-02 06:59:14 UTC. Subscription schedule won't be released until the end date of the second phase is fully completed

#

This means that the subscription schedule will be released on 2024-12-02 06:59:14 UTC, which is one iteration of the second phase

lucid cargo
#

Oo, is there a way I can release immediately after the new subscription has been change over?

simple talon
lucid cargo
#

Thanks , let me try this ๐Ÿ˜„

#

If I don't store the previous subscription item, there is no way I can tell that's new though ?

#

The problem is we allow immediate upgrade too so we need to clear the subscription schedule

#

So a customer can downgrade and upgrade at the same time

#

Well, almost at the same time**

simple talon
lucid cargo
#

Thanks, will try this and re-open another thread if I can't get this to work

#

But, thank you very much. You've been a savior !!!

#

Thank you for all the help