06.10.2016 Views

laravel-5

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Laravel Cashier<br />

• Introduction<br />

• Stripe Configuration<br />

• Braintree Configuration<br />

• Subscriptions A> - Creating Subscriptions A> - Checking Subscription Status A> - Changing<br />

Plans A> - Subscription Quantity A> - Subscription Taxes A> - Cancelling Subscriptions A> -<br />

Resuming Subscriptions<br />

• Subscription Trials A> - With Credit Card Up Front A> - Without Credit Card Up Front<br />

• Handling Stripe Webhooks A> - Failed Subscriptions A> - Other Webhooks<br />

• Handling Braintree Webhooks A> - Failed Subscriptions A> - Other Webhooks<br />

• Single Charges<br />

• Invoices A> - Generating Invoice PDFs<br />

Introduction<br />

Laravel Cashier provides an expressive, fluent interface to Stripe’s¹⁵⁷ and Braintree’s¹⁵⁸ subscription<br />

billing services. It handles almost all of the boilerplate subscription billing code you are dreading<br />

writing. In addition to basic subscription management, Cashier can handle coupons, swapping<br />

subscription, subscription “quantities”, cancellation grace periods, and even generate invoice PDFs.<br />

Stripe Configuration<br />

Composer<br />

First, add the Cashier package for Stripe to your composer.json file and run the composer update<br />

command:<br />

1 "<strong>laravel</strong>/cashier": "~6.0"<br />

¹⁵⁷https://stripe.com<br />

¹⁵⁸https://braintreepayments.com<br />

257

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!