#Gizmo-one-off

1 messages · Page 1 of 1 (latest)

outer flare
#

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

gleaming dawn
#

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?

outer osprey
#

that will add a one-time line item to the first invoice of a subscription

gleaming dawn
#

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?

outer osprey
#

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

gleaming dawn
#

Thank you. Is there any way to just charge an arbitrary amount? Each purchase on my app is custom.

outer osprey
#

you would still create prices and products, that's required, but that still works

gleaming dawn
#

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?

outer osprey
#

yes but none of that has an impact

gleaming dawn
#

Thanks. It sounds far less than ideal even if it doesn’t have an impact. Are you certain there’s no other way?

outer osprey
#

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

gleaming dawn
#

Thank you koopajah, I will look into that