#dbjpanda

1 messages · Page 1 of 1 (latest)

woven vesselBOT
vapid lintel
#

Hi! I believe this is possible to update only when the invoice is in draft mode. That description corresponds to the invoice item's description

novel relic
#
const subscriptionSwitched =  await stripe.subscriptions.update(
            userData.current_plan.subscription_id,
            {
                items: [{
                    id: userData.current_plan.item_id,
                    price: price_id,
                }],
                proration_behavior: 'always_invoice',
                payment_behavior: 'pending_if_incomplete',
                expand: ['latest_invoice.payment_intent'],
                billing_cycle_anchor : 'now',
                proration_date: userData.current_plan.start_date
            },
        );
        logger.info('subscriptionSwitched', subscriptionSwitched);
        return subscriptionSwitched.latest_invoice.hosted_invoice_url

Where can I set the description field here?

vapid lintel
#

the above is updating the subscription. what you'll want to update is the subscription's invoice when it's in draft state

novel relic
#

It gives me a hosted pdf url for confirmation.

#

can I set an invoice template here?

vapid lintel
#

okay, let's back up a bit. no, it's not possible to change the "default" description used for proration line items like the one above. if you want to change the description, you'd need to do it before the invoice is finalized/before the customer can pay