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

# Create payment method

> Create payment method



## OpenAPI

````yaml oms_v1 post /ext-stripe/payment-method
openapi: 3.0.0
info:
  description: Order Management System
  version: 1.0.0
  title: Orders v1 (OMS v1)
  contact:
    email: oms-team@fabric.inc
  license:
    name: fabric API license
    url: https://fabric.inc/api-license
servers:
  - url: https://prod01-apigw.{customer_name}.fabric.zone
    description: Production
    variables:
      customer_name:
        default: yourcompany
        description: Customer name, provided by support team
security: []
tags:
  - name: Cart
    description: >-
      Cart APIs<br /><br />**Note:** These are the legacy Cart APIs. To view
      fabric's new Cart APIs, navigate to *Cart API > Cart* from the left side
      navigation pane.
  - name: Bill To
    description: Bill To APIs [Deprecated]
  - name: Ship To
    description: >-
      Ship To APIs<br /><br />**Note:** These are the legacy Ship To APIs. To
      view fabric's new Shipping APIs, navigate to *Cart API > Shipping* from
      the left side navigation pane.
  - name: Wishlist
    description: Wishlist APIs
  - name: Cart Decoupled
    description: Cart Decoupled APIs
  - name: Warehouse
    description: Warehouse APIs
  - name: Inventory
    description: Inventory APIs
  - name: Attributes
    description: >-
      Attributes APIs<br /><br />**Note:** These are the legacy Attribute APIs.
      To view fabric's new Attribute APIs, navigate to *Cart API > Attribute*
      from the left side navigation pane.
  - name: List
    description: List APIs
  - name: Tax/Address Validate
    description: Tax/Address Validate APIs
  - name: Shipping
    description: Shipping APIs
  - name: Payments
    description: Payments APIs
  - name: Order
    description: Order APIs
paths:
  /ext-stripe/payment-method:
    post:
      tags:
        - Payments
      summary: Create payment method
      description: Create payment method
      operationId: createPaymentMethod
      parameters:
        - in: header
          name: x-api-key
          schema:
            type: string
            example: 0LybWR49k95cCwYh3cu0waCYoh4H2Eux2J52wn4k
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - au_becs_debit
                        - bacs_debit
                        - bancontact
                        - card
                        - eps
                        - fpx
                        - giropay
                        - ideal
                        - p24
                        - sepa_debit
                      default: card
                      example: card
                    metadata:
                      type: object
                      example:
                        keyName: key value
                    card:
                      type: object
                      required:
                        - number
                        - exp_month
                        - exp_year
                        - cvc
                      properties:
                        number:
                          type: string
                          example: '4242424242424242'
                        exp_month:
                          type: integer
                          minimum: 1
                          maximum: 12
                        exp_year:
                          oneOf:
                            - type: integer
                              minimum: 20
                              maximum: 99
                              example: 21
                            - type: integer
                              minimum: 2020
                              maximum: 9999
                              example: 2020
                        cvc:
                          type: string
                          minLength: 3
                          maxLength: 4
                          example: '021'
                - type: object
                  properties:
                    billing_details:
                      type: object
                      properties:
                        address:
                          type: object
                          required:
                            - line1
                            - city
                            - state
                            - country
                            - postal_code
                          properties:
                            line1:
                              type: string
                              example: 3520 Millenio
                            line2:
                              type: string
                              example: Crowley Drive
                            city:
                              type: string
                              example: Vancouver
                            state:
                              type: string
                              example: BC
                            country:
                              type: string
                              example: CA
                            postal_code:
                              type: string
                              example: V5R 6G9
                        name:
                          type: string
                          example: John Smith
                        email:
                          type: string
                          format: email
                          example: john@fabric.inc
                        phone:
                          type: string
                          example: 123-456-7890
      responses:
        '200':
          description: Created payment method
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      id:
                        type: string
                        example: pm_1Ij5zBJxr7zyIFb9u3cfbHJG
                      object:
                        type: string
                        example: payment_method
                      card:
                        type: object
                        properties:
                          brand:
                            type: string
                            example: visa
                          checks:
                            type: object
                            properties:
                              address_line1_check:
                                type: string
                                example: unchecked
                              address_postal_code_check:
                                type: string
                                example: unchecked
                              cvc_check:
                                type: string
                                example: unchecked
                          country:
                            type: string
                            example: US
                          exp_month:
                            type: number
                            example: 2
                          exp_year:
                            type: number
                            example: 2023
                          fingerprint:
                            type: string
                            example: lf55OlXOOfjcvjan
                          funding:
                            type: string
                            example: credit
                          generated_from:
                            type: string
                            example: null
                          last4:
                            type: string
                            example: '4242'
                          networks:
                            type: object
                            properties:
                              available:
                                type: array
                                items:
                                  type: string
                                  example: visa
                              preferred:
                                type: string
                                example: null
                          three_d_secure_usage:
                            type: object
                            properties:
                              supported:
                                type: boolean
                                example: true
                          wallet:
                            type: string
                            example: null
                      created:
                        type: number
                        example: 1619111201
                      customer:
                        type: string
                        example: null
                      livemode:
                        type: boolean
                        example: false
                      metadata:
                        type: object
                      type:
                        type: string
                        example: card
                  - type: object
                    properties:
                      billing_details:
                        type: object
                        properties:
                          address:
                            type: object
                            required:
                              - line1
                              - city
                              - state
                              - country
                              - postal_code
                            properties:
                              line1:
                                type: string
                                example: 3520 Millenio
                              line2:
                                type: string
                                example: Crowley Drive
                              city:
                                type: string
                                example: Vancouver
                              state:
                                type: string
                                example: BC
                              country:
                                type: string
                                example: CA
                              postal_code:
                                type: string
                                example: V5R 6G9
                          name:
                            type: string
                            example: John Smith
                          email:
                            type: string
                            format: email
                            example: john@fabric.inc
                          phone:
                            type: string
                            example: 123-456-7890
        '400':
          $ref: '#/components/responses/GenericClientError'
        '403':
          $ref: '#/components/responses/MissingXApiKeyHeader'
        '500':
          $ref: '#/components/responses/GenericServerError'
components:
  responses:
    GenericClientError:
      description: A generic client error
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                description: The error code
                type: string
              message:
                description: The error message
                type: string
    MissingXApiKeyHeader:
      description: Missing x-api-key in header
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                description: The error message
                example: Forbidden
                type: string
    GenericServerError:
      description: A generic server error
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                description: The error code
                type: string
              message:
                description: The error message
                type: string

````