The SetupIntent object | Stripe API Reference (2024)

Attributes

  • idstringretrievable with publishable key

    Unique identifier for the object.

  • automatic_payment_methodsnullable hash

    Settings for dynamic payment methods compatible with this Setup Intent

  • client_secretnullable stringretrievable with publishable key

    The client secret of this SetupIntent. Used for client-side retrieval using a publishable key.

    The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.

  • customernullable stringExpandable

    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.

  • descriptionnullable stringretrievable with publishable key

    An arbitrary string attached to the object. Often useful for displaying to users.

  • last_setup_errornullable hashretrievable with publishable key

    The error encountered in the previous SetupIntent confirmation.

  • metadatanullable hash

    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.

  • next_actionnullable hashretrievable with publishable key

    If present, this property tells you what actions you need to take in order for your customer to continue payment setup.

  • payment_methodnullable stringExpandableretrievable with publishable key

    ID of the payment method used with this SetupIntent.

  • statusenumretrievable with publishable key

    Status of this SetupIntent, one of requires_payment_method, requires_confirmation, requires_action, processing, canceled, or succeeded.

    Possible enum values

    canceled

    processing

    requires_action

    requires_confirmation

    requires_payment_method

    succeeded

  • usagestringretrievable with publishable key

    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.

More attributes

  • objectstringretrievable with publishable key

  • applicationnullable stringExpandableConnect only

  • attach_to_selfnullable boolean

  • cancellation_reasonnullable enumretrievable with publishable key

  • createdtimestampretrievable with publishable key

  • flow_directionsnullable array of enums

  • latest_attemptnullable stringExpandable

  • livemodebooleanretrievable with publishable key

  • mandatenullable stringExpandable

  • on_behalf_ofnullable stringExpandableConnect only

  • payment_method_configuration_detailsnullable hash

  • payment_method_optionsnullable hash

  • payment_method_typesarray of stringsretrievable with publishable key

  • single_use_mandatenullable stringExpandable

The SetupIntent object

{

"id": "seti_1Mm8s8LkdIwHu7ix0OXBfTRG",

"object": "setup_intent",

"application": null,

"cancellation_reason": null,

"client_secret": "seti_1Mm8s8LkdIwHu7ix0OXBfTRG_secret_NXDICkPqPeiBTAFqWmkbff09lRmSVXe",

"created": 1678942624,

"customer": null,

"description": null,

"flow_directions": null,

"last_setup_error": null,

"latest_attempt": null,

"livemode": false,

"mandate": null,

"metadata": {},

"next_action": null,

"on_behalf_of": null,

"payment_method": null,

"payment_method_options": {

"card": {

"mandate_options": null,

"network": null,

"request_three_d_secure": "automatic"

}

},

"payment_method_types": [

"card"

],

"single_use_mandate": null,

"status": "requires_payment_method",

"usage": "off_session"

}

Creates a SetupIntent object.

After you create the SetupIntent, attach a payment method and confirm it to collect any required permissions to charge the payment method later.

Parameters

  • automatic_payment_methodshash

    When you enable this parameter, this SetupIntent accepts payment methods that you enable in the Dashboard and that are compatible with its other parameters.

  • confirmboolean

    Set to true to attempt to confirm this SetupIntent immediately. This parameter defaults to false. If a card is the attached payment method, you can provide a return_url in case further authentication is necessary.

  • customerstring

    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.

  • descriptionstring

    An arbitrary string attached to the object. Often useful for displaying to users.

  • metadatahash

    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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.

  • payment_methodstring

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

  • usageenum

    Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to off_session.

    Possible enum values

    off_session

    Use off_session if your customer may or may not be in your checkout flow.

    on_session

    Use on_session if you intend to only reuse the payment method when the customer is in your checkout flow.

More parameters

  • attach_to_selfboolean

  • confirmation_tokenstringonly when confirm=true

  • flow_directionsarray of enums

  • mandate_datahashonly when confirm=true

  • on_behalf_ofstringConnect only

  • payment_method_configurationstring

  • payment_method_datahash

  • payment_method_optionshash

  • payment_method_typesarray of strings

  • return_urlstringonly when confirm=true

  • single_usehash

  • use_stripe_sdkboolean

Returns

Returns a SetupIntent object.

POST/v1/setup_intents

Stripe.api_key = 'sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc'

Stripe::SetupIntent.create({payment_method_types: ['card']})

Response

{

"id": "seti_1Mm8s8LkdIwHu7ix0OXBfTRG",

"object": "setup_intent",

"application": null,

"cancellation_reason": null,

"client_secret": "seti_1Mm8s8LkdIwHu7ix0OXBfTRG_secret_NXDICkPqPeiBTAFqWmkbff09lRmSVXe",

"created": 1678942624,

"customer": null,

"description": null,

"flow_directions": null,

"last_setup_error": null,

"latest_attempt": null,

"livemode": false,

"mandate": null,

"metadata": {},

"next_action": null,

"on_behalf_of": null,

"payment_method": null,

"payment_method_options": {

"card": {

"mandate_options": null,

"network": null,

"request_three_d_secure": "automatic"

}

},

"payment_method_types": [

"card"

],

"single_use_mandate": null,

"status": "requires_payment_method",

"usage": "off_session"

}

Updates a SetupIntent object.

Parameters

  • customerstring

    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.

  • descriptionstring

    An arbitrary string attached to the object. Often useful for displaying to users.

  • metadatahash

    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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.

  • payment_methodstring

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

More parameters

  • attach_to_selfboolean

  • flow_directionsarray of enums

  • payment_method_configurationstring

  • payment_method_datahash

  • payment_method_optionshash

  • payment_method_typesarray of strings

Returns

Returns a SetupIntent object.

POST/v1/setup_intents/:id

Stripe.api_key = 'sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc'

Stripe::SetupIntent.update(

'seti_1Mm8s8LkdIwHu7ix0OXBfTRG',

{metadata: {order_id: '6735'}},

)

Response

{

"id": "seti_1Mm8s8LkdIwHu7ix0OXBfTRG",

"object": "setup_intent",

"application": null,

"cancellation_reason": null,

"client_secret": "seti_1Mm8s8LkdIwHu7ix0OXBfTRG_secret_NXDICkPqPeiBTAFqWmkbff09lRmSVXe",

"created": 1678942624,

"customer": null,

"description": null,

"flow_directions": null,

"last_setup_error": null,

"latest_attempt": null,

"livemode": false,

"mandate": null,

"metadata": {

"order_id": "6735"

},

"next_action": null,

"on_behalf_of": null,

"payment_method": null,

"payment_method_options": {

"card": {

"mandate_options": null,

"network": null,

"request_three_d_secure": "automatic"

}

},

"payment_method_types": [

"card"

],

"single_use_mandate": null,

"status": "requires_payment_method",

"usage": "off_session"

}

Retrieves the details of a SetupIntent that has previously been created.

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details.

Parameters

  • client_secretstringRequired if using publishable key

    The client secret of the SetupIntent. We require this string if you use a publishable key to retrieve the SetupIntent.

Returns

Returns a SetupIntent if a valid identifier was provided.

GET/v1/setup_intents/:id

Stripe.api_key = 'sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc'

Stripe::SetupIntent.retrieve('seti_1Mm8s8LkdIwHu7ix0OXBfTRG')

Response

{

"id": "seti_1Mm8s8LkdIwHu7ix0OXBfTRG",

"object": "setup_intent",

"application": null,

"cancellation_reason": null,

"client_secret": "seti_1Mm8s8LkdIwHu7ix0OXBfTRG_secret_NXDICkPqPeiBTAFqWmkbff09lRmSVXe",

"created": 1678942624,

"customer": null,

"description": null,

"flow_directions": null,

"last_setup_error": null,

"latest_attempt": null,

"livemode": false,

"mandate": null,

"metadata": {},

"next_action": null,

"on_behalf_of": null,

"payment_method": null,

"payment_method_options": {

"card": {

"mandate_options": null,

"network": null,

"request_three_d_secure": "automatic"

}

},

"payment_method_types": [

"card"

],

"single_use_mandate": null,

"status": "requires_payment_method",

"usage": "off_session"

}

Returns a list of SetupIntents.

Parameters

  • customerstring

    Only return SetupIntents for the customer specified by this customer ID.

  • payment_methodstring

    Only return SetupIntents that associate with the specified payment method.

More parameters

  • attach_to_selfboolean

  • createdhash

  • ending_beforestring

  • limitinteger

  • starting_afterstring

Returns

A hash with a data property that contains an array of up to limit SetupIntents, starting after SetupIntent starting_after. Each entry in the array is a separate SetupIntent object. If no more SetupIntents are available, the resulting array will be empty.

GET/v1/setup_intents

Stripe.api_key = 'sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc'

Stripe::SetupIntent.list({limit: 3})

Response

{

"object": "list",

"url": "/v1/setup_intents",

"has_more": false,

"data": [

{

"id": "seti_1Mm8s8LkdIwHu7ix0OXBfTRG",

"object": "setup_intent",

"application": null,

"cancellation_reason": null,

"client_secret": "seti_1Mm8s8LkdIwHu7ix0OXBfTRG_secret_NXDICkPqPeiBTAFqWmkbff09lRmSVXe",

"created": 1678942624,

"customer": null,

"description": null,

"flow_directions": null,

"last_setup_error": null,

"latest_attempt": null,

"livemode": false,

"mandate": null,

"metadata": {},

"next_action": null,

"on_behalf_of": null,

"payment_method": null,

"payment_method_options": {

"card": {

"mandate_options": null,

"network": null,

"request_three_d_secure": "automatic"

}

},

"payment_method_types": [

"card"

],

"single_use_mandate": null,

"status": "requires_payment_method",

"usage": "off_session"

}

{...}

{...}

],

}

The SetupIntent object | Stripe API Reference (2024)
Top Articles
14 Amazing Carbquik Recipes • The Wicked Noodle
150+ Weight Watcher's Recipes with SmartPoints
Supermotocross Points Standings
Blackstone Launchpad Ucf
Craigslist Centre Alabama
Pga Scores Cbs
Great Buildings Forge Of Empires
Nosetf
Munsif Epaper Urdu Daily Online Today
Jocko Joint Warfare Review
Jak zgłosić awarię i brak energii elektrycznej w Twoim mieszkaniu lub domu? - ENERGA-OPERATOR SA
Busted Newspaper Longview Texas
Optum Primary Care - Winter Park Aloma
Island Cremations And Funeral Home
Indicafans
Thompson Center Thunderhawk Parts
John W Creasy Died December 16 2003
C.J. Stroud und Bryce Young: Zwei völlig unterschiedliche Geschichten
Sarah Dreyer Obituary
Oriellys Bad Axe
Equity Livestock Altoona Market Report
National Weather Denver Co
Estragon South End
Cuộc thi “Chung tay vì an toàn giao thông” năm 2024
Mileage To Walmart
Bx11
Naydenov Gymnastics Reviews
10-Day Weather Forecast for New Jersey - The Weather Channel | weather.com
Beetrose 'Planten un Blomen' - Rosa 'Planten un Blomen' ADR-Rose
Vegamovies Marathi
Sdn Upstate 2023
Marisa Jacques Bio
Lenscrafters Westchester Mall
Walgreens Pharmacy On Jennings Station Road
Twitter Jeff Grubb
How Old Am I 1981
OC IDEAS TO DRAW [80+ IDEAS!] ✍🏼 | Spin the Wheel - Random Picker
2014 Chevy Malibu Belt Diagram
Work with us | Pirelli
Claw Machine Random Name Picker
Ketchum Who's Gotta Catch Em All Crossword Clue
Linktree Teentinyangel
Acadis Portal Indiana Sign In
Odawa Hypixel
Arti kata petang-petang - Kamus Besar Bahasa Indonesia (KBBI) Online
5417873087
Lewisburg Tn Jail Mugshots
Clea-Lacy Juhn: Schwerer Schicksalsschlag kurz nach Zwillingsgeburt
How To Use Price Chopper Points At Quiktrip
Mexican cartel leader 'El Mayo' Zambada pleads not guilty to US charges
Discord Id Grabber
Vci Classified Paducah
Latest Posts
Article information

Author: Tish Haag

Last Updated:

Views: 6338

Rating: 4.7 / 5 (67 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Tish Haag

Birthday: 1999-11-18

Address: 30256 Tara Expressway, Kutchburgh, VT 92892-0078

Phone: +4215847628708

Job: Internal Consulting Engineer

Hobby: Roller skating, Roller skating, Kayaking, Flying, Graffiti, Ghost hunting, scrapbook

Introduction: My name is Tish Haag, I am a excited, delightful, curious, beautiful, agreeable, enchanting, fancy person who loves writing and wants to share my knowledge and understanding with you.