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

# Post paymentssetup payment method



## OpenAPI

````yaml /openapi.json post /payments/setup-payment-method
openapi: 3.0.0
info:
  title: Korint Documentation
  description: Korint API Documentation
  version: 1.0.0
  contact: {}
servers: []
security:
  - bearerAuth: []
tags: []
paths:
  /payments/setup-payment-method:
    post:
      tags:
        - payments
        - debug
      operationId: PaymentsController_setupIntent
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetupIntentInputBody'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SetupIntentOutput'
        '404':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/StripeCustomerNotFoundErrorDto'
              examples:
                STRIPE_CUSTOMER_NOT_FOUND:
                  $ref: '#/components/schemas/StripeCustomerNotFoundErrorDto'
          description: ''
components:
  schemas:
    SetupIntentInputBody:
      type: object
      properties:
        metadata:
          description: metadata assigned to the object
          type: array
          items:
            $ref: '#/components/schemas/Metadata'
        stripeCustomerId:
          type: string
          description: the id of the customer
        allowedPaymentMethods:
          description: the allowed payment methods
          type: array
          items:
            type: string
      required:
        - metadata
        - stripeCustomerId
        - allowedPaymentMethods
    SetupIntentOutput:
      type: object
      properties:
        clientSecret:
          type: string
          description: the created intent client secret
        id:
          type: string
          description: the id of the intent
      required:
        - clientSecret
        - id
    StripeCustomerNotFoundErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - STRIPE_CUSTOMER_NOT_FOUND
        message:
          type: string
          example: Customer {customerId} not found
        details:
          $ref: '#/components/schemas/StripeCustomerNotFoundDetailsDto'
      required:
        - code
        - message
        - details
    Metadata:
      type: object
      properties:
        key:
          type: string
          description: the key of the metadata
        value:
          type: string
          description: the value of the metadata
      required:
        - key
        - value
    StripeCustomerNotFoundDetailsDto:
      type: object
      properties:
        customerId:
          type: string
      required:
        - customerId

````