$kit->paymentMethods->createSetupIntent()SetupIntent, the entry point for saving a customer's card for later use, without charging them anything right now. Confirmed on the frontend with Stripe Elements.| Field | Type | Required | Description |
|---|---|---|---|
customerId | string | Yes | The customer this saved payment method will belong to. |
usage | string | No, defaults to 'off_session' | Either 'off_session' (the customer is not present for future charges) or 'on_session'. |
metadata | array<string,string> | No | Arbitrary metadata stored on the SetupIntent. |
| Exception | When |
|---|---|
StripeOperationError | The customer ID does not exist. |
clientSecret to your frontend and confirm it with the bundled Stripe Elements helper:list() or sync() to pull the newly saved payment method into your own database. StripeKit's webhook handling also does this automatically for the setup_intent.succeeded event, see Webhooks.