#Juni-subs

1 messages · Page 1 of 1 (latest)

old lodge
slender saffron
#

For example, if they purchased 3 tier 1 tokens and they want to upgrade one of those tokens to a tier 2 token, the new subscription would need to be 2 tier 1 tokens + 1 tier 2 token.

#

But the retrieveUpcoming endpoint doesn't allow me to add that extra tier 1 token. Why is this?

#

Would I need to programmatically create a new subscription for them? If so how can I accurately get the total cost of the prorated changes?

old lodge
#

Hello! give me a minute to catch up with everything and I'll help you as soon as i can!

#

Do you have the request ID of the failed request?

slender saffron
#

These are the two items I try to preview the invoice with

#
[
  {
    id: 'si_KgFDqOtpSRM0dk',
    price: 'price_1J4pxbEzwzb413li8PgCJl9N',       
    quantity: 0
  },
  {
    id: 'prod_JiGY9JFimI6HfA',
    price: 'price_1JfIwkEzwzb413liAhlPwfQT',       
    quantity: 1
  }
]
#

Wait a minute

#

I think I see the issue, is si_ stripe invoice?

#

Could it be that I'm using a stripe invoice id instead of a product ID?

old lodge
#

Ah I se the issue - so instead of

  {
    id: 'prod_JiGY9JFimI6HfA',
    price: 'price_1JfIwkEzwzb413liAhlPwfQT',       
    quantity: 1
  }

you should just do

  {
    price: 'price_1JfIwkEzwzb413liAhlPwfQT',       
    quantity: 1
  }
slender saffron
#

Oh ok, let me try that

slender saffron
old lodge
#

Ah Sorry I should've been clearer - you should only remove id for the second subscription item, not the first one

#

So the full thing should look like this:

#

[
{
id: 'si_KgFDqOtpSRM0dk',
price: 'price_1J4pxbEzwzb413li8PgCJl9N',
quantity: 0
},
{
price: 'price_1JfIwkEzwzb413liAhlPwfQT',
quantity: 1
}
]

slender saffron
#

Oh ok, let me try that

#

That worked! Thank you so much!