Create payment intent

Required capability: payments

Path Params
string
required
Body Params
string
required

Amount to be captured in minor unit of the currency (ex: euro-cents for euros).

string
required

ISO 4217 three letter currency code. Must be supported by at least one configured payment rail.

string

Optional. Name of the attached payment method.

Example: "accounts/acct_RwDJsJd8z0exhtfX2570Q/payment-methods/pm_qlwkdqlwkdq".

payment_method_options
object
payment_method_types
array of objects

Optional. Restrict which payment rails the customer may pick on the hosted checkout
/ SDK payment element (for method-less intents that resolve later). Empty list means
no restriction. Ignored for intents confirmed inline with payment_method_data — the
rail is bound by the inline data — but if both are set, the inline rail must be in
this list.

payment_method_types
Allowed:
string

Name of the attached customer, if any. If provided, the payment method can't be paid with payment methods attached to other customers.

Example: "accounts/acct_RwDJsJd8z0exhtfX2570Q/customers/cus_b7OA3d8UcuWjG23Rnyh0H"

boolean

Confirm and initiate the payment immediately. A payment method is required when set to true, except when device is set.

string

Ignored when confirm is not set. Device to confirm the payment on. When set, payment_method and payment_method_data are ignored and a PROCESSING
intent is returned. The payment_method on the returned intent should be ignored until the intent succeeds — only then does it reflect the actual
card used on the device. It is recommended to keep polling GetPaymentIntent until it enters either REQUIRES_PAYMENT_METHOD or SUCCEEDED.
When a device operation fails, the intent is reverted back to REQUIRES_PAYMENT_METHOD with the error last_payment_error.device set to this device.

See ListDevices for retrieving available devices.

Example: "accounts/acct_RwDJsJd8z0exhtfX2570Q/devices/dvc_qwkjdqknjwd".

transfers
array of objects

Transfers to create once this intent succeeds. The total amount of the transfers can not exceed the amount of the payment intent. There may be one
transfer per recipient account. The receiving accounts must have transfers enabled.

transfers
string
enum

Indicates that the payment method used to pay this intent should also be attempted to be saved
(tokenized) for future reuse against the attached customer. When the rail supports tokenization
and the provider returns vault credentials, the payment_method on a successful intent becomes a
reusable, customer-attached payment method — equivalent to having run a SetupIntent for the
same card. Saving can fail independently of the charge (e.g. provider omits the vault id); in
that case the charge still succeeds and the failure is logged for ops follow-up.

  • OFF_SESSION: Save the payment method for future off-session (merchant-initiated) charges, e.g. recurring
    billing or scheduled subscriptions where the customer is not present. Requires customer to
    be set on the intent and a payment rail that supports tokenisation.
Allowed:
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