Create setup intent

Required capability: payments

Path Params
string
required
Body Params
string
required

Name of the customer to attach the created payment method to, the payment method can't be used later with any other customer.

Example: "accounts/acct_RwDJsJd8z0exhtfX2570Q/customers/cus_b7OA3d8UcuWjG23Rnyh0H"

string

Where to redirect the customer after they complete (or cancel) the hosted setup form.
Required when the eventual rail uses a hosted-form flow (e.g. Bacs DD); optional
for inline rails (card).

payment_method_types
array of objects

Restrict which payment rails the customer may pick on the hosted setup / SDK
payment element. Empty list means no restriction — every ACTIVE setup-capable rail
matching currency (if set) is offered. Rejects at create time when no rail
matches. Rejects at confirm time if the customer somehow submits a rail outside
the list (belt-and-suspenders).

payment_method_types
Allowed:
string

Optional. ISO 4217 three letter currency code. When set, only rails supporting
this currency are offered to the customer. Setup intents don't charge, so the
currency is informational — but future off-session charges against the saved
method are made in this currency, so the rail must support it.

Example: "GBP"

payment_method_options
object
metadata
object

Client supplied metadata. At most 50 keys with a max length of 40 characters are permitted. Values may be strings up to 500 characters each.

Response

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json