#alvin_63959

1 messages · Page 1 of 1 (latest)

swift badgeBOT
slate sundial
#

hi! what's the question exactly?

tall yew
#

Hi, so I have this code and what it does is trying to upgrade a subscription using "service.Update(AccountSubscription.StripeSubscriptionID, options);"

question is I have already changed the subscription right then what if payment fails. Do I just update the subscription back to the previous subscription plan?

#

I can see that it has invoice.payment_failed event but I am more concerned abt how to revert the subscription back to the original subscription plan

slate sundial
tall yew
#

say I want to the update back to the old plan, will the billing cycle reset or revert to normal?

slate sundial
#

it depends on the specifics of what type each plan was

#

in general updating doesn't change the billing cycle at all unless you pass parameters to change it, or you're changing from a monthly to yearly plan or vice versa etc

swift badgeBOT
tall yew
#

I see, okay thanks for your help!

#

got a question again,

tight robin
#

go for it

tall yew
#

is there something wrong with the request, it says I cannot pass in metdata?

tight robin
#

What is the ID of the request that returned that error?

tall yew
#

sub_1OdvFtGFC7Ks3wO6VDWNkyxI

tight robin
#

I'll try to find it from that. For future reference, request IDs begin with req_, are returned in error messages surfaced by our API, and can also be found via the dashboard:
https://support.stripe.com/questions/finding-the-id-for-an-api-request#:~:text=Using the dashboard,the dashboard URL as well.

tall yew
#

I think this is the one

#

req_hCJElNjcYUF7kq

tight robin
#

Gotcha, it does look like you're providing both item level and subscription level metadata there. It seems to specifically be the item level metadata that is the issue, but I don't see where that is being defined in the code snippet you provided. Looks like it may be elsewhere in your code where items is being created/set.

tall yew
#

it was used here

#

so it cannot pass in paymentbehavior?

tight robin
#

Correct, you cannot pass item level metadata while also setting payment_behavior to pending_if_incomplete .

tall yew
#

any alternatives if I cannot use payment_behavior?