Use metadata on the Checkout Session. I'm not sure why you got an error since Checkout Sessions do support metadata.
Use the Products and Prices you pass in line_items to infer data about the goods sold. For instance if you sell T-shirts in 3 different sizes, you'd have a Product for each size (small, medium, large) and a Price for each size describing how much you charge for each. This way when you expand the line_items property you'd be able to infer data like description, size and amount via the Product and Price objects.
If you're still having trouble I recommend jumping into our official Discord where Stripe engineers hang out and help you with your questions!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You have two options here:
Use metadata on the Checkout Session. I'm not sure why you got an error since Checkout Sessions do support metadata.
Use the Products and Prices you pass in
line_items
to infer data about the goods sold. For instance if you sell T-shirts in 3 different sizes, you'd have a Product for each size (small, medium, large) and a Price for each size describing how much you charge for each. This way when you expand theline_items
property you'd be able to infer data like description, size and amount via the Product and Price objects.If you're still having trouble I recommend jumping into our official Discord where Stripe engineers hang out and help you with your questions!