#Vinz

1 messages · Page 1 of 1 (latest)

somber talonBOT
naive cloak
vivid marlin
#

I do

return stripe.Invoice.upcoming(
  subscription=stripe_subcription_id,
  subscription_items=subscription_items
)
naive cloak
#

Ok, and was the result not what you expected?

vivid marlin
#

but the the invoice.period_end returned is the day of period_start of the current subscruption

#

(subscription created yesterday in test 22/02/2023) but I want the next invoice to be updated at current_period_end 22/03/2023

naive cloak
vivid marlin
#

Well the invoice.period_end is still today

elif stripe_subcription_id and subscription_items:
    return stripe.Invoice.upcoming(
        subscription=stripe_subcription_id,
        subscription_billing_cycle_anchor="unchanged",
        subscription_items=subscription_items
        )
elif stripe_customer_id:
    return stripe.Invoice.upcoming(  # Retrieve next invoice.
        customer=stripe_customer_id,
        automatic_tax={'enabled': True},
        subscription_billing_cycle_anchor="unchanged",
        subscription_items=subscription_items
    )
naive cloak
#

You need to pass a timestamp for when you'd want the changes to come into effect (i.e. 22/03/2023)

vivid marlin
#

subscription_start_date ?

#

it cannot be for subscription_billing_cycle_anchor since it is here for existing subscription
For new subscriptions, a future timestamp to anchor the subscription’s billing cycle. This is used to determine the date of the first full invoice, and, for plans with month or year intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to now or unchanged.

spiral hollow
#

Hi! I'm taking over this thread. Give me a few minutes to catchup.

loud halo
vivid marlin
#

no, there won't be proration. I want to display price for subscription update for next billing cycle

loud halo