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

# Create a new payment method



## OpenAPI

````yaml /openapi.json post /api/v1/payment-methods
openapi: 3.0.0
info:
  title: Mr Monei API Gateway
  description: External API for partners using API Key authentication
  version: '1.0'
  contact: {}
servers:
  - url: https://api.dev.monei.cc
    description: Dev Server
  - url: https://api.monei.cc
    description: Live Server
security: []
tags: []
paths:
  /api/v1/payment-methods:
    post:
      tags:
        - Payment Methods
      summary: Create a new payment method
      operationId: PaymentMethodController_createPaymentMethod
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePaymentMethodDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentMethodResponseDto'
      security:
        - api-key: []
        - bearer: []
components:
  schemas:
    CreatePaymentMethodDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - VIRTUAL_ACCOUNT
            - CARD
            - BANK_TRANSFER
            - USSD
            - CRYPTO_WALLET
        subWalletId:
          type: string
        nickname:
          type: string
        card:
          $ref: '#/components/schemas/AddCardDto'
        ussd:
          $ref: '#/components/schemas/AddUssdDto'
        virtualAccountId:
          type: string
      required:
        - type
        - subWalletId
        - card
    PaymentMethodResponseDto:
      type: object
      properties:
        statusCode:
          type: number
        message:
          type: string
        data:
          $ref: '#/components/schemas/PaymentMethodDto'
        errors:
          type: object
      required:
        - statusCode
        - message
        - data
        - errors
    AddCardDto:
      type: object
      properties:
        cardNumber:
          type: string
        cvv:
          type: string
        expiryMonth:
          type: string
        expiryYear:
          type: string
        cardHolderName:
          type: string
      required:
        - cardNumber
        - cvv
        - expiryMonth
        - expiryYear
        - cardHolderName
    AddUssdDto:
      type: object
      properties:
        bankCode:
          type: string
      required:
        - bankCode
    PaymentMethodDto:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - VIRTUAL_ACCOUNT
            - CARD
            - BANK_TRANSFER
            - USSD
            - CRYPTO_WALLET
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
            - PENDING_VERIFICATION
            - SUSPENDED
        isDefault:
          type: boolean
        nickname:
          type: string
        isEnabled:
          type: boolean
        lastUsedAt:
          format: date-time
          type: string
        usageCount:
          type: number
        capabilities:
          type: object
        details:
          type: object
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
      required:
        - id
        - type
        - status
        - isDefault
        - nickname
        - isEnabled
        - lastUsedAt
        - usageCount
        - capabilities
        - details
        - createdAt
        - updatedAt
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: X-API-KEY

````