[Answered ]-Getting the amount of a plan using stripe API in django

2👍

To retrieve the amount of a plan, you need to issue a plan retrieval call:

plan = stripe.Plan.retrieve(request.POST['plan'])
amount = plan.amount

Your charge retrieval call is invalid: to retrieve a charge, you need to pass its ID, which in this case you don’t have because you didn’t directly create the charge — rather, you created a subscription, and Stripe automatically created a charge for you.

👤Ywain

Leave a comment