#cnguyen
1 messages ยท Page 1 of 1 (latest)
Hello ๐
I don't think that's something that the API currently supports
so how can I handle this ? I want to create a subscription with a trial period
and when the trial period is over, I know that you create a PI with an invoice.
And I want to customize the statement descriptor for the PI and the invoice
??
Still looking (server is running a bit busy)
ok ty
One alternative is to set the descriptor on the product itself
https://stripe.com/docs/api/products/create#create_product-statement_descriptor
Yup, the other option is to update the descriptor on the invoice itself
https://stripe.com/docs/api/invoices/update#update_invoice-statement_descriptor
However the limitation there would be the initial invoice (it finalizes immediately before it can be updated)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Can you be more explicit ? Not sure to understand the other option
๐ stepping in
So you can set Statement Descriptors on Invoices, so you would update each time on renewal before it is finalized via the above linked endpoint
However, this doesn't work for the first Invoice of a Subscription
As that is finalized immediately
So you are best off using Products here if you want unique SDs
ok but when do you want to do it ? on which event ?
invoice.created
For thisusecase, normally, when I have a trial period, when I create the subscription, you created an invoice of ยฃ0. Once is done, I can update the statement descriptor (on invoice.created) and I can update the invoice (stripe.invoices.update)
And for me, I have to do it only once because, the next time, they will use the statement descriptor of the last invoice (so it will be the updated one). No ?
You can only update the Statement Descriptor when an Invoice is in draft
And no, it won't carry over to future Invoices. Your integration would need to update each Invoice each time it is created
but when it's created, it's not too late to update the statement descriptor ? The payment (intent) is already done, no ? So it will be already the bad one one the bank descriptor