# Shop Stripe: overview

<!-- prettier-ignore-start -->

Store operators can rehearse a card payment through Stripe Checkout while Capell Shop keeps the order and stock. The buyer pays on Stripe’s hosted test page. Their return to the store lets them check their order. Capell confirms the payment after it receives a signed notice and checks that Stripe received the amount due.

The adapter uses one connected Stripe sandbox account and an explicit list of Stores. It needs Capell Shop and a host application that authorises the buyer before creating Checkout. It supports one-time card payments in selected currencies. The Store’s accepted quote sets the total. Stripe Checkout opens only while the order has enough stock hold time to pay.

This package is available for controlled sandbox testing. The host application supplies the buyer’s payment entry point and the screens they return to.

- **Price and availability:** Check current availability and price on the [Capell Marketplace listing](https://capell.app/marketplace/extensions/shop-stripe).
- **Licence:** Check the licence terms on the [Capell Marketplace listing](https://capell.app/marketplace/extensions/shop-stripe).
- **Requires:** `PHP ^8.4`, `capell-app/core ^1.0.79`, `capell-app/shop ^1.0.10`.
- **Install:** `composer require capell-app/shop-stripe:@beta`.

## Quick Start

1. Install the package: `composer require capell-app/shop-stripe:@beta`.
2. Run `php artisan route:list` and verify the package routes are registered.

## For Developers

One Store-scoped Shop attempt supplies the accepted amount and currency. The adapter persists the Stripe create request and reuses its idempotency key. Core's inbound webhook job applies the same payment facts after verifying the connected account and PaymentIntent.

## Configure

- **Configuration files:** `config/capell-shop-stripe.php`.
- **Commands:** `php artisan shop-stripe:live`.

## Limits And Pitfalls

- Install the required Capell packages at the versions in `composer.json`: `capell-app/core ^1.0.79`, `capell-app/shop ^1.0.10`.
- Run migrations before opening package resources or public routes.
- Review middleware, throttling, signatures, and public-output safety in `routes/web.php` before exposing routes.

## Screens And Workflow

- The receipt page offering Stripe card payment for a pending order (frontend).

## Install Impact

- Required packages: `capell-app/core`, `capell-app/shop`.
- Admin navigation: no admin page or resource contribution is declared.
- Admin/editor extensions: `configurator: ShopStripeLiveRefundContribution`, `configurator: ShopStripePaymentContribution`, `configurator: ShopStripeRefundContribution`.
- Permissions: no package permission declarations or Shield gates detected; host access rules still apply.
- Public routes: loads `routes/web.php`; registers `ShopStripeRoutesContribution`.
- Database changes: package migrations are declared.
- Config: `config/capell-shop-stripe.php`.
- Settings: no package settings declared.
- Queues or schedules: none declared.
- Cache tags: none declared.
- Commands: `shop-stripe:live`.

## Troubleshooting

| Symptom | Likely cause | Check | Fix |
| --- | --- | --- | --- |
| Package surface is missing after install | Provider or manifest is not loaded | Confirm `capell.json`, package `composer.json`, and provider registration | Reinstall the package, refresh Composer autoload, and clear host caches |
| Admin screen or command fails on missing table | Package migrations have not run | Check the tables listed in `Data Model` | Run host migrations and rerun the focused package test |
| Route returns unexpected output | Route cache, middleware, or signed URL setup does not match the package route file | Check the route files listed in `Technical Shape` | Clear route cache and verify middleware before exposing public routes |

## Next Steps

- [Package docs index](README.md)
- [Worked extension examples](extension-contracts.md)
- Configuration files: [`config/capell-shop-stripe.php`](../config/capell-shop-stripe.php).
- [Developer troubleshooting](../README.md#troubleshooting)
- [Developer reference](reference.md)
- [Capell content language plan](../../../docs/CONTENT_LANGUAGE_PLAN.md)
- [Capell documentation design system](../../../docs/DESIGN_SYSTEM.md)
- [Capell and package ERD notes](../../../docs/erd/capell-and-package-erds.md)
- Related packages: [Shop](../../shop/README.md).

<!-- prettier-ignore-end -->