#wrent-help
1 messages · Page 1 of 1 (latest)
Anyone have any experience with stripe API's and Zoho's Deluge?
You'd want to talk to Zoho directly I think
They have referred me here for this particular issue I am facing
what's the issue?
This is what i run, it works for other APIs
I'm sorry that's a picture of code
That is the response
What do you need help with? What isn't working, what exact API error do you get, etc
So I dont get any error codes any more, but the response does not make any changes
The unit_amount_decimal is still 5000 instead of 5500
sorry, i thought you might want to see it all as context to issue i am facing
this is the request that created the subscription. Your code is clearly passing plan: 'plan_IzjleXPKbw8pXP' in this case. This is the Plan used for the Subscription (the Plan API is legacy)
so it's completely ignoring all the things you are mentioning here
is this expected that you do that on creation?
I am trying to update an existing subscription to have a new monthly payment amount. ie £50 this year changes to £55 next year, however the exact amount varies and may in reality be £54.58 for one and another may be £52.22 etc
still looking, sorry the channel got a bit busy
okay if you look at this you see you pass zero parameter
so doesn't look like your code is passing any parameter right now
I don't really know what subUpdate.toString() does. This looks purely on Zoho's end, that's why I said to talk to them earlier and they were wrong to send you to us. This is their own abstraction/platform
they need to tell you how all of this works, how to make HTTP requests with application/x-www-form-urlencoded data
also it's not items.price
items is an array so it should be items[0].price_data....
you're also missing the old subscription item id
I would encourage you to first write that call outside of Zoho's environment, with curl or a library and then once it works get it in Zoho
Thanks for your help. I will get back in touch with Zoho
I have the subscription defined as an earlier variable
no you don't
you have the subscription id sub_123. But that's not enough
you are trying to switch from Price A to Price B. When you do that, you have to pass the subscription item id si_123
items: [
{
id: 'si_123', // Existing SubscriptionItem id to change
price_data: {
// price information custom
}
}
]
}```
your params should look like ^ (but not in JSON as we use application/x-www-form-urlencoded
Sorry, i miss read that, you are correct.
so more like this items[0][id]=si_123 items[0][price_data][product]=prod_ABC items[0][price_data][currency]=GBP items[0][price_data][unit_amount]=1111 ...
it's a bit complex to do unfortunately when you don't use our real libraries but overall it's not too hard once you get it
I am sure I will figure it out, your direction has been very much appreciated. I will get back to it on my end as I dont want to take up more of your time. I will refer back to zoho for further queries.
Really my advice is to truy without Zoho
that way you know when your code works with Stripe and then you "port it to Zoho"
I will do that
but we're definitely happy to help you with the Stripe API part, like I just did
I will do that*
Awesome!
Thank you. If i have any issues running it in a different environment, I will get back to you
Amazing, have a great day!