# Laravel Payments Kit for Laravel

Laravel Payments Kit is a private Composer package for Laravel that provides a ready-to-integrate Stripe layer: one-time payments, subscriptions, webhooks, Laravel events, refunds, disputes, early fraud warnings, and production checklists.

Its goal is to avoid implementing Stripe from scratch. The application installs the package, configures credentials, registers listeners, and calls Laravel Payments Kit public methods.

## Recommended Flow

1. Install the package with Composer from the private repository.
2. Run the installer and migrations.
3. Configure Stripe keys and the webhook secret.
4. Create products, prices, customers, and checkout sessions through the public API.
5. Confirm payments through webhooks.
6. Connect business logic with Laravel events.
7. Test payments, refunds, disputes, and subscriptions before production.

## Important Rule

`success_url` does not confirm payment. It only means the user returned from Stripe Checkout. Real payment confirmation must come from the signed webhook.

## Index

- [Installation](./installation.md)
- [Configuration](./configuration.md)
- [Checkout](./checkout.md)
- [Webhooks](./webhooks.md)
- [Laravel Events](./laravel-events.md)
- [Subscriptions](./subscriptions.md)
- [Refunds and Disputes](./refunds-disputes.md)
- [Testing](./testing.md)
- [Production](./production.md)

## Public API Summary

```php
ensureProduct($product)
ensurePrice($product, $priceData)
ensureCustomer($user)
createOrder($user, $data)
createCheckoutForOrder($order, $data)
createCheckoutForPlan($user, $plan, $data)
createSubscriptionCheckout($user, $plan, $data)
handleWebhook($payload, $signature)
refundPayment($payment, $amount = null)
syncDispute($disputeId)
```
