$kit->payments handles one-off charges (Stripe PaymentIntents), respecting the mode configured on StripeKit::init(). See Choosing a mode if you haven't already.| Method | Description |
|---|---|
create() | Start a new one-off payment. |
retrieve() | Fetch a payment by ID. |
confirm() | Confirm a PaymentIntent server-side. |
cancel() | Cancel a PaymentIntent that hasn't succeeded yet. |
payWithSavedMethod() | Charge a card the customer already saved, with no customer interaction. |
sync() | Re-pull a payment from Stripe and persist it via your storage adapter. |
create() and payWithSavedMethod() return a flow-oriented shape (PaymentResult, focused on hostedUrl / clientSecret), while retrieve(), confirm(), cancel() and sync() return a record-oriented shape (KitPaymentRecord, focused on the full normalized payment details). Each method's own page shows exactly which shape it returns.PaymentResult (from create() and payWithSavedMethod()):array{
id: string,
mode: 'api'|'elements',
status: string,
amount: int,
currency: string,
clientSecret: string|null,
hostedUrl: string|null,
requiresAction: bool,
}KitPaymentRecord (from retrieve(), confirm(), cancel(), sync()):array{
id: string,
userId: string|int|null,
customerId: string|null,
invoiceId: string|null,
amount: int,
currency: string,
status: string,
description: string|null,
paymentMethodType: string|null,
paymentMethodBrand: string|null,
paymentMethodLast4: string|null,
receiptEmail: string|null,
metadata: array<string, string>,
createdAtUtc: string|null,
}