#cnguyen-statement

1 messages · Page 1 of 1 (latest)

rapid tulip
shell walrus
#

Yes but for now, I do a subscription.create with a trial period. Then, the invoice, etc is automatic

#

There is no way to add/init the statement_descriptor when I do the subscription.create ?

rapid tulip
#

if there's a trial period then there's no payment, no charge, so nothing is on the customer's statement, so not sure I follow you.

rapid tulip
#

each invoice uses the descriptor of the product it's charging for, or you can override it on each invoice manually

shell walrus
#

I want that the statement_descriptor on the bank statement was impacted.

#

For the subscription that I created

#

It's to avoid the problem with VISA (Visa's Dispute Monitoring Program (VDMP))

#

In the email, Stripe give us a good idea. It's to have multiple statement descriptor

#

And I see that the statement descriptor for the subscription is on the product. And the only moment where I handle it, it's on the subscription.create

#

That's why I try to find the way to update the statement descriptor.

rapid tulip
#

I see. Not sure what else exactly I can say though.

#

what part of your question is not answered by what I've said above?

shell walrus
#

The charge is done at the end of the trial period. OK.

#

So, I can do nothing until that moment to change the statement descriptor

#

Or when I create the subscription with the trial period, there is an invoice, and I can update the statement descriptor just after ?

#

And if yes, is there a webhook for that ?

#

or maybe, on the subscrition.create.finally() ?

rapid tulip
rapid tulip
#

like this works

let subscription = await stripe.subscriptions.create({
    customer: customer.id,
    default_payment_method : pm.id,
    payment_behavior:"default_incomplete",
    items: [
        {
            plan: "plan_DQYe83yUGgx1LE",
        },
    ],
    expand : ["latest_invoice"]
}); 

await stripe.invoices.update(subscription.latest_invoice.id, {statement_descriptor:"FOOBARINC"})
shell walrus
#

I think there is an invoice of £0 ?

rapid tulip
#

yes there is

shell walrus
#

ok I see

rapid tulip
#

but that doesn't charge the customer

#

there's no PaymentIntent or Charge object, and nothing is seen by the customer or their bank

shell walrus
#

yes. For now. But after the trial period yes.

rapid tulip
#

yep

shell walrus
#

So if I change the invoice in advance, it will be the new statement descriptor ?

#

or it will be a NEW invoice of £XX

#

and so, I have to update the stztement descriptor again?

#

I don't know if it use the same invoice

#

it update the invoice of £0 ?

rapid tulip
#

they're entirely different invoices.

#

there's a £0 invoice at the start

#

then next month, a new invoice, etc etc

shell walrus
#

mmmm so the update that you give me as an example will not work

rapid tulip
shell walrus
#

because it will update the statement descriptor on the invoice of £0 only

rapid tulip
#

I told you : But in general you could update the first invoice(in the case where it actually charges and you're not using trials)

shell walrus
#

and after, a new one will be created

rapid tulip
#

that's what my example is for, how to update the first invoice in the case where you don't use trials

#

because I already answered you what to do for trials.

shell walrus
#

ok

rapid tulip
#

I think everything is clear now?

shell walrus
#

Maybe I miss the answer for "if I have a trial"

#

can on ping me your answer plz

#

sorry

#

can you

rapid tulip
rapid tulip
#

and yes

#

you can listen to the webhook event when an invoice is created and update it