#kanohian

1 messages · Page 1 of 1 (latest)

distant crystalBOT
manic sage
#

Can you be explicit and explain the chronological steps to what you did and what the outcome was? Please also include request IDs. Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request

open night
#

sure

#

I can provide the request also

#

req_AHh4LoGVZ56fA5

#

basically this is what I did

#

{
"payment_behavior": "pending_if_incomplete",
"proration_behavior": "always_invoice",
"items": {
"0": {
"price": "price_1MPTixGGCGfoPLShqsqs7Op9"
}
}
}

#

I replaced the subscription items with a new one

#

it works fine but then I get this in the response

#

"plan": null,
"quantity": null,

#

and that is a problem since stripe sends that to my webhook and then my system process the subscription upgrade as a 0 cost upgrade

manic sage
#

The request you provided does not have a null plan or quantity, so I don't know where that is coming from

open night
#

full rsponse

#

line 185

#

at least that is the plan the system checks

#

you right though, this is it
req_biPlHvtF7wSPkh

manic sage
#

I don't know what "that is the plan the system checks" means. The request you provided also isn't null for plan

open night
#

in line 185

manic sage
#

Okay, I see. What are you hoping to get with the plan value?

open night
#

well, my crm uses as reference

#

for the cost of the subscription

manic sage
#

Because there's also items[plan]

open night
#

that is what I want to confirm

#

assuming it will only have 1 item

#

is safe in this case to grab the item[0] plan?

manic sage
#

Subscriptions can have multiple items in them, so you should iterate through the items hash and grab the amount from each item

open night
#

and. Will Stripe eventually update this plan property ? Because dont know if any other hook needs it

open night
#

maybe when doing the update can I also update the plan????

manic sage
#

I believe plan is legacy and cannot be updated. Is your CRM already looking for it? Or are you trying to do something else here?