> ## Documentation Index
> Fetch the complete documentation index at: https://docs.whop.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve setup intent

> Retrieves the details of an existing setup intent.

Required permissions:
 - `payment:setup_intent:read`
 - `member:basic:read`
 - `member:email:read`



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/whopsdk/openapi.documented.yml get /setup_intents/{id}
openapi: 3.1.0
info:
  title: Whop API
  description: >-
    The Whop REST API. Please see
    https://docs.whop.com/developer/api/getting-started for more details.
  termsOfService: https://whop.com/tos-developer-api/
  version: 1.0.0
servers:
  - url: https://api.whop.com/api/v1
    description: Production Whop API
security: []
tags:
  - name: Products
    description: Products
  - name: Plans
    description: Plans
  - name: Payments
    description: Payments
  - name: Refunds
    description: Refunds
  - name: Disputes
    description: Disputes
  - name: Dispute alerts
    description: Dispute alerts
  - name: Resolution center cases
    description: Resolution center cases
  - name: Checkout configurations
    description: Checkout configurations
  - name: Setup intents
    description: Setup intents
  - name: Payment methods
    description: Payment methods
  - name: Invoices
    description: Invoices
  - name: Promo codes
    description: Promo codes
  - name: Card transactions
    description: Card transactions
  - name: Ledger accounts
    description: Ledger accounts
  - name: Transfers
    description: Transfers
  - name: Withdrawals
    description: Withdrawals
  - name: Payout methods
    description: Payout methods
  - name: Verifications
    description: Verifications
  - name: Payout accounts
    description: Payout accounts
  - name: Topups
    description: Topups
  - name: Users
    description: Users
  - name: Companies
    description: Companies
  - name: Authorized users
    description: Authorized users
  - name: Fee markups
    description: Fee markups
  - name: Members
    description: Members
  - name: Memberships
    description: Memberships
  - name: Leads
    description: Leads
  - name: Entries
    description: Entries
  - name: Shipments
    description: Shipments
  - name: Reviews
    description: Reviews
  - name: Company token transactions
    description: Company token transactions
  - name: Affiliates
    description: Affiliates
  - name: Experiences
    description: Experiences
  - name: Forums
    description: Forums
  - name: Forum posts
    description: Forum posts
  - name: Chat channels
    description: Chat channels
  - name: Support channels
    description: Support channels
  - name: Messages
    description: Messages
  - name: Reactions
    description: Reactions
  - name: Dm members
    description: Dm members
  - name: Dm channels
    description: Dm channels
  - name: Notifications
    description: Notifications
  - name: Courses
    description: Courses
  - name: Course chapters
    description: Course chapters
  - name: Course lessons
    description: Course lessons
  - name: Course students
    description: Course students
  - name: Course lesson interactions
    description: Course lesson interactions
  - name: Apps
    description: Apps
  - name: Webhooks
    description: Webhooks
  - name: App builds
    description: App builds
  - name: Access tokens
    description: Access tokens
  - name: Account links
    description: Account links
  - name: Files
    description: Files
  - name: Ai chats
    description: Ai chats
  - name: Bounties
    description: Bounties
  - name: Stats
    description: Stats
  - name: Ad campaigns
    description: Ad campaigns
  - name: Ad groups
    description: Ad groups
  - name: Ads
    description: Ads
  - name: Conversions
    description: Conversions
paths:
  /setup_intents/{id}:
    get:
      tags:
        - Setup intents
      summary: Retrieve setup intent
      description: |-
        Retrieves the details of an existing setup intent.

        Required permissions:
         - `payment:setup_intent:read`
         - `member:basic:read`
         - `member:email:read`
      operationId: retrieveSetupIntent
      parameters:
        - name: id
          in: path
          required: true
          description: The unique identifier of the setup intent.
          schema:
            type: string
            example: sint_xxxxxxxxxxxxx
      responses:
        '200':
          description: A successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SetupIntent'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      message:
                        type: string
                      code:
                        type:
                          - string
                          - 'null'
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                      param:
                        type:
                          - string
                          - 'null'
                        description: The parameter that caused the error, if applicable
                    required:
                      - type
                      - message
                required:
                  - error
              example:
                error:
                  type: invalid_request_error
                  code: parameter_missing
                  message: 'Missing required parameter: amount.'
                  param: amount
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      message:
                        type: string
                      code:
                        type:
                          - string
                          - 'null'
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                      param:
                        type:
                          - string
                          - 'null'
                        description: The parameter that caused the error, if applicable
                    required:
                      - type
                      - message
                required:
                  - error
              example:
                error:
                  type: unauthorized
                  message: Invalid or missing API key
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      message:
                        type: string
                      code:
                        type:
                          - string
                          - 'null'
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                      param:
                        type:
                          - string
                          - 'null'
                        description: The parameter that caused the error, if applicable
                    required:
                      - type
                      - message
                required:
                  - error
              example:
                error:
                  type: forbidden
                  message: You do not have permission to access this resource
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      message:
                        type: string
                      code:
                        type:
                          - string
                          - 'null'
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                      param:
                        type:
                          - string
                          - 'null'
                        description: The parameter that caused the error, if applicable
                    required:
                      - type
                      - message
                required:
                  - error
              example:
                error:
                  type: not_found
                  message: Resource not found
        '422':
          description: Verification required
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      message:
                        type: string
                      code:
                        type:
                          - string
                          - 'null'
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                      param:
                        type:
                          - string
                          - 'null'
                        description: The parameter that caused the error, if applicable
                    required:
                      - type
                      - message
                required:
                  - error
              example:
                error: null
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      message:
                        type: string
                      code:
                        type:
                          - string
                          - 'null'
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                      param:
                        type:
                          - string
                          - 'null'
                        description: The parameter that caused the error, if applicable
                    required:
                      - type
                      - message
                required:
                  - error
              example:
                error:
                  type: internal_server_error
                  message: An unexpected error occurred
      security:
        - bearerAuth:
            - payment:setup_intent:read
            - member:basic:read
            - member:email:read
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Whop from '@whop/sdk';


            const client = new Whop({
              apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
            });


            const setupIntent = await
            client.setupIntents.retrieve('sint_xxxxxxxxxxxxx');


            console.log(setupIntent.id);
        - lang: Python
          source: |-
            import os
            from whop_sdk import Whop

            client = Whop(
                api_key=os.environ.get("WHOP_API_KEY"),  # This is the default and can be omitted
            )
            setup_intent = client.setup_intents.retrieve(
                "sint_xxxxxxxxxxxxx",
            )
            print(setup_intent.id)
        - lang: Ruby
          source: |-
            require "whop_sdk"

            whop = WhopSDK::Client.new(api_key: "My API Key")

            setup_intent = whop.setup_intents.retrieve("sint_xxxxxxxxxxxxx")

            puts(setup_intent)
components:
  schemas:
    SetupIntent:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the setup intent.
          example: sint_xxxxxxxxxxxxx
        status:
          $ref: '#/components/schemas/SetupIntentStatuses'
          description: The current status of the setup intent.
        created_at:
          type: string
          format: date-time
          description: The datetime the setup intent was created.
          example: '2023-12-01T05:00:00.401Z'
        error_message:
          type:
            - string
            - 'null'
          description: >-
            A human-readable error message explaining why the setup intent
            failed. Null if no error occurred.
          example: Your card was declined.
        company:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
              description: The unique identifier for the company.
              example: biz_xxxxxxxxxxxxxx
          required:
            - id
          description: >-
            The company that initiated this setup intent. Null if the company
            has been deleted.
        checkout_configuration:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
              description: The unique identifier for the checkout session.
              example: ch_xxxxxxxxxxxxxxx
          required:
            - id
          description: >-
            The checkout session configuration associated with this setup
            intent. Null if no checkout session was used.
        member:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
              description: The unique identifier for the company member.
            user:
              type:
                - object
                - 'null'
              properties:
                id:
                  type: string
                  description: The unique identifier for the company member user.
                email:
                  type:
                    - string
                    - 'null'
                  description: The digital mailing address of the user.
                name:
                  type:
                    - string
                    - 'null'
                  description: The user's full name.
                username:
                  type: string
                  description: The whop username.
              required:
                - id
                - email
                - name
                - username
              description: The user for this member, if any.
          required:
            - id
            - user
          description: >-
            The company member associated with this setup intent. Null if the
            user is not a member.
        payment_method:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
              description: The unique identifier for the payment token.
              example: payt_xxxxxxxxxxxxx
            created_at:
              type: string
              format: date-time
              description: The datetime the payment token was created.
              example: '2023-12-01T05:00:00.401Z'
            payment_method_type:
              $ref: '#/components/schemas/PaymentMethodTypes'
              description: The payment method type of the payment method
            card:
              type:
                - object
                - 'null'
              properties:
                brand:
                  oneOf:
                    - $ref: '#/components/schemas/CardBrands'
                    - type: 'null'
                  description: >-
                    The card network (e.g., visa, mastercard, amex). Null if the
                    brand could not be determined.
                last4:
                  type:
                    - string
                    - 'null'
                  description: >-
                    The last four digits of the card number. Null if not
                    available.
                  example: '4242'
                exp_month:
                  type:
                    - integer
                    - 'null'
                  description: >-
                    The two-digit expiration month of the card (1-12). Null if
                    not available.
                  example: 42
                exp_year:
                  type:
                    - integer
                    - 'null'
                  description: >-
                    The two-digit expiration year of the card (e.g., 27 for
                    2027). Null if not available.
                  example: 42
              required:
                - brand
                - last4
                - exp_month
                - exp_year
              description: >-
                The card data associated with the payment method, if its a debit
                or credit card.
            mailing_address:
              type:
                - object
                - 'null'
              properties:
                name:
                  type:
                    - string
                    - 'null'
                  description: The name of the customer.
                line1:
                  type:
                    - string
                    - 'null'
                  description: The line 1 of the address.
                line2:
                  type:
                    - string
                    - 'null'
                  description: The line 2 of the address.
                city:
                  type:
                    - string
                    - 'null'
                  description: The city of the address.
                state:
                  type:
                    - string
                    - 'null'
                  description: The state of the address.
                postal_code:
                  type:
                    - string
                    - 'null'
                  description: The postal code of the address.
                country:
                  type:
                    - string
                    - 'null'
                  description: The country of the address.
              required:
                - name
                - line1
                - line2
                - city
                - state
                - postal_code
                - country
              description: The mailing address associated with the payment method's user
          required:
            - id
            - created_at
            - payment_method_type
            - card
            - mailing_address
          description: >-
            The saved payment method created by this setup intent. Null if the
            setup has not completed successfully.
        metadata:
          type:
            - object
            - 'null'
          additionalProperties: true
          description: >-
            Custom key-value pairs attached to this setup intent. Null if no
            metadata was provided.
      required:
        - id
        - status
        - created_at
        - error_message
        - company
        - checkout_configuration
        - member
        - payment_method
        - metadata
      description: >-
        A setup intent allows a user to save a payment method for future use
        without making an immediate purchase.
    SetupIntentStatuses:
      type: string
      enum:
        - processing
        - succeeded
        - canceled
        - requires_action
      description: The status of the setup intent.
    PaymentMethodTypes:
      type: string
      enum:
        - acss_debit
        - affirm
        - afterpay_clearpay
        - alipay
        - alma
        - amazon_pay
        - apple
        - apple_pay
        - au_bank_transfer
        - au_becs_debit
        - bacs_debit
        - bancolombia
        - bancontact
        - billie
        - bizum
        - blik
        - boleto
        - bre_b
        - ca_bank_transfer
        - capchase_pay
        - card
        - card_installments_three
        - card_installments_six
        - card_installments_twelve
        - cashapp
        - claritypay
        - coinbase
        - crypto
        - custom
        - customer_balance
        - demo_pay
        - efecty
        - eps
        - eu_bank_transfer
        - fpx
        - gb_bank_transfer
        - giropay
        - google_pay
        - gopay
        - grabpay
        - id_bank_transfer
        - ideal
        - interac
        - kakao_pay
        - klarna
        - klarna_pay_now
        - konbini
        - kr_card
        - kr_market
        - kriya
        - kueski
        - link
        - mb_way
        - m_pesa
        - mercado_pago
        - mobilepay
        - mondu
        - multibanco
        - naver_pay
        - nequi
        - netbanking
        - ng_bank
        - ng_bank_transfer
        - ng_card
        - ng_market
        - ng_ussd
        - ng_wallet
        - nz_bank_account
        - oxxo
        - p24
        - pago_efectivo
        - pse
        - pay_by_bank
        - payco
        - paynow
        - paypal
        - paypay
        - payto
        - pix
        - platform_balance
        - promptpay
        - qris
        - rechnung
        - revolut_pay
        - samsung_pay
        - satispay
        - scalapay
        - sencillito
        - sepa_debit
        - sequra
        - servipag
        - sezzle
        - shop_pay
        - shopeepay
        - sofort
        - south_korea_market
        - spei
        - splitit
        - sunbit
        - swish
        - tamara
        - twint
        - upi
        - us_bank_account
        - us_bank_transfer
        - venmo
        - vipps
        - webpay
        - wechat_pay
        - yape
        - zip
        - coinflow
        - unknown
      description: The different types of payment methods that can be used.
    CardBrands:
      type: string
      enum:
        - mastercard
        - visa
        - amex
        - discover
        - unionpay
        - jcb
        - diners
        - link
        - troy
        - visadankort
        - visabancontact
        - china_union_pay
        - rupay
        - jcbrupay
        - elo
        - maestro
        - tarjeta_naranja
        - cirrus
        - nspk_mir
        - verve
        - ebt
        - private_label
        - local_brand
        - uatp
        - wexcard
        - uzcard
        - meeza
        - hrg_store_card
        - girocard
        - fuel_card
        - dankort
        - carnet
        - atm_card
        - china_union_payuzcard
        - codensa
        - cabal
        - hipercard
        - jcblankapay
        - cmi
        - unknown
      description: Possible card brands that a payment token can have
  securitySchemes:
    bearerAuth:
      type: http
      description: >-
        A company API key, company scoped JWT, app API key, or user OAuth token.
        You must prepend your key/token with the word 'Bearer', which will look
        like `Bearer ***************************`
      scheme: bearer
      bearerFormat: auth-scheme

````