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

# Register a payment instrument for a customer

> Accepts a Basis Theory vault token id only (`vaultToken.id`). Do not send a vault provider field.



## OpenAPI

````yaml /openapi.json post /payment-instruments
openapi: 3.0.0
info:
  title: PayGood Merchant API
  description: Server-to-server integration surface for merchant API keys.
  version: '1.0'
  contact: {}
servers:
  - url: https://api-sandbox.paygood.co
    description: Sandbox
  - url: https://api.paygood.co
    description: Production
security: []
paths:
  /payment-instruments:
    post:
      tags:
        - payment-instruments
      summary: Register a payment instrument for a customer
      description: >-
        Accepts a Basis Theory vault token id only (`vaultToken.id`). Do not
        send a vault provider field.
      operationId: PaymentInstrumentsController_create
      parameters: []
      requestBody:
        required: true
        description: >-
          Payment instrument registration payload. `vaultToken` is `{ id }`
          only; Basis Theory is inferred server-side.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePaymentInstrumentDto'
            examples:
              registerCard:
                summary: Register a card instrument
                value:
                  vaultToken:
                    id: bt_card_token_abc123
                  instrumentHolderName: Amina Diallo
                  customerId: cust_01hxy8m1nqk9g3x3y3p0azq2zz
                  idempotencyKey: idem-pi-01
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentInstrumentResponseDto'
      security:
        - bearer: []
components:
  schemas:
    CreatePaymentInstrumentDto:
      type: object
      properties:
        vaultToken:
          type: object
          properties:
            id:
              type: string
              minLength: 1
              description: Basis Theory token id from the client Element
          required:
            - id
          description: >-
            Vault token reference. Send the Basis Theory token id only; provider
            is inferred server-side.
        instrumentHolderName:
          type: string
          minLength: 1
          description: >-
            Name on the instrument (cardholder or bank account owner) —
            forwarded to Finix PI name
        customerId:
          type: string
        idempotencyKey:
          type: string
          minLength: 1
      required:
        - vaultToken
        - instrumentHolderName
        - customerId
        - idempotencyKey
    PaymentInstrumentResponseDto:
      type: object
      properties:
        paymentInstrumentId:
          type: string
        type:
          type: string
          enum:
            - card
            - bank_account
        displayDetails:
          oneOf:
            - type: object
              properties:
                kind:
                  type: string
                  enum:
                    - card
                brand:
                  type: string
                last4:
                  type: string
                expiryMonth:
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                expiryYear:
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
              required:
                - kind
                - brand
                - last4
                - expiryMonth
                - expiryYear
            - type: object
              properties:
                kind:
                  type: string
                  enum:
                    - bank_account
                last4:
                  type: string
                scheme:
                  type: string
                  enum:
                    - us_domestic
                    - ca_eft
                    - gb_domestic
                    - iban
                  description: Bank account scheme (us_domestic, ca_eft, gb_domestic, iban)
                bankName:
                  type: string
              required:
                - kind
                - last4
                - scheme
        status:
          type: string
          enum:
            - pending
            - active
            - failed
            - disabled
        createdAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
      required:
        - paymentInstrumentId
        - type
        - displayDetails
        - status
        - createdAt
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: merchant_<prefix>_<secret>
      type: http
      description: >-
        Merchant API key bearer token. Legacy wire prefixes `api_key_` and
        `api_` are also accepted.

````