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()):KitPaymentRecord (from retrieve(), confirm(), cancel(), sync()):