#martin_98625
1 messages · Page 1 of 1 (latest)
Hello
hi!
You can create an Invoice Item and associate it to the Subscription using https://stripe.com/docs/api/invoiceitems/create
It will then be picked up by the next Invoice
ok, and it would be paid when the next invoice gets paid right?
the question comes because I was getting this error trying to add a "SubscriptionItem":
The price specified is set to `type=one_time` but this field only accepts prices with `type=recurring`. (Stripe::InvalidRequestError)
Hi there 👋 yes, that is correct. Subscription Items can only use Prices with a recurring type, whereas Invoice Items can only use one_time ones.
If you want to see exactly how that behaves in test mode, you can leverage Test Clocks to test the full lifecycle of a test Subscription and its Invoices:
https://stripe.com/docs/billing/testing/test-clocks
awesome! thanks