laravel / cashier-stripe

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.
https://laravel.com/docs/billing
MIT License
2.37k stars 667 forks source link

[15.x] Create stripe customer if not exists or update/sync #1661

Closed arafatkn closed 5 months ago

arafatkn commented 5 months ago

Assume, we have a route for redirecting to billing (stripe customer portal). Before that, the customer's stripe account should be created. We may use the createOrGetStripeCustomer method, but if we intend to update the stripe customer's details with his latest profile data or any metadata, then createOrSyncStripeCustomer and createOrUpdateStripeCustomer will be helpful.