# Confirm a SetupIntent

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/setup_intents/{id}/confirm:
    post:
      summary: Confirm a SetupIntent
      deprecated: false
      description: ''
      tags:
        - API Reference/Setup Intents
        - P8
      parameters:
        - name: id
          in: path
          description: ''
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                customer:
                  type: string
                  description: >-
                    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.
                description:
                  type: string
                  description: >-
                    An arbitrary string attached to the object. Often useful for
                    displaying to users.
                metadata:
                  type: object
                  properties: {}
                  x-apifox-orders: []
                  description: >-
                    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.
                  x-apifox-ignore-properties: []
                payment_method:
                  type: string
                  description: ID of the payment method used with this SetupIntent.
                payment_method_options:
                  type: object
                  properties:
                    card:
                      type: object
                      properties:
                        request_three_d_secure:
                          type: string
                          description: >-
                            Values can be auto, any, void When a user selects
                            the void option, Wooshpay will still perform 3DS if
                            it encounters a policy.
                      x-apifox-orders:
                        - request_three_d_secure
                      x-apifox-ignore-properties: []
                  x-apifox-orders:
                    - card
                  description: Payment-method-specific configuration for this SetupIntent.
                  x-apifox-ignore-properties: []
                payment_method_data:
                  type: object
                  x-apifox-refs:
                    01GKRV06V52XSQG7YS88MM1J23:
                      $ref: '#/components/schemas/Payment%20Method%20Data'
                      x-apifox-overrides:
                        sepa_debit: null
                  x-apifox-orders:
                    - 01GKRV06V52XSQG7YS88MM1J23
                  properties:
                    type:
                      type: string
                      description: The type of the PaymentMethod.
                      enum:
                        - card
                        - alipayplus
                        - alipay
                        - wechat_pay
                        - sepa_debit
                        - alipay_hk
                        - boost
                        - truemoney
                        - gcash
                        - kakaopay
                        - touchngo
                        - rabbit_line_pay
                        - dana
                        - klarna
                        - ideal
                        - giropay
                        - sofort
                        - eps
                        - trustly
                        - bancontact
                        - p24
                        - unionpay
                        - fpx
                        - mcash
                        - grabpay
                        - bank_transfer_id
                        - qris
                        - promptpay
                        - ovo
                        - shopeepay
                        - upi
                        - boleto
                        - paynow
                        - pix
                        - 9pay
                        - stitch
                        - bpi
                      x-apifox-enum:
                        - value: card
                          name: ''
                          description: To use value 'card', you must be PCI Compliant.
                        - value: alipayplus
                          name: ''
                          description: ''
                        - value: alipay
                          name: ''
                          description: ''
                        - value: wechat_pay
                          name: ''
                          description: ''
                        - value: sepa_debit
                          name: ''
                          description: ''
                        - value: alipay_hk
                          name: ''
                          description: ''
                        - value: boost
                          name: ''
                          description: ''
                        - value: truemoney
                          name: ''
                          description: ''
                        - value: gcash
                          name: ''
                          description: ''
                        - value: kakaopay
                          name: ''
                          description: ''
                        - value: touchngo
                          name: ''
                          description: ''
                        - value: rabbit_line_pay
                          name: ''
                          description: ''
                        - value: dana
                          name: ''
                          description: ''
                        - value: klarna
                          name: ''
                          description: ''
                        - value: ideal
                          name: ''
                          description: ''
                        - value: giropay
                          name: ''
                          description: ''
                        - value: sofort
                          name: ''
                          description: ''
                        - value: eps
                          name: ''
                          description: ''
                        - value: trustly
                          name: ''
                          description: ''
                        - value: bancontact
                          name: ''
                          description: ''
                        - value: p24
                          name: ''
                          description: ''
                        - value: unionpay
                          name: ''
                          description: ''
                        - value: fpx
                          name: ''
                          description: ''
                        - value: mcash
                          name: ''
                          description: ''
                        - value: grabpay
                          name: ''
                          description: ''
                        - value: bank_transfer_id
                          name: ''
                          description: ''
                        - value: qris
                          name: ''
                          description: ''
                        - value: promptpay
                          name: ''
                          description: ''
                        - value: ovo
                          name: ''
                          description: ''
                        - value: shopeepay
                          name: ''
                          description: ''
                        - value: upi
                          name: ''
                          description: ''
                        - value: boleto
                          name: ''
                          description: ''
                        - value: paynow
                          name: ''
                          description: ''
                        - value: pix
                          name: ''
                          description: ''
                        - value: 9pay
                          name: ''
                          description: ''
                        - value: stitch
                          name: ''
                          description: ''
                        - value: bpi
                          name: ''
                          description: ''
                    billing_details: &ref_0
                      $ref: '#/components/schemas/Billing%20Details'
                      description: >-
                        Billing information associated with the PaymentMethod
                        that may be used or required by particular types of
                        payment methods.
                    card:
                      type: object
                      properties:
                        exp_month:
                          type: string
                        exp_year:
                          type: string
                        number:
                          type: string
                        cvc:
                          type: string
                        name:
                          type: string
                      x-apifox-orders:
                        - exp_month
                        - exp_year
                        - number
                        - cvc
                        - name
                      description: >-
                        The type of the PaymentMethod. An additional object is
                        included on the PaymentMethod with a name matching this
                        value. It contains additional information specific to
                        the PaymentMethod.
                      required:
                        - exp_month
                        - exp_year
                        - number
                        - cvc
                        - name
                      x-apifox-ignore-properties: []
                    wechat_pay:
                      type: object
                      properties:
                        payment_code:
                          type: string
                      x-apifox-orders:
                        - payment_code
                      x-apifox-ignore-properties: []
                    alipayplus:
                      type: object
                      properties:
                        payment_code:
                          type: string
                      x-apifox-orders:
                        - payment_code
                      x-apifox-ignore-properties: []
                  description: >-
                    When included, this hash creates a PaymentMethod that is set
                    as the payment_method value in the SetupIntent.
                  required:
                    - type
                  x-apifox-ignore-properties:
                    - type
                    - billing_details
                    - card
                    - wechat_pay
                    - alipayplus
                usage:
                  type: string
                  description: >-
                    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.
                  enum:
                    - on_session
                    - off_session
                  x-apifox-enum:
                    - value: on_session
                      name: ''
                      description: ' if you intend to only reuse the payment method when the customer is in your checkout flow.'
                    - value: off_session
                      name: ''
                      description: >-
                        if your customer may or may not be in your checkout
                        flow.
                return_url:
                  type: string
                  description: >-
                    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.
              x-apifox-refs: {}
              x-apifox-orders:
                - customer
                - description
                - metadata
                - payment_method
                - payment_method_options
                - payment_method_data
                - usage
                - return_url
              required:
                - return_url
              x-apifox-ignore-properties: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                x-apifox-refs:
                  01GKRW3MF129ZTP64AV14PF726:
                    $ref: '#/components/schemas/Setup%20Intent'
                    x-apifox-overrides:
                      on_behalf_of: null
                      application: null
                      flow_directions: null
                      usage: null
                      attach_to_self: null
                x-apifox-orders:
                  - 01GKRW3MF129ZTP64AV14PF726
                properties:
                  id:
                    type: string
                    description: >-
                      [RETRIEVABLE WITH PK] Unique identifier for the object,
                      like ""seti_xxxxx".
                  object:
                    type: string
                    description: '[RETRIEVABLE WITH PK] "setup_intent"'
                  cancellation_reason:
                    type: string
                    description: >-
                      [RETRIEVABLE WITH PK] Reason for cancellation of this
                      SetupIntent, one of abandoned, requested_by_customer, or
                      duplicate.
                  client_secret:
                    type: string
                    description: >-
                      [RETRIEVABLE WITH PK] 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.
                  created:
                    type: integer
                    description: >-
                      [RETRIEVABLE WITH PK] Time at which the object was
                      created. Measured in seconds since the Unix epoch.
                  customer:
                    type: string
                    description: >-
                      [EXPANDABLE] 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.
                  description:
                    type: string
                    description: >-
                      [RETRIEVABLE WITH PK] An arbitrary string attached to the
                      object. Often useful for displaying to users.
                  last_setup_error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          For some errors that could be handled
                          programmatically, a short string indicating the error
                          code reported.
                      decline_code:
                        type: string
                        description: >-
                          For card errors resulting from a card issuer decline,
                          a short string indicating the card issuer’s reason for
                          the decline if they provide one.
                      message:
                        type: string
                        description: >-
                          A human-readable message providing more details about
                          the error. For card errors, these messages can be
                          shown to your users.
                      param:
                        type: string
                        description: >-
                          If the error is parameter-specific, the parameter
                          related to the error. For example, you can use this to
                          display a message near the correct form field.
                      payment_method:
                        type: object
                        x-apifox-refs:
                          01GKKX6XH9BQ64XZ46CX10J38V: &ref_1
                            $ref: '#/components/schemas/Payment%20Method'
                            x-apifox-overrides: {}
                        properties:
                          id:
                            type: string
                            description: Unique identifier for the object, like 'pm_xxxxx'
                          object:
                            type: string
                            description: '''payment method'''
                          created:
                            type: integer
                            description: >-
                              Time at which the object was created. Measured in
                              seconds since the Unix epoch.
                          customer:
                            type: string
                            description: >-
                              The ID of the Customer to which this PaymentMethod
                              is saved. This will not be set when the
                              PaymentMethod has not been saved to a Customer.
                          metadata:
                            type: object
                            properties: {}
                            x-apifox-orders: []
                            description: >-
                              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.
                            x-apifox-ignore-properties: []
                          livemode:
                            type: boolean
                            description: >-
                              Has the value true  if the object exists in live
                              mode or the value false  if the object exists in
                              test mode.
                          billing_details: *ref_0
                          type:
                            type: string
                            description: >-
                              The type of the PaymentMethod. An additional
                              object is included on the PaymentMethod with a
                              name matching this value. It contains additional
                              information specific to the PaymentMethod type. 
                            enum:
                              - card
                              - alipayplus
                              - alipay
                              - wechat_pay
                              - sepa_debit
                              - alipay_hk
                              - boost
                              - truemoney
                              - gcash
                              - kakaopay
                              - touchngo
                              - rabbit_line_pay
                              - dana
                              - klarna
                              - ideal
                              - giropay
                              - sofort
                              - eps
                              - trustly
                              - bancontact
                              - p24
                              - unionpay
                              - fpx
                              - mcash
                              - grabpay
                              - bank_transfer_id
                              - qris
                              - promptpay
                              - ovo
                              - shopeepay
                              - upi
                              - boleto
                              - paynow
                              - pix
                              - 9pay
                              - stitch
                              - bpi
                            x-apifox-enum:
                              - value: card
                                name: ''
                                description: >-
                                  To use value 'card', you must be PCI
                                  Compliant.
                              - value: alipayplus
                                name: ''
                                description: ''
                              - value: alipay
                                name: ''
                                description: ''
                              - value: wechat_pay
                                name: ''
                                description: ''
                              - value: sepa_debit
                                name: ''
                                description: ''
                              - value: alipay_hk
                                name: ''
                                description: ''
                              - value: boost
                                name: ''
                                description: ''
                              - value: truemoney
                                name: ''
                                description: ''
                              - value: gcash
                                name: ''
                                description: ''
                              - value: kakaopay
                                name: ''
                                description: ''
                              - value: touchngo
                                name: ''
                                description: ''
                              - value: rabbit_line_pay
                                name: ''
                                description: ''
                              - value: dana
                                name: ''
                                description: ''
                              - value: klarna
                                name: ''
                                description: ''
                              - value: ideal
                                name: ''
                                description: ''
                              - value: giropay
                                name: ''
                                description: ''
                              - value: sofort
                                name: ''
                                description: ''
                              - value: eps
                                name: ''
                                description: ''
                              - value: trustly
                                name: ''
                                description: ''
                              - value: bancontact
                                name: ''
                                description: ''
                              - value: p24
                                name: ''
                                description: ''
                              - value: unionpay
                                name: ''
                                description: ''
                              - value: fpx
                                name: ''
                                description: ''
                              - value: mcash
                                name: ''
                                description: ''
                              - value: grabpay
                                name: ''
                                description: ''
                              - value: bank_transfer_id
                                name: ''
                                description: ''
                              - value: qris
                                name: ''
                                description: ''
                              - value: promptpay
                                name: ''
                                description: ''
                              - value: ovo
                                name: ''
                                description: ''
                              - value: shopeepay
                                name: ''
                                description: ''
                              - value: upi
                                name: ''
                                description: ''
                              - value: boleto
                                name: ''
                                description: ''
                              - value: paynow
                                name: ''
                                description: ''
                              - value: pix
                                name: ''
                                description: ''
                              - value: 9pay
                                name: ''
                                description: ''
                              - value: stitch
                                name: ''
                                description: ''
                              - value: bpi
                                name: ''
                                description: ''
                          card:
                            type: object
                            x-apifox-refs: {}
                            x-apifox-orders:
                              - brand
                              - checks
                              - country
                              - exp_month
                              - exp_year
                              - fingerprint
                              - funding
                              - last4
                              - metadata
                            properties:
                              brand:
                                type: string
                                description: >-
                                  American Express, Diners Club, Discover, JCB,
                                  MasterCard, UnionPay, Visa, or Unknown
                              checks:
                                type: object
                                properties:
                                  address_line1_check:
                                    type: string
                                    description: "If a address line1 was provided, results of the check, one of\_pass,\_fail,\_unavailable, or\_unchecked."
                                  address_zip_check:
                                    type: string
                                    description: "If a address postal code was provided, results of the check, one of\_pass,\_fail,\_unavailable, or\_unchecked."
                                  cvc_check:
                                    type: string
                                x-apifox-orders:
                                  - address_line1_check
                                  - address_zip_check
                                  - cvc_check
                                x-apifox-ignore-properties: []
                              country:
                                type: string
                                description: >-
                                  Two-letter ISO code representing the country
                                  of the card. You could use this attribute to
                                  get a sense of the international breakdown of
                                  cards you’ve collected.
                              exp_month:
                                type: integer
                                description: >-
                                  Two-digit number representing the card’s
                                  expiration month.
                              exp_year:
                                type: integer
                                description: >-
                                  Four-digit number representing the card’s
                                  expiration year.
                              fingerprint:
                                type: string
                                description: >-
                                  Uniquely identifies this particular card
                                  number.
                              funding:
                                type: string
                                description: Can be credit, debit, prepaid, or unknown.
                              last4:
                                type: string
                                description: The last four digits of the card.
                              metadata:
                                type: object
                                properties: {}
                                x-apifox-orders: []
                                description: >-
                                  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.
                                x-apifox-ignore-properties: []
                            description: >-
                              If this is a card  PaymentMethod, this object
                              contains the user’s card details.
                            x-apifox-ignore-properties: []
                        x-apifox-orders:
                          - 01GKKX6XH9BQ64XZ46CX10J38V
                        description: >-
                          The PaymentMethod object for errors returned on a
                          request involving a PaymentMethod.
                        required:
                          - type
                        x-apifox-ignore-properties:
                          - id
                          - object
                          - created
                          - customer
                          - metadata
                          - livemode
                          - billing_details
                          - type
                          - card
                      payment_method_type:
                        type: string
                        description: >-
                          If the error is specific to the type of payment
                          method, the payment method type that had a problem. 
                      type:
                        type: string
                        description: >-
                          The type of error returned. One of api_error,
                          card_error, idempotency_error, or
                          invalid_request_error
                    description: >-
                      [RETRIEVABLE WITH PK] The error encountered in the
                      previous SetupIntent confirmation.
                    x-apifox-orders:
                      - code
                      - decline_code
                      - message
                      - param
                      - payment_method
                      - payment_method_type
                      - type
                    required:
                      - code
                      - decline_code
                      - message
                      - param
                      - payment_method_type
                      - type
                    x-apifox-ignore-properties: []
                  latest_attempt:
                    type: string
                    description: >-
                      [EXPANDABLE] The most recent SetupAttempt for this
                      SetupIntent.
                  livemode:
                    type: boolean
                    description: >-
                      [RETRIEVABLE WITH PK] Has the value true if the object
                      exists in live mode or the value false if the object
                      exists in test mode.
                  mandate:
                    type: string
                    description: >-
                      [EXPANDABLE] ID of the multi use Mandate generated by the
                      SetupIntent.
                  metadata:
                    type: object
                    properties: {}
                    x-apifox-orders: []
                    description: >-
                      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.
                    x-apifox-ignore-properties: []
                  next_action: &ref_23
                    $ref: '#/components/schemas/Next%20Action'
                    description: >-
                      [RETRIEVABLE WITH PK] If present, this property tells you
                      what actions you need to take in order for your customer
                      to continue payment setup.
                  payment_method:
                    type: string
                    description: >-
                      [EXPANDABLE][RETRIEVABLE WITH PK] ID of the payment method
                      used with this SetupIntent.
                  payment_method_options:
                    type: object
                    properties:
                      card:
                        type: object
                        properties:
                          request_three_d_secure:
                            type: string
                            description: >-
                              Values can be auto, any, void When a user selects
                              the void option, Wooshpay will still perform 3DS
                              if it encounters a policy.
                        x-apifox-orders:
                          - request_three_d_secure
                        x-apifox-ignore-properties: []
                    x-apifox-orders:
                      - card
                    description: >-
                      Payment-method-specific configuration for this
                      SetupIntent.
                    x-apifox-ignore-properties: []
                  payment_method_types:
                    type: array
                    items:
                      type: string
                    description: >-
                      The list of payment method types (e.g. card) that this
                      SetupIntent is allowed to set up.
                  single_use_mandate:
                    type: string
                    description: >-
                      [EXPANDABLE] ID of the single_use Mandate generated by the
                      SetupIntent.
                  status:
                    type: string
                    description: >-
                      [RETRIEVABLE WITH PK] Status of this SetupIntent, one of
                      requires_payment_method, requires_confirmation,
                      requires_action, processing, canceled, or succeeded.
                  return_url:
                    type: string
                    description: The url that the cutomer will be redirected to.
                x-apifox-ignore-properties:
                  - id
                  - object
                  - cancellation_reason
                  - client_secret
                  - created
                  - customer
                  - description
                  - last_setup_error
                  - latest_attempt
                  - livemode
                  - mandate
                  - metadata
                  - next_action
                  - payment_method
                  - payment_method_options
                  - payment_method_types
                  - single_use_mandate
                  - status
                  - return_url
          headers: {}
          x-apifox-name: OK
      security:
        - basic: []
      x-apifox-folder: API Reference/Setup Intents
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/1296482/apis/api-53887725-run
components:
  schemas:
    Billing Details:
      type: object
      properties:
        address:
          $ref: '#/components/schemas/Address'
        email:
          type: string
          description: Email address.
        name:
          type: string
          description: 'Full name. '
        phone:
          type: string
          description: Billing phone number (including extension).
      x-apifox-orders:
        - address
        - email
        - name
        - phone
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    Address:
      type: object
      properties:
        city:
          type: string
          description: City, district, suburb, town, or village.
        country:
          type: string
          description: Two-letter country code (ISO 3166-1 alpha-2 ).
        line1:
          type: string
          description: Address line 1 (e.g., street, PO Box, or company name).
        line2:
          type: string
          description: Address line 2 (e.g., apartment, suite, unit, or building).
        postal_code:
          type: string
          description: ZIP or postal code.
        state:
          type: string
          description: State, county, province, or region.
      x-apifox-orders:
        - city
        - country
        - line1
        - line2
        - postal_code
        - state
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    Payment Method Data:
      type: object
      properties:
        type:
          type: string
          description: The type of the PaymentMethod.
          enum:
            - card
            - alipayplus
            - alipay
            - wechat_pay
            - sepa_debit
            - alipay_hk
            - boost
            - truemoney
            - gcash
            - kakaopay
            - touchngo
            - rabbit_line_pay
            - dana
            - klarna
            - ideal
            - giropay
            - sofort
            - eps
            - trustly
            - bancontact
            - p24
            - unionpay
            - fpx
            - mcash
            - grabpay
            - bank_transfer_id
            - qris
            - promptpay
            - ovo
            - shopeepay
            - upi
            - boleto
            - paynow
            - pix
            - 9pay
            - stitch
            - bpi
          x-apifox-enum:
            - value: card
              name: ''
              description: To use value 'card', you must be PCI Compliant.
            - value: alipayplus
              name: ''
              description: ''
            - value: alipay
              name: ''
              description: ''
            - value: wechat_pay
              name: ''
              description: ''
            - value: sepa_debit
              name: ''
              description: ''
            - value: alipay_hk
              name: ''
              description: ''
            - value: boost
              name: ''
              description: ''
            - value: truemoney
              name: ''
              description: ''
            - value: gcash
              name: ''
              description: ''
            - value: kakaopay
              name: ''
              description: ''
            - value: touchngo
              name: ''
              description: ''
            - value: rabbit_line_pay
              name: ''
              description: ''
            - value: dana
              name: ''
              description: ''
            - value: klarna
              name: ''
              description: ''
            - value: ideal
              name: ''
              description: ''
            - value: giropay
              name: ''
              description: ''
            - value: sofort
              name: ''
              description: ''
            - value: eps
              name: ''
              description: ''
            - value: trustly
              name: ''
              description: ''
            - value: bancontact
              name: ''
              description: ''
            - value: p24
              name: ''
              description: ''
            - value: unionpay
              name: ''
              description: ''
            - value: fpx
              name: ''
              description: ''
            - value: mcash
              name: ''
              description: ''
            - value: grabpay
              name: ''
              description: ''
            - value: bank_transfer_id
              name: ''
              description: ''
            - value: qris
              name: ''
              description: ''
            - value: promptpay
              name: ''
              description: ''
            - value: ovo
              name: ''
              description: ''
            - value: shopeepay
              name: ''
              description: ''
            - value: upi
              name: ''
              description: ''
            - value: boleto
              name: ''
              description: ''
            - value: paynow
              name: ''
              description: ''
            - value: pix
              name: ''
              description: ''
            - value: 9pay
              name: ''
              description: ''
            - value: stitch
              name: ''
              description: ''
            - value: bpi
              name: ''
              description: ''
        billing_details: *ref_0
        card:
          type: object
          properties:
            exp_month:
              type: string
            exp_year:
              type: string
            number:
              type: string
            cvc:
              type: string
            name:
              type: string
          x-apifox-orders:
            - exp_month
            - exp_year
            - number
            - cvc
            - name
          description: >-
            The type of the PaymentMethod. An additional object is included on
            the PaymentMethod with a name matching this value. It contains
            additional information specific to the PaymentMethod.
          required:
            - exp_month
            - exp_year
            - number
            - cvc
            - name
          x-apifox-ignore-properties: []
        sepa_debit:
          type: object
          properties:
            iban:
              type: string
              description: IBAN of the bank account.
          x-apifox-orders:
            - iban
          required:
            - iban
          x-apifox-ignore-properties: []
        wechat_pay:
          type: object
          properties:
            payment_code:
              type: string
          x-apifox-orders:
            - payment_code
          x-apifox-ignore-properties: []
        alipayplus:
          type: object
          properties:
            payment_code:
              type: string
          x-apifox-orders:
            - payment_code
          x-apifox-ignore-properties: []
      x-apifox-orders:
        - type
        - billing_details
        - card
        - sepa_debit
        - wechat_pay
        - alipayplus
      description: >-
        If provided, this hash will be used to create a PaymentMethod. The new
        PaymentMethod will appear in the payment_method  property on the
        PaymentIntent. 
      required:
        - type
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    Next Action:
      type: object
      properties:
        type:
          type: string
          description: Type of the next action to perform
        redirect_to_url:
          type: object
          properties:
            return_url:
              type: string
              description: >-
                If the customer does not exit their browser while
                authenticating, they will be redirected to this specified URL
                after completion.
            url:
              type: string
              description: >-
                The URL you must redirect your customer to in order to
                authenticate the payment.
          x-apifox-orders:
            - return_url
            - url
          x-apifox-ignore-properties: []
        ddc_redirect:
          type: object
          properties:
            return_url:
              type: string
              description: >-
                If the customer does not exit their browser while
                authenticating, they will be redirected to this specified URL
                after completion.
            url:
              type: string
              description: >-
                The URL you must redirect your customer to in order to
                authenticate the payment.
          x-apifox-orders:
            - return_url
            - url
          x-apifox-ignore-properties: []
        challenge_redirect:
          type: object
          properties:
            return_url:
              type: string
              description: >-
                If the customer does not exit their browser while
                authenticating, they will be redirected to this specified URL
                after completion.
            url:
              type: string
              description: >-
                The URL you must redirect your customer to in order to
                authenticate the payment.
          x-apifox-orders:
            - return_url
            - url
          x-apifox-ignore-properties: []
        alipayplus_handle_redirect:
          type: object
          properties:
            return_url:
              type: string
              description: >-
                If the customer does not exit their browser while
                authenticating, they will be redirected to this specified URL
                after completion.
            schemeUrl:
              type: string
              description: This url redirects users to an app.
            applinkUrl:
              type: string
              description: >-
                This url redirects users to an app, or, if no APP is installed,
                to a WAP page.
            normalUrl:
              type: string
              description: >-
                This url redirects users to a WAP or Web page in the browser or
                in the WebView
          x-apifox-orders:
            - return_url
            - schemeUrl
            - applinkUrl
            - normalUrl
          x-apifox-ignore-properties: []
        alipay_handle_redirect:
          type: object
          properties:
            native_data:
              type: string
              description: >-
                The native URL you must redirect your customer to in order to
                authenticate the payment in an Android App.
            native_url:
              type: string
              description: >-
                The native URL you must redirect your customer to in order to
                authenticate the payment in an iOS App.
            return_url:
              type: string
              description: >-
                If the customer does not exit their browser while
                authenticating, they will be redirected to this specified URL
                after completion.
            url:
              type: string
              description: >-
                The URL you must redirect your customer to in order to
                authenticate the payment.
          x-apifox-orders:
            - native_data
            - native_url
            - return_url
            - url
          x-apifox-ignore-properties: []
        wechat_pay_display_qr_code:
          type: object
          properties:
            data:
              type: string
              description: The data being used to generate QR code
            data_ur:
              type: string
              description: The base64 image data for a pre-generated QR code
            image_url_png:
              type: string
              description: The image_url_png string used to render QR code
            image_url_svg:
              type: string
              description: The image_url_svg string used to render QR code
          x-apifox-orders:
            - data
            - data_ur
            - image_url_png
            - image_url_svg
          x-apifox-ignore-properties: []
        wechat_pay_redirect_to_android_app:
          type: object
          properties:
            native_url:
              type: string
              description: An universal link that redirect to WeChat Pay app
          x-apifox-orders:
            - native_url
          x-apifox-ignore-properties: []
        wechat_pay_redirect_to_ios_app:
          type: object
          properties:
            native_url:
              type: string
              description: An universal link that redirect to WeChat Pay app
          x-apifox-orders:
            - native_url
          x-apifox-ignore-properties: []
        wechat_pay_redirect_to_web:
          type: object
          properties:
            url:
              type: string
              description: >-
                The URL you must redirect your customer to in order to
                authenticate the payment.
          x-apifox-orders:
            - url
          x-apifox-ignore-properties: []
        wechat_pay_official_account_params:
          type: object
          properties:
            appId:
              type: string
            timeStamp:
              type: string
            nonceStr:
              type: string
            signType:
              type: string
            paySign:
              type: string
            package:
              type: string
          x-apifox-orders:
            - appId
            - timeStamp
            - nonceStr
            - signType
            - paySign
            - package
          x-apifox-ignore-properties: []
        truemoney_handle_redirect:
          type: object
          properties:
            url:
              type: string
          x-apifox-orders:
            - url
          x-apifox-ignore-properties: []
        akulaku_handle_redirect:
          type: object
          properties:
            url:
              type: string
          x-apifox-orders:
            - url
          x-apifox-ignore-properties: []
        bank_transfer_id_handle_redirect:
          type: object
          properties:
            url:
              type: string
          x-apifox-orders:
            - url
          x-apifox-ignore-properties: []
        promptpay_handle_redirect:
          type: object
          properties:
            url:
              type: string
          x-apifox-orders:
            - url
          x-apifox-ignore-properties: []
        dana_handle_redirect:
          type: object
          properties:
            url:
              type: string
          x-apifox-orders:
            - url
          x-apifox-ignore-properties: []
        shopeepay_handle_redirect:
          type: object
          properties:
            url:
              type: string
          x-apifox-orders:
            - url
          x-apifox-ignore-properties: []
        gcash_handle_redirect:
          type: object
          properties:
            url:
              type: string
          x-apifox-orders:
            - url
          x-apifox-ignore-properties: []
        rabbit_line_pay_handle_redirect:
          type: object
          properties:
            url:
              type: string
          x-apifox-orders:
            - url
          x-apifox-ignore-properties: []
        alipay_hk_handle_redirect:
          type: object
          properties:
            url:
              type: string
          x-apifox-orders:
            - url
          x-apifox-ignore-properties: []
        bpi_handle_redirect:
          type: object
          properties:
            url:
              type: string
          x-apifox-orders:
            - url
          x-apifox-ignore-properties: []
        pix_handle_redirect:
          type: object
          properties:
            url:
              type: string
            qrcode:
              type: string
            timeout:
              type: integer
          x-apifox-orders:
            - url
            - qrcode
            - timeout
          x-apifox-ignore-properties: []
        oxxo_handle_redirect:
          type: object
          properties:
            timeout:
              type: string
              description: The timestamp after which the OXXO voucher expires.
            bar_code:
              type: string
              description: OXXO reference number.
            url:
              type: string
          x-apifox-orders:
            - timeout
            - bar_code
            - url
          x-apifox-ignore-properties: []
        spei_display_details:
          type: object
          properties: {}
          x-apifox-orders: []
          x-apifox-ignore-properties: []
      x-apifox-orders:
        - type
        - redirect_to_url
        - ddc_redirect
        - challenge_redirect
        - alipayplus_handle_redirect
        - alipay_handle_redirect
        - wechat_pay_display_qr_code
        - wechat_pay_redirect_to_android_app
        - wechat_pay_redirect_to_ios_app
        - wechat_pay_redirect_to_web
        - wechat_pay_official_account_params
        - truemoney_handle_redirect
        - akulaku_handle_redirect
        - bank_transfer_id_handle_redirect
        - promptpay_handle_redirect
        - dana_handle_redirect
        - shopeepay_handle_redirect
        - gcash_handle_redirect
        - rabbit_line_pay_handle_redirect
        - alipay_hk_handle_redirect
        - bpi_handle_redirect
        - pix_handle_redirect
        - oxxo_handle_redirect
        - spei_display_details
      description: >-
        If present, this property tells you what actions you need to take in
        order for your customer to fulfill a payment using the provided source.
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    Payment Method:
      type: object
      properties:
        id: &ref_2
          type: string
          description: Unique identifier for the object, like 'pm_xxxxx'
        object: &ref_3
          type: string
          description: '''payment method'''
        created: &ref_4
          type: integer
          description: >-
            Time at which the object was created. Measured in seconds since the
            Unix epoch.
        customer: &ref_5
          type: string
          description: >-
            The ID of the Customer to which this PaymentMethod is saved. This
            will not be set when the PaymentMethod has not been saved to a
            Customer.
        metadata:
          type: object
          properties: {}
          x-apifox-orders: &ref_6 []
          description: >-
            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.
          x-apifox-ignore-properties: []
        livemode: &ref_7
          type: boolean
          description: >-
            Has the value true  if the object exists in live mode or the value
            false  if the object exists in test mode.
        billing_details: *ref_0
        type:
          type: string
          description: >-
            The type of the PaymentMethod. An additional object is included on
            the PaymentMethod with a name matching this value. It contains
            additional information specific to the PaymentMethod type. 
          enum: &ref_8
            - card
            - alipayplus
            - alipay
            - wechat_pay
            - sepa_debit
            - alipay_hk
            - boost
            - truemoney
            - gcash
            - kakaopay
            - touchngo
            - rabbit_line_pay
            - dana
            - klarna
            - ideal
            - giropay
            - sofort
            - eps
            - trustly
            - bancontact
            - p24
            - unionpay
            - fpx
            - mcash
            - grabpay
            - bank_transfer_id
            - qris
            - promptpay
            - ovo
            - shopeepay
            - upi
            - boleto
            - paynow
            - pix
            - 9pay
            - stitch
            - bpi
          x-apifox-enum:
            - value: card
              name: ''
              description: To use value 'card', you must be PCI Compliant.
            - value: alipayplus
              name: ''
              description: ''
            - value: alipay
              name: ''
              description: ''
            - value: wechat_pay
              name: ''
              description: ''
            - value: sepa_debit
              name: ''
              description: ''
            - value: alipay_hk
              name: ''
              description: ''
            - value: boost
              name: ''
              description: ''
            - value: truemoney
              name: ''
              description: ''
            - value: gcash
              name: ''
              description: ''
            - value: kakaopay
              name: ''
              description: ''
            - value: touchngo
              name: ''
              description: ''
            - value: rabbit_line_pay
              name: ''
              description: ''
            - value: dana
              name: ''
              description: ''
            - value: klarna
              name: ''
              description: ''
            - value: ideal
              name: ''
              description: ''
            - value: giropay
              name: ''
              description: ''
            - value: sofort
              name: ''
              description: ''
            - value: eps
              name: ''
              description: ''
            - value: trustly
              name: ''
              description: ''
            - value: bancontact
              name: ''
              description: ''
            - value: p24
              name: ''
              description: ''
            - value: unionpay
              name: ''
              description: ''
            - value: fpx
              name: ''
              description: ''
            - value: mcash
              name: ''
              description: ''
            - value: grabpay
              name: ''
              description: ''
            - value: bank_transfer_id
              name: ''
              description: ''
            - value: qris
              name: ''
              description: ''
            - value: promptpay
              name: ''
              description: ''
            - value: ovo
              name: ''
              description: ''
            - value: shopeepay
              name: ''
              description: ''
            - value: upi
              name: ''
              description: ''
            - value: boleto
              name: ''
              description: ''
            - value: paynow
              name: ''
              description: ''
            - value: pix
              name: ''
              description: ''
            - value: 9pay
              name: ''
              description: ''
            - value: stitch
              name: ''
              description: ''
            - value: bpi
              name: ''
              description: ''
        card:
          type: object
          x-apifox-refs: &ref_9 {}
          x-apifox-orders: &ref_10
            - brand
            - checks
            - country
            - exp_month
            - exp_year
            - fingerprint
            - funding
            - last4
            - metadata
          properties:
            brand: &ref_11
              type: string
              description: >-
                American Express, Diners Club, Discover, JCB, MasterCard,
                UnionPay, Visa, or Unknown
            checks:
              type: object
              properties:
                address_line1_check: &ref_12
                  type: string
                  description: "If a address line1 was provided, results of the check, one of\_pass,\_fail,\_unavailable, or\_unchecked."
                address_zip_check: &ref_13
                  type: string
                  description: "If a address postal code was provided, results of the check, one of\_pass,\_fail,\_unavailable, or\_unchecked."
                cvc_check: &ref_14
                  type: string
              x-apifox-orders: &ref_15
                - address_line1_check
                - address_zip_check
                - cvc_check
              x-apifox-ignore-properties: []
            country: &ref_16
              type: string
              description: >-
                Two-letter ISO code representing the country of the card. You
                could use this attribute to get a sense of the international
                breakdown of cards you’ve collected.
            exp_month: &ref_17
              type: integer
              description: Two-digit number representing the card’s expiration month.
            exp_year: &ref_18
              type: integer
              description: Four-digit number representing the card’s expiration year.
            fingerprint: &ref_19
              type: string
              description: Uniquely identifies this particular card number.
            funding: &ref_20
              type: string
              description: Can be credit, debit, prepaid, or unknown.
            last4: &ref_21
              type: string
              description: The last four digits of the card.
            metadata:
              type: object
              properties: {}
              x-apifox-orders: &ref_22 []
              description: >-
                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.
              x-apifox-ignore-properties: []
          description: >-
            If this is a card  PaymentMethod, this object contains the user’s
            card details.
          x-apifox-ignore-properties: []
      x-apifox-orders:
        - id
        - object
        - created
        - customer
        - metadata
        - livemode
        - billing_details
        - type
        - card
      required:
        - type
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    Setup Intent:
      type: object
      properties:
        id:
          type: string
          description: >-
            [RETRIEVABLE WITH PK] Unique identifier for the object, like
            ""seti_xxxxx".
        object:
          type: string
          description: '[RETRIEVABLE WITH PK] "setup_intent"'
        cancellation_reason:
          type: string
          description: >-
            [RETRIEVABLE WITH PK] Reason for cancellation of this SetupIntent,
            one of abandoned, requested_by_customer, or duplicate.
        client_secret:
          type: string
          description: >-
            [RETRIEVABLE WITH PK] 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.
        created:
          type: integer
          description: >-
            [RETRIEVABLE WITH PK] Time at which the object was created. Measured
            in seconds since the Unix epoch.
        customer:
          type: string
          description: >-
            [EXPANDABLE] 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.
        description:
          type: string
          description: >-
            [RETRIEVABLE WITH PK] An arbitrary string attached to the object.
            Often useful for displaying to users.
        last_setup_error:
          type: object
          properties:
            code:
              type: string
              description: >-
                For some errors that could be handled programmatically, a short
                string indicating the error code reported.
            decline_code:
              type: string
              description: >-
                For card errors resulting from a card issuer decline, a short
                string indicating the card issuer’s reason for the decline if
                they provide one.
            message:
              type: string
              description: >-
                A human-readable message providing more details about the error.
                For card errors, these messages can be shown to your users.
            param:
              type: string
              description: >-
                If the error is parameter-specific, the parameter related to the
                error. For example, you can use this to display a message near
                the correct form field.
            payment_method:
              type: object
              x-apifox-refs:
                01GKKX6XH9BQ64XZ46CX10J38V: *ref_1
              properties:
                id: *ref_2
                object: *ref_3
                created: *ref_4
                customer: *ref_5
                metadata:
                  type: object
                  properties: {}
                  x-apifox-orders: *ref_6
                  description: >-
                    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.
                  x-apifox-ignore-properties: []
                livemode: *ref_7
                billing_details: *ref_0
                type:
                  type: string
                  description: >-
                    The type of the PaymentMethod. An additional object is
                    included on the PaymentMethod with a name matching this
                    value. It contains additional information specific to the
                    PaymentMethod type. 
                  enum: *ref_8
                  x-apifox-enum:
                    - value: card
                      name: ''
                      description: To use value 'card', you must be PCI Compliant.
                    - value: alipayplus
                      name: ''
                      description: ''
                    - value: alipay
                      name: ''
                      description: ''
                    - value: wechat_pay
                      name: ''
                      description: ''
                    - value: sepa_debit
                      name: ''
                      description: ''
                    - value: alipay_hk
                      name: ''
                      description: ''
                    - value: boost
                      name: ''
                      description: ''
                    - value: truemoney
                      name: ''
                      description: ''
                    - value: gcash
                      name: ''
                      description: ''
                    - value: kakaopay
                      name: ''
                      description: ''
                    - value: touchngo
                      name: ''
                      description: ''
                    - value: rabbit_line_pay
                      name: ''
                      description: ''
                    - value: dana
                      name: ''
                      description: ''
                    - value: klarna
                      name: ''
                      description: ''
                    - value: ideal
                      name: ''
                      description: ''
                    - value: giropay
                      name: ''
                      description: ''
                    - value: sofort
                      name: ''
                      description: ''
                    - value: eps
                      name: ''
                      description: ''
                    - value: trustly
                      name: ''
                      description: ''
                    - value: bancontact
                      name: ''
                      description: ''
                    - value: p24
                      name: ''
                      description: ''
                    - value: unionpay
                      name: ''
                      description: ''
                    - value: fpx
                      name: ''
                      description: ''
                    - value: mcash
                      name: ''
                      description: ''
                    - value: grabpay
                      name: ''
                      description: ''
                    - value: bank_transfer_id
                      name: ''
                      description: ''
                    - value: qris
                      name: ''
                      description: ''
                    - value: promptpay
                      name: ''
                      description: ''
                    - value: ovo
                      name: ''
                      description: ''
                    - value: shopeepay
                      name: ''
                      description: ''
                    - value: upi
                      name: ''
                      description: ''
                    - value: boleto
                      name: ''
                      description: ''
                    - value: paynow
                      name: ''
                      description: ''
                    - value: pix
                      name: ''
                      description: ''
                    - value: 9pay
                      name: ''
                      description: ''
                    - value: stitch
                      name: ''
                      description: ''
                    - value: bpi
                      name: ''
                      description: ''
                card:
                  type: object
                  x-apifox-refs: *ref_9
                  x-apifox-orders: *ref_10
                  properties:
                    brand: *ref_11
                    checks:
                      type: object
                      properties:
                        address_line1_check: *ref_12
                        address_zip_check: *ref_13
                        cvc_check: *ref_14
                      x-apifox-orders: *ref_15
                      x-apifox-ignore-properties: []
                    country: *ref_16
                    exp_month: *ref_17
                    exp_year: *ref_18
                    fingerprint: *ref_19
                    funding: *ref_20
                    last4: *ref_21
                    metadata:
                      type: object
                      properties: {}
                      x-apifox-orders: *ref_22
                      description: >-
                        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.
                      x-apifox-ignore-properties: []
                  description: >-
                    If this is a card  PaymentMethod, this object contains the
                    user’s card details.
                  x-apifox-ignore-properties: []
              x-apifox-orders:
                - 01GKKX6XH9BQ64XZ46CX10J38V
              description: >-
                The PaymentMethod object for errors returned on a request
                involving a PaymentMethod.
              required:
                - type
              x-apifox-ignore-properties:
                - id
                - object
                - created
                - customer
                - metadata
                - livemode
                - billing_details
                - type
                - card
            payment_method_type:
              type: string
              description: >-
                If the error is specific to the type of payment method, the
                payment method type that had a problem. 
            type:
              type: string
              description: >-
                The type of error returned. One of api_error, card_error,
                idempotency_error, or invalid_request_error
          description: >-
            [RETRIEVABLE WITH PK] The error encountered in the previous
            SetupIntent confirmation.
          x-apifox-orders:
            - code
            - decline_code
            - message
            - param
            - payment_method
            - payment_method_type
            - type
          required:
            - code
            - decline_code
            - message
            - param
            - payment_method_type
            - type
          x-apifox-ignore-properties: []
        latest_attempt:
          type: string
          description: '[EXPANDABLE] The most recent SetupAttempt for this SetupIntent.'
        livemode:
          type: boolean
          description: >-
            [RETRIEVABLE WITH PK] Has the value true if the object exists in
            live mode or the value false if the object exists in test mode.
        mandate:
          type: string
          description: >-
            [EXPANDABLE] ID of the multi use Mandate generated by the
            SetupIntent.
        metadata:
          type: object
          properties: {}
          x-apifox-orders: []
          description: >-
            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.
          x-apifox-ignore-properties: []
        next_action: *ref_23
        payment_method:
          type: string
          description: >-
            [EXPANDABLE][RETRIEVABLE WITH PK] ID of the payment method used with
            this SetupIntent.
        payment_method_options:
          type: object
          properties:
            card:
              type: object
              properties:
                request_three_d_secure:
                  type: string
                  description: >-
                    Values can be auto, any, void When a user selects the void
                    option, Wooshpay will still perform 3DS if it encounters a
                    policy.
              x-apifox-orders:
                - request_three_d_secure
              x-apifox-ignore-properties: []
          x-apifox-orders:
            - card
          description: Payment-method-specific configuration for this SetupIntent.
          x-apifox-ignore-properties: []
        payment_method_types:
          type: array
          items:
            type: string
          description: >-
            The list of payment method types (e.g. card) that this SetupIntent
            is allowed to set up.
        single_use_mandate:
          type: string
          description: >-
            [EXPANDABLE] ID of the single_use Mandate generated by the
            SetupIntent.
        status:
          type: string
          description: >-
            [RETRIEVABLE WITH PK] Status of this SetupIntent, one of
            requires_payment_method, requires_confirmation, requires_action,
            processing, canceled, or succeeded.
        usage:
          type: string
          description: >-
            [RETRIEVABLE WITH PK] 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.
        return_url:
          type: string
          description: The url that the cutomer will be redirected to.
        attach_to_self:
          type: string
          description: >-
            （未实现）If present, the SetupIntent’s payment method will be attached
            to the in-context account.
        flow_directions:
          type: array
          description: >-
            （未实现）Indicates the directions of money movement for which this
            payment method is intended to be used.
          items:
            type: string
        application:
          type: string
          description: （未实现）
        on_behalf_of:
          type: string
          description: >-
            （未实现）[EXPANDABLE] The account (if any) for which the setup is
            intended.
      x-apifox-orders:
        - id
        - object
        - cancellation_reason
        - client_secret
        - created
        - customer
        - description
        - last_setup_error
        - latest_attempt
        - livemode
        - mandate
        - metadata
        - next_action
        - payment_method
        - payment_method_options
        - payment_method_types
        - single_use_mandate
        - status
        - usage
        - return_url
        - attach_to_self
        - flow_directions
        - application
        - on_behalf_of
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
  securitySchemes:
    basic:
      type: http
      scheme: basic
servers:
  - url: https://apitest.wooshpay.com
    description: 官网测试
security:
  - basic: []

```
