API Reference
This page references the public building blocks of the bundle that you can consider stable to integrate on the application side.
Main services
CashierBundle\Service\Cashier
Main service and formatting utilities. See Twig.
CashierBundle\Service\CustomerService
Creation, update and synchronization of Stripe customers. See Customers.
CashierBundle\Service\PaymentService
One-shot payments, refunds and payment intents. See Payments.
CashierBundle\Service\PaymentIntentService
Low-level service to create and manage PaymentIntents:
create(array $options)— creates a PaymentIntentcapture(string $paymentIntentId, ?int $amount)— capturecancel(string $paymentIntentId)— cancelconfirm(string $paymentIntentId, array $options)— confirm
See Payments.
CashierBundle\Service\PaymentMethodService
Payment method management. See Payment Methods.
CashierBundle\Service\SetupIntentService
Service to create SetupIntents (PM save without payment):
create(array $options = [])— creates a SetupIntent (default:payment_method_types: ['card'])clientSecret()— returns the secret for the frontend
See Payment Methods - Setup Intents.
CashierBundle\Service\SubscriptionService
Creation and lifecycle management of subscriptions. See Subscriptions.
CashierBundle\Service\CheckoutService
Creation of Stripe Checkout sessions and Billing Portal. See Checkout.
CashierBundle\Service\InvoiceService
Reading Stripe invoices and billing operations. See Invoices.
CashierBundle\Service\InvoiceArchiveService
Local PDF archiving and GeneratedInvoice persistence. See Invoices - Archiving.
CashierBundle\Service\TaxService
Tax management. See Taxes.
Extensible contracts
CashierBundle\Contract\InvoiceRendererInterfaceCashierBundle\Contract\InvoiceStorageInterfaceCashierBundle\Contract\InvoiceLocaleResolverInterfaceCashierBundle\Contract\InvoiceTranslationProviderInterfaceCashierBundle\Contract\WebhookHandlerInterface
Bundle Doctrine entities
CashierBundle\Entity\StripeCustomerCashierBundle\Entity\SubscriptionCashierBundle\Entity\SubscriptionItemCashierBundle\Entity\GeneratedInvoiceCashierBundle\Entity\CustomerBalanceTransaction
Models (Value Objects)
CashierBundle\Model\Invoice— Stripe invoiceCashierBundle\Model\InvoiceLineItem— invoice lineCashierBundle\Model\InvoicePayment— invoice paymentCashierBundle\Model\Tax— taxCashierBundle\Model\TaxRate— tax rateCashierBundle\Model\PaymentMethod— payment methodCashierBundle\Model\Coupon— Stripe couponCashierBundle\Model\PromotionCode— promotion codeCashierBundle\Model\Checkout— Checkout sessionCashierBundle\Model\StoredInvoice— archived invoice (see Invoices)
Public events
WebhookReceivedEventWebhookHandledEventSubscriptionCreatedEventSubscriptionUpdatedEventSubscriptionDeletedEventPaymentSucceededEventPaymentFailedEvent
See Events.
Messenger messages
For asynchronous processing (requires symfony/messenger):
CashierBundle\Message\CancelSubscriptionMessageCashierBundle\Message\ProcessInvoiceMessageCashierBundle\Message\RetryPaymentMessageCashierBundle\Message\SyncCustomerDetailsMessageCashierBundle\Message\UpdateSubscriptionQuantityMessage
See Events - Messenger.
Stability policy
The documented public services, interfaces, entities and events constitute the stable API of the bundle.
Classes in the following directories are internal and may change without notice:
src/Webhook/Handler/src/Infrastructure/src/DependencyInjection/