Stripe Integration in Larafast
/stubs/stripe/products.json
;/stubs/stripe/prices.json
prices.json
you will see the list of example prices. Change the data accordingly.
amount: 999
means the product price is $9.99
Price->billing_scheme - Can be per_unit
or tiered
Price->Product - This should be the product->id from products.json for which the price will be created.
To learn more about available columns and settings, check Stripe API Docs for Price Object
resources/js/Components/Plans.vue
update plan->slug with the ID of your price and that’s it! :rocket:
/stubs/stripe/single_payment_products.json
Do your changes and run:
stripe:create-products-and-prices
or stripe:create-single-payment-products
the products and prices will be created in the database via webhooks.
That means, that even if you create products and prices manually in the Stripe Dashboard, you will have them in the database and will be able to use them in the project.
To learn more about Products and Prices check app/Listeners/StripeEventListener.php
You can also sync products and prices from the Stripe Dashboard to the database by running:
Http/Middleware/Subscribed
middleware for subscription-protected routes.
app/Listeners/StripeEventListener.php