#Gánh cả trường trên vai

1 messages · Page 1 of 1 (latest)

teal birchBOT
gentle crater
#

Hi there, a statement descriptor is usually associated with a payment (via PaymentIntent or Charges API).

Are you talking about the 1 dollars charge that appears in customer's bank statement as a result of card authorization?

fair path
#

Hi Jack, i'm talking about the statement descriptor that will show up on our customers' bank or credit card statements.
Our logic flow is create a setup intent object when customer visit our payment page. Then user input card information and click Purchase. When click Purchase, confirmSetupIntent method will be called and a payment method id will be returned. Then we create stripe customer and subscription in our backend server.

#

My expectation is i can have dynamic statement descriptor in our stripe subscription

gentle crater
#

OK. I think I understand your requirement. It's more about the invoice payments rather than SetupIntent

#

You should listen to invoice.created event, and in the event handling, retrieve the PaymentIntent that associated with the invoice and update the statement_descriptor for non-card payments (https://stripe.com/docs/api/payment_intents/update#update_payment_intent-statement_descriptor) or statement_descriptor_suffix for card payments (https://stripe.com/docs/api/payment_intents/update#update_payment_intent-statement_descriptor_suffix)

fair path
#

Hi jack, I saw that statement_descriptor and statement_descriptor_suffix only available with payment intent right ? because i am using setup intent instead.

gentle crater
#

Yes you are right, as I explained earlier, statement descriptors are associated with payments.

fair path
#

ya so because I'm using setup intent so I can't implement your approach?

gentle crater
#

No, you can't set a statement descriptor in a setupIntent because a setupIntent doesn't create payments.

#

I believe my earlier suggestion can solve your problem, take a look and let me know if you have any questions.

fair path
#

ok Jack, last question, as i read in stripe api documentation, payment_intent property in Invoice object will be generated when the invoice is finalized event though i'm using setup intent flow, right? So i just need to listen invoice.created event and update the statement_descriptor_suffix in that PaymentIntent , right?

gentle crater
#

Yes you are right, the invoice is created and finalized by Stripe.

fair path
#

thanks a lot, Jack 😃