#tidymince_api

1 messages ยท Page 1 of 1 (latest)

steep acornBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1257652281181077504

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

cobalt marsh
#

I've checked that the API version used in the account is the one pinned in the Go sdk (2024-04-10) so it's strange that by using it I get this error

#

I'm not sure I'm using the API correctly. Alternatively I'd like to know how to create a subscription schedule that does what I described above. About the start date in the past I can give an example:

  • today 2 July 2024 I want to create this subscription
  • I want the subscription to start on the 1st of July 2024 with a single price as per phase 1 (invoice #1 has a single price)
  • On the 1st of August 2024 I want the subscription to renew and charge for the existing price plus an additional one I added in the phase 2 (invoice #2 has two prices)
pure fossil
cobalt marsh
#

So the go SDK is not correct?

#

Thanks

#

Btw will this allow me to achieve what I mentioned above?

pure fossil
cobalt marsh
#

Because I already have the StartDate as top level param but I then see a proration applied and the billing cycle anchor set to the moment I create the subscription schedule

cobalt marsh
#

But it doensn't matter, my mistake for not reading the docs properly, I just looked at the go docs tbh

cobalt marsh
pure fossil
cobalt marsh
#

Thanks

coarse ivy
#

Hey! Taking over for my colleague. Let me catch up.

coarse ivy
#

Between, can you try using the latest version ? v79.1.0 ?

#

Also, could you please share the code you are using in order to create the scheduler? same on the github issue

cobalt marsh
coarse ivy
#

Yeah, the SubscriptionSchedulePhaseParams is used for both scheduler creation and update. But it can't be set when creating the Scheduler agree.

cobalt marsh
#

I'm afraid bumping the sdk used would result in a bit of additional work that I'd prefer to avoid if not necessary to solve the problem I'm trying to solve which is the behaviour described here #1257652281181077504 message

#

But I will add code to the issue, no problem

coarse ivy
#

Could you please share the code you are using with the go SDK ?

cobalt marsh
#

Yes

coarse ivy
#

Well, you need to remove this StartDate: stripe.Int64(startAt.Unix()), from the phase

#

line 68 in your function

#

And keep just the one at the root level.

#

Why are you passing StartDate at the phase level ?

cobalt marsh
# coarse ivy Well, you need to remove this `StartDate: stripe.Int64(startAt.Unix()),...

Yes, this is super clear and I've moved on from this problem after opening the issue on github and I'm now looking at finding a solution for I wanted to achieve with that. What I'm trying to achieve is to create a subscription with:

  • start date in the past (back date)
  • billing cycle anchor on that date
  • an additional phase to add an item to the subscription in the second billing cycle
#

I'll give you an example:

  • today 2 July 2024 I want to create this subscription
  • I want the subscription to start on the 1st of July 2024 with a single price as per phase 1 (invoice #1 has a single price)
  • On the 1st of August 2024 I want the subscription to renew and charge for the existing price plus an additional one I added in the phase 2 (invoice #2 has two prices)
#

Is it clear what I'm trying to achieve?

coarse ivy
#

Yes, this is super clear and I've moved on from this problem after opening the issue on github and I'm now looking at finding a solution for I wanted to achieve with that.
Then you should close that issue, as it's solved now? As mentioned earlier the " the SubscriptionSchedulePhaseParams is used for both scheduler creation and update. But it can't be set when creating the Scheduler."

#

On the 1st of August 2024 I want the subscription to renew and charge for the existing price plus an additional one I added in the phase 2 (invoice #2 has two prices)
You can achieve this using phases sure.

cobalt marsh
#

Thanks for sharing this piece of doc. I've actually followed this already but it results in a proration and setting the billing cycle to the date when the schedule is created

#

What am I doing wrong?

coarse ivy
#

Can you share the invoiceId ?

cobalt marsh
#

yes

#

This is the invoice that is generated with the proration: in_1PY4BuIPsU8bKnjX3mPpWs9O

#

This is the subscription: sub_1PY4BuIPsU8bKnjX3yS75vhJ

coarse ivy
cobalt marsh
#

I've already set this on the first phase and it doesn't seem to work. I guess I should set this again in the top level?

coarse ivy
#

Yes it's a top level param: default_settings.billing_cycle_anchor

cobalt marsh
#

Thanks

#

I will try this

#

Thanks for your support

#

It works ๐Ÿš€

#

Thanks