stripe / stripe-php

PHP library for the Stripe API.
https://stripe.com
MIT License
3.75k stars 850 forks source link

Make Guest Customers show up in API search results, or add a separate end-point for them #1686

Closed sanderdlm closed 7 months ago

sanderdlm commented 7 months ago

Is your feature request related to a problem? Please describe.

I'm having trouble query'ing customer records made by Checkout. I don't have a whole customer management solution for my app, I simply send people to checkout and then follow up through my (guest) Customer records created in Stripe. This works fine, but for some new feature, I'd like to query these customer records as well.

Example code:

$customer = $this->stripe->customers->search([
            'query' => 'email~"sander"',
        ]);

This works for manually created "real" customers, but not for Guests. I'd rather not add an extra step in my flow to ask for an email-address first, create a customer through the API and then send my user to Checkout where they can enter the email address anyway. I like the friction-less approach of just displaying a "Buy" button and sending them to Checkout.

Describe the solution you'd like

Either a flag for the current end-point, or a new end-point to query which returns Guest Customers.

Describe alternatives you've considered

Like I said, I know I could ask for the email first and create real customers, but I'm really trying to make buying as smooth as possible and I'd rather not add extra steps.

Additional context

Thank you for considering!

remi-stripe commented 7 months ago

Hey @sanderdlm. At the moment Guest Customers are a Dashboard-only feature and don't have any representation in the API. We don't have plans in the near future to support those in the API as they are aimed at improving the Dashboard experience. I'll track your ask internally but wanted to respond to make it clear we don't plan to support this in the near future.