l4nos / laravel-cashier-stripe-connect

💲 Adds Stripe Connect functionality to Laravel's main billing package, Cashier. Simply works as a drop-in on top of Cashier, with no extra configuration.
https://updev-1.gitbook.io/cashier-for-connect/
MIT License
62 stars 27 forks source link

Payment Links for connected accounts #25

Closed adrian-schnell closed 8 months ago

adrian-schnell commented 9 months ago

I'd like to use the Stripe payment links whats the best practice to get this plugin work with this flow?

Is it necessary to create the subscription after a successful payment manually or does it work with webhooks?

l4nos commented 8 months ago

You can use payment links to generate subscriptions or one off payments for both direct and destination charges.

There isn't code baked into the plugin for this for now, as the focus was API led approach with direct frontend collection of payment method using StripeJS. However I can add this in if you require it.

If you don't want to wait, you can surface the stripe client and make requests directly to the stripe API using the Cashier::stripe() facade method.

Like so: (I think?)

Cashier::stripe()->paymentLinks()->create();

adrian-schnell commented 8 months ago

Cashier::stripe()->paymentLinks()->create();

thanks I'll give it a try @l4nos

l4nos commented 5 months ago

@adrian-schnell I've since added in direct support for this. It's going out on the current release 1.12.1.

Please give it a try and let me know if it works for you. You can create both direct and destination payment links as well as some utility functions for updating links and retrieving the ones that sit directly within a connected account. (Direct Links)