#keviny
1 messages · Page 1 of 1 (latest)
Hi there, you can't use a price to create a charge.
Hello Jack. I wanted to create a charge linked to a product.
You should retrieve a price object based on the price ID (https://stripe.com/docs/api/prices/retrieve?lang=python#retrieve_price) and use its amount and currency to create a charge.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
how about the details of the product on the charge?
You mean to set a description on a charge? You can get the product details from the price's associated product object.
you mean i can just put the product's name on the charge's description?
for the product id, in case needed, i can just put it in the metadata?
It's entirely up to you.