$kit->checkout is the high-level module for building your own checkout flow: one-off payments or subscriptions, with optional custom form fields and coupon codes, in either the api or elements flow.api flow, or a PaymentIntent in the elements flow), plus some in-flight state (custom field values, coupon codes) that has nowhere to live in Stripe itself. That state is stored through your storage adapter's saveCheckoutSession() / getCheckoutSession(), or in local process memory if you haven't provided one. See Storage adapter for why that matters in production.| Method | Description |
|---|---|
create() | Start a new checkout session. |
get() | Fetch the current state of a checkout session. |
submitFields() | Submit and validate custom field values for a session. |
applyCoupon() | Apply or remove a coupon code, recalculating the amount. |
markComplete() | Mark a session as complete. |
CheckoutResult shapecreate() and get():array{
id: string,
mode: 'payment'|'subscription',
flow: 'api'|'elements',
clientSecret: string|null,
hostedUrl: string|null,
paymentIntentId: string|null,
subscriptionId: string|null,
amount: int,
currency: string,
requiresFields: bool,
fieldSchema: list<array<string, mixed>>,
expiresAtUtc: string,
}requiresFields is true whenever customFields were defined but no matching fieldValues were supplied yet, meaning your frontend should collect and submit them via submitFields() before the customer can pay.