I feel like i'm missing something obvious.
I need subscriptions to renew on a fixed schedule but start with a prorated amount for the remaining part of the current period. For example.
Plan A is billed monthly on the 15th of the month for $100
A customer signs up on the July 1st.
There were 30 days in june so I want their first invoice to run on June 1st for the remaining 15 of those 30 days. The amount would be (15/30 * $100)=$50
And their next invoice should run on June 15th for $100 (and the $100 on each 15th of the month after that)
I've read
https://stripe.com/docs/subscriptions/billing-cycle and tried various combinations craeting the invoice with and without a trial_end and updating it with a new trail_end with both prorate=true and prorate=false. I even tried playing with proration_date:
subscription = stripe_customer.create_subscription
subscription.proration_date = next_billing_date
subscription.trial_end = next_billing_date
subscription.save
This seems to create 2 invoices
* an invoice for the full amount
* a second invoice with two line items
- one for $0 and
- one for a credit but with the a description that makes no sense "Unused time on <plan> after <now>"