#vlad9032
1 messages · Page 1 of 1 (latest)
Guest customers are not exposed via the API at all
If you used Customer objects you can list all invoices for that specific cus_xxx: https://docs.stripe.com/api/invoices/list#list_invoices-customer
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok, I'm doing that now, but is not very clear, if I use the checkout.session.create and I use the customer_creation:"always" I have a bunch of customer with the same email, is there anyway to just create a customer once and then all the transactions to that email create under the same customer, is this something I have to do on my end, like call stripe and check if customer exists or is there a way to do it?
No, we won't deduplicate Customer objects on a unique email address. So passing customer_creation: 'always' will get you a new cus_xxx each time, regardless of if a customer with that email address exists already
If that's important to you, you need to track the cus_xxx against users in your system and then you can re-use them for subsequent payments by passing the customer parameter when creating a session: https://docs.stripe.com/payments/accept-a-payment?platform=web&ui=checkout#handling-existing-customers