Start a new topic

Plan unit price. Can not set 1600 usd

Hello there. I'm using your service and your api. I'm using create subscription for customer function(python ver.)


https://apidocs.chargebee.com/docs/api/subscriptions#subscription_plan_unit_price


I'm trying to change default plan price using this attribute and it gives me an error - wrong format. 


I recieve a number from my site - for example 1600, it's not in cents, so i must make *100.


so finally it looks like :
How can i fix it? or there is limit for it?

subscription = chargebee.Subscription.create_for_customer(customer_id, {
"plan_id": plan_id,
"plan_unit_price": price * 100,
"cf_order_number": order.id,
"cf_customer_number": company.id
}).subscription

ohh. Now it's good. Thank you for your reply. 

Can you try passing it like this "plan_unit_price": int(price) * 100,

I'm discussing this with my Engineers and I'll update you tomorrow.

image


which type it must be?

image


Hi there


Can you check the datatype of 'price' at your end? We tried using the same script and it worked for us.

Login or Signup to post a comment