Confirm a SetupIntent
POST
/v1/setup_intents/{id}/confirm请求参数
ID of the Customer this SetupIntent belongs to, if one exists. If present, the SetupIntent’s payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.
An arbitrary string attached to the object. Often useful for displaying to users.
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
ID of the payment method used with this SetupIntent.
Payment-method-specific configuration for this SetupIntent.
When included, this hash creates a PaymentMethod that is set as the payment_method value in the SetupIntent.
Indicates how the payment method is intended to be used in the future. Use on_session if you intend to only reuse the payment method when the customer is in your checkout flow. Use off_session if your customer may or may not be in your checkout flow. If not provided, this value defaults to off_session.
The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method’s app or site. If you’d prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with confirm=true.
{
"customer": "string",
"description": "string",
"metadata": {},
"payment_method": "string",
"payment_method_options": {
"card": {
"request_three_d_secure": "string"
}
},
"payment_method_data": {},
"usage": "on_session",
"return_url": "string"
}
示例代码
Responses
{}