#.stevenp

1 messages · Page 1 of 1 (latest)

late zenithBOT
dark light
#

Are you referring to the descriptor on the customer's bank statement?

hard maple
#

Yes

#

we need to set up a custom billing descriptor for each charge

dark light
#

There is no straightforward way to do it, but it can be done manually on each invoice once the invoice is created. The steps will be:

  1. Listen to invoice.created event
  2. Update statement_descriptor of the invoice before it's finalised and charged to customer: https://stripe.com/docs/api/invoices/update#update_invoice-statement_descriptor
hard maple
#

ok this is interesting. for auto-recurring/subscription payments, would this work?

dark light
#

Yup! Your system should listen to invoice.created event and change the statement descriptor for recurring payments using the invoice

hard maple
#

whats the life cycle for invoice.created to the payment actually getting billed on the customers card? i thought for recurring/MITs those two events fire right after another

dark light
#

These are the Webhook events of the subscription: https://stripe.com/docs/billing/subscriptions/webhooks

From https://stripe.com/docs/billing/subscriptions/webhooks#successful-invoice-finalization:
Stripe waits an hour after receiving a successful response to the invoice.created event before attempting payment. If we don’t receive a successful response within 72 hours, we attempt to finalize and send the invoice.

Customer will only be charged after the invoice is finalized, not at invoice creation.

hard maple
#

Ok great - and so if a Stripe account has several applications all listening to the invoice.created event, and one of them returns a 400 response code, does that mean the customer is not billed until 72 hrs later?

dark light
#

Yup! The invoice won't be finalised until 72 hours later

hard maple
#

Ok, couldn't this cause major issues for a Stripe account if they install an app that 404s on a certain webhook?

Do you mean if any of the invoice.createdwebhooks that are listening 400 it waits to bill, or that is the "main" stripe accounts webhook 400s (e.g. not a webhook listener of a connected app)

dark light
#

Stripe will check all the response from each webhook endpoint. If one of them isn't 200, the invoice will only be finalised after 72 hours. If all of them return 200, then the invoice will be finalised after 1 hour.