#yingwg-customer-spend
1 messages · Page 1 of 1 (latest)
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
It doeesn't look like there's a single endpoint to retrieve this information.
How does stripe UI get this information?
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.
which API is use for listing charges and payment intents?
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
its okay to call mulitple APIs, I just want to know which exact APIs I should call
Charges: https://stripe.com/docs/api/charges/list (pass a value for the customer param)
PaymentIntents: https://stripe.com/docs/api/payment_intents/list (pass a value for the customer param)
Are those two APIs returns mutually exclusive results?
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
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?
Yes, that would work, as long as you add up the amounts on succeeded PaymentIntents
got it, thanks!
https://stripe.com/docs/api/payment_intents/list, qq, does list all payment intents API support filtering by payment status?
No, you'll need to do the filtering on your end by parsing through the data array
Ah, yep! You could use the search endpoint instead
yingwg-customer-spend
hi, a different question, I have "Create Payment" option only in test mode
do you know how to enable that in prod mode?
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.
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?
Can you share more about the specific scenario you're testing? By auto charge you mean a subscription?
e.g. create an invoice with "Autocharge customer"
When you go to pay the invoice, you will need to specify a payment method to charge
i see