Confirm a SetupIntent

POST /v1/setup_intents/:id/confirm

Confirm that your customer intends to set up the current or provided payment method. For example, you would confirm a SetupIntent when a customer hits the “Save” button on a payment method management page on your website.

If the selected payment method does not require any additional steps from the customer, the SetupIntent will transition to the succeeded status.

Otherwise, it will transition to the requires_action status and suggest additional actions via next_action. If setup fails, the SetupIntent will transition to the requires_payment_method status or the canceled status if the confirmation limit is reached.

Parameters

  • allowed_payment_method_typesarray of enums

    The list of payment method types to allow for this SetupIntent. Stripe will only use methods in this list when determining the payment methods to offer. A list of valid payment method types can be found here.

    Possible enum values
    acss_debit

    Pre-authorized debit payments are used to debit Canadian bank accounts through the Automated Clearing Settlement System (ACSS).

    affirm

    Affirm is a buy now, pay later payment method in the US.

    afterpay_clearpay

    Afterpay / Clearpay is a buy now, pay later payment method used in Australia, Canada, France, New Zealand, Spain, the UK, and the US.

    alipay

    Alipay is a digital wallet payment method used in China.

    alma

    Alma is a Buy Now, Pay Later payment method that lets customers pay in 2, 3, or 4 installments.

    amazon_pay

    Amazon Pay is a Wallet payment method that lets hundreds of millions of Amazon customers pay their way, every day.

    au_becs_debit

    BECS Direct Debit is used to debit Australian bank accounts through the Bulk Electronic Clearing System (BECS).

    bacs_debit

    Bacs Direct Debit is used to debit UK bank accounts.

    bancontact

    Bancontact is a bank redirect payment method used in Belgium.

    billie

    Billie is a payment method.

    Show 89 more
  • payment_methodstring

    ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.

More parameters

  • confirmation_tokenstring

  • mandate_dataobject

  • payment_method_dataobject

  • payment_method_optionsobjectsecret key only

  • return_urlstring

  • use_stripe_sdkboolean

Returns

Returns the resulting SetupIntent after all possible transitions are applied.

curl https://api.stripe.com/v1/setup_intents//confirm \
-u "sk_test_BQokikJOvBiI2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \
-d payment_method=pm_card_visa
Response
{
"object": "setup_intent",
"application": null,
"cancellation_reason": null,
"client_secret": "seti_1Mm2cBLkdIwHu7ixaiKW3ElR_secret_NX6phB7HbSmlkpqzKZ3Bxr7uXFRf9Jg",
"created": 1678918571,
"customer": null,
"description": null,
"flow_directions": null,
"last_setup_error": null,
"latest_attempt": "",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"on_behalf_of": null,
"payment_method": "",
"payment_method_options": {
"card": {
"mandate_options": null,
"network": null,
"request_three_d_secure": "automatic"
}
},
"payment_method_types": [
"card"
],
"single_use_mandate": null,
"status": "succeeded",
"usage": "off_session"
}

Verify microdeposits on a SetupIntent

POST /v1/setup_intents/:id/verify_microdeposits

Verifies microdeposits on a SetupIntent object.

Parameters

  • amountsarray of integers

    Two positive integers, in cents, equal to the values of the microdeposits sent to the bank account.

  • descriptor_codestring

    A six-character code starting with SM present in the microdeposit sent to the bank account.

Returns

Returns a SetupIntent object.

curl https://api.stripe.com/v1/setup_intents//verify_microdeposits \
-u "sk_test_BQokikJOvBiI2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \
-d "amounts[]=32" \
-d "amounts[]=45"
Response
{
"object": "setup_intent",
"application": null,
"cancellation_reason": null,
"client_secret": "seti_1Mm5yZLkdIwHu7ixm0sPzrx4_secret_NXAJ5iPM38ITW1pI7o8VZZhoZyDrrWR",
"created": 1678931491,
"customer": null,
"description": null,
"flow_directions": null,
"last_setup_error": null,
"latest_attempt": "",
"livemode": false,
"metadata": {},
"next_action": null,
"on_behalf_of": null,
"payment_method": "",
"payment_method_options": {
"acss_debit": {
"currency": "cad",
"mandate_options": {
"interval_description": "First of every month",
"payment_schedule": "interval",
"transaction_type": "personal"
},
"verification_method": "automatic"
}
},
"payment_method_types": [
"acss_debit"
],
"single_use_mandate": null,
"status": "succeeded",
"usage": "off_session"
}