#Gizmo-one-off
1 messages · Page 1 of 1 (latest)
I'm not sure if that's possible. Let me do a bit of digging
So you wouldn't be able to add a subscription to a one-off Payment Intent
You would need to create those separately, or add an item to the Subscription for the one-off Product/Price: https://stripe.com/docs/api/subscriptions/create#create_subscription-items-price_data
Thank you. Can you help me find where in the document you linked to it mentions adding a one-off item to a subscription? It looks like the items is a list of subscription items.
Can I not create a subscription using the payment method used for the one-off charge?
Thank you, koopajah. I'm looking at add_invoice_items.price_data, do the children mean you can only add on a specific product you've created in Stripe that has an id?
correct, you should use an existing product, it's way better for analytics. Otherwise you have to create a Price/Product first and then pass that Price/Product id
Thank you. Is there any way to just charge an arbitrary amount? Each purchase on my app is custom.
you would still create prices and products, that's required, but that still works
To be sure, will it save a new product with a new Id and price in Stripe for every one? So if I have 10,000 orders, this would create 10,000 unique products in my Stripe account?
yes but none of that has an impact
Thanks. It sounds far less than ideal even if it doesn’t have an impact. Are you certain there’s no other way?
You can first create a customer, then create an Invoice Item for a specific amount https://stripe.com/docs/api/invoiceitems/create and then create the Subscription and it will pull in the pending invoice item automatically
It works, it's just more clunky that what I just explained
Thank you koopajah, I will look into that