#yingwg-customer-spend

1 messages · Page 1 of 1 (latest)

glossy crystalBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

  • yingwg, 2 days ago, 6 messages
limber ravine
#

It doeesn't look like there's a single endpoint to retrieve this information.

wooden pulsar
#

How does stripe UI get this information?

limber ravine
#

You would have to calculate this yourself by listing all charges or PaymentIntents for a single customer and totaling up the amounts for the succeeded charges.

wooden pulsar
#

which API is use for listing charges and payment intents?

limber ravine
#

There isn't always a 1:1 relationship between an action or single graphic in the Dashboard and what you can do with the API directly, unfortunately

wooden pulsar
#

its okay to call mulitple APIs, I just want to know which exact APIs I should call

limber ravine
wooden pulsar
#

Are those two APIs returns mutually exclusive results?

limber ravine
#

No, I mentioned both since I'm not sure how you'd prefer to calculate this.

#

A PaymentIntent can have multiple charges so no, they're not mutually exclusive

wooden pulsar
#

I just want to know the total money a customer have spent on our product..

#

maybe list payment intent API is the right one to user for this case?

limber ravine
#

Yes, that would work, as long as you add up the amounts on succeeded PaymentIntents

wooden pulsar
#

got it, thanks!

limber ravine
#

No, you'll need to do the filtering on your end by parsing through the data array

wooden pulsar
#

I saw you have another search payment intent API

limber ravine
#

Ah, yep! You could use the search endpoint instead

wooden pulsar
#

i see,

#

thx

glossy crystalBOT
#

yingwg-customer-spend

wooden pulsar
#

hi, a different question, I have "Create Payment" option only in test mode

#

do you know how to enable that in prod mode?

limber ravine
#

It's not common/typical to create payments directly from the Dashboard. Usually, in production, you'll use the PaymentElement or Checkout to securely collect payment details from your customers.

wooden pulsar
#

If I want to do auto charge, and a customer have mulitple payments without setting a default one, which payment method will be used then?

limber ravine
#

Can you share more about the specific scenario you're testing? By auto charge you mean a subscription?

wooden pulsar
#

e.g. create an invoice with "Autocharge customer"

limber ravine
#

When you go to pay the invoice, you will need to specify a payment method to charge

wooden pulsar
#

i see