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

# Register card

> Registers a card as a new receiving method.



## OpenAPI

````yaml /raas/swagger-partner.json post /user/funding/source/card/add/{userToken}
openapi: 3.0.0
info:
  title: ''
  version: 0.0.1
servers:
  - url: https://raas-partner-cv.nomas.cash/v1
security: []
paths:
  /user/funding/source/card/add/{userToken}:
    post:
      tags:
        - Funding
      summary: Register card
      description: Registers a card as a new receiving method.
      operationId: createFundingCard
      parameters:
        - description: User token.
          in: path
          name: userToken
          required: true
          schema:
            type: string
      requestBody:
        description: Card data (encrypted/raw) to add.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddCardPartnerParams'
            example:
              cardtype: CreditCard
              number: TOK_SANDBOX_9PNaaaqpqwertnD1jYkdw1_1234
              isPrimary: true
              expirationDate: '0629'
              country: US
              nameOnCard: PEDRO ALFONSO MOCK ITSOK
              cardNetwork: Visa
              securityCode: ''
              name: Visa-1111
      responses:
        '200':
          description: >-
            **200 — OK.** Card registered or existing card returned.


            **Scenarios for this response**:


            | Scenario | How to reproduce | Typical `code` / body |

            |------------|------------------|------------------------|

            | Valid card / duplicate | Processor accepts or returns existing PM.
            | `RaaSPaymentMethod` |


            See also [Full scenario
            matrix](/raas/guides/testing-sandbox#create-funding-card-scenario-matrix).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RaaSPaymentMethod'
              example:
                id: b28cd13a-df67-46db-9f2d-c48e634789d6
                name: VISA-1111
                isPrimary: true
                latitude: 0
                longitude: 0
                number: tok_sandbox_9PNgfqqpdpyQpnD1jYkdw1_1111
                nameOnCard: PEDRO ALFONSO MOCK ITSOK
                expirationDate: '1228'
                expirationYear: '28'
                expirationMonth: '12'
                securityCode: ''
                cardNetwork: Visa
                allowPushCrossBorder: true
                allowPushDomestic: true
                allowReviewAddress: false
                accountId: ''
                externalId: E1678D6DA1284CF39FD241E6509F4518000000
                type: DebitCard
                status: ValidatedPush
                country: MX
                createdAt: null
                updatedAt: null
        '400':
          description: >-
            **400 — Bad request.**


            **Scenarios for this response**:


            | Scenario | How to reproduce | Typical `code` / body |

            |------------|------------------|------------------------|

            | User not found | Unknown `userToken`. | `USER_NOT_FOUND` |

            | Invalid expiry / card | `validateCardExpiration` or processor
            decline. | Card error payload |

            | Processor decline | `registerAndValidate*` failure paths. | Parsed
            `badResponse` body |


            See also [Full scenario
            matrix](/raas/guides/testing-sandbox#create-funding-card-scenario-matrix).
          content:
            application/json:
              schema:
                properties: {}
                type: object
              example:
                reason: Card validation or processor decline.
        '401':
          description: >-
            **401 — Unauthorized.**


            **Scenarios for this response**:


            | Scenario | How to reproduce | Typical `code` / body |

            |------------|------------------|------------------------|

            | Missing / bad API key | Omit `api_key` or key without
            `partner_send` / `partner` scope as required. | OpenAPI `401` via
            `@Response<ErrorResponse>`. |


            See also [Full scenario
            matrix](/raas/guides/testing-sandbox#create-funding-card-scenario-matrix).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                reason: Missing or invalid API key
        '500':
          description: >-
            **500 — Internal server error.**


            **Scenarios for this response**:


            | Scenario | How to reproduce | Typical `code` / body |

            |------------|------------------|------------------------|

            | Unexpected | Non-`NumiBadRequestError` errors. |
            `ERROR_INTERNAL_SERVER_ERROR` |


            See also [Full scenario
            matrix](/raas/guides/testing-sandbox#create-funding-card-scenario-matrix).
          content:
            application/json:
              schema:
                properties:
                  reason:
                    type: string
                required:
                  - reason
                type: object
              example:
                reason: An unhandled error has occurred
      security:
        - api_key:
            - partner_send
            - partner
components:
  schemas:
    AddCardPartnerParams:
      properties:
        name:
          type: string
          description: |-
            Card name.
            Example: `VISA-1234`.
        cardtype:
          type: string
          enum:
            - DebitCard
            - CreditCard
          description: Card type.
        type:
          type: string
          enum:
            - DebitCard
            - CreditCard
          description: Payment method type.
        number:
          type: string
          description: |-
            Tokenized card number by VGS.
            Example: `tok_sandbox_9PNgfqqpqwertnD1jYkdw1_1111`.
        isPrimary:
          type: boolean
          description: Is primary payment method?
        nameOnCard:
          type: string
          description: |-
            Card holder name.
            Example: `John Doe`.
        expirationDate:
          type: string
          description: |-
            Card expiration date. `MMYY` format.
            Example: `0631`.
        expirationYear:
          type: string
          description: |-
            Card expiration year. `YY` format. 
            Example: `31`.
        expirationMonth:
          type: string
          description: |-
            Card expiration month. `MM` format.
            Example: `06`.
        securityCode:
          type: string
          description: |-
            Tokenized CVV/CVC security code by VGS.
            Example: `tok_sandbox_brucMoj9eTJR3xhqdmM4AQ`.
        currency:
          type: string
          description: |-
            Currency code. `ISO-4217 format`.
            Example: `USD`.
        country:
          type: string
          description: |-
            Country code. `ISO-3166-1 alpha-2 format`.
            Example: `US` for United States, `MX` for Mexico.
        operationId:
          type: string
          description: |-
            Associated Operation ID (if applicable).
            Example: `guid-1234567890`.
        cardNetwork:
          type: string
          enum:
            - NotApplicable
            - UATP
            - Visa
            - ChinaUnionPay
            - InterPayment
            - DiscoverCard
            - Dankort
            - Cardguard
            - MIR
            - MasterCard
            - Verve
            - InstaPayment
            - Maestro
            - DinersClubInternational
            - AmericanExpress
            - JCB
            - TROY
          description: Card network.
      required:
        - name
        - cardtype
        - number
        - nameOnCard
        - expirationDate
        - country
        - cardNetwork
      type: object
      additionalProperties: false
    RaaSPaymentMethod:
      properties:
        canOperate:
          type: boolean
          description: If Credit/Debit Card can operate.
        paymentMethodOwner:
          type: string
          description: |-
            VNA method owner

            Example: `BCP`.
        allowReviewAddress:
          type: boolean
          description: If Credit/Debit Card allows review address.
        allowPushDomestic:
          type: boolean
          description: If Credit/Debit Card allows push domestic.
        allowPushCrossBorder:
          type: boolean
          description: If Credit/Debit Card allows push cross border.
        allowPullDomestic:
          type: boolean
          description: If Credit/Debit Card allows pull domestic.
        allowPullCrossBorder:
          type: boolean
          description: If Credit/Debit Card allows pull cross border.
        accountPrefix:
          type: string
        bin:
          type: string
        paymentToken:
          $ref: '#/components/schemas/PaymentToken'
          description: >-
            The paymentToken field is only for capturing data from mobile, it
            won't send to numi plat
        status:
          $ref: '#/components/schemas/PaymentMethodStatus'
        application:
          type: string
          description: Application associated with the payment method.
        accountId:
          type: string
          description: Account ID associated with the payment method.
        longitude:
          type: number
          format: double
          description: Address longitude of the payment method.
        latitude:
          type: number
          format: double
          description: Address latitude of the payment method.
        phoneNumber:
          type: string
          description: >-
            Mobile phone number associated with the payment method. Must be a
            valid mobile phone number.


            Example: `+5215521206703` for MX.
        country:
          type: string
          description: |-
            Country code.

            ISO 3166-1 alpha-2 format.
            Example: `US` for United States, `MX` for Mexico.
        zipCode:
          type: string
        state:
          type: string
          description: |-
            Address state/province/department.
            ISO 3166-2:CC (CC: country code).
            Or the state short name.
            Example: `DF` for Distrito Federal, `JA` for Jalisco.
        city:
          type: string
        streetNumber:
          type: string
        address3:
          type: string
        address2:
          type: string
        address1:
          type: string
        currency:
          type: string
          description: |-
            Currency code.

            ISO 4217 format.
            Example: `USD` for United States Dollar, `MXN` for Mexican Peso.
        externalId:
          type: string
        cardNetwork:
          type: string
          description: >-
            Credit/Debit card network


            Example: `Visa`, `MasterCard`, `American Express`, `Discover`,
            `Diners Club`, `JCB`, `UnionPay`, `Maestro`, `Mir`, `Verve`, `Troy`,
            `UATP`.
        cardtype:
          type: string
          enum:
            - DebitCard
            - CreditCard
          description: Credit/Debit card type
        securityCode:
          type: string
          description: |-
            Credit/Debit tokenized card CVV/CVC security code by VGS.
            Example: `tok_sandbox_brucMoj9eTJR3xhqdmM4AQ`.
        expirationMonth:
          type: string
          description: Credit/Debit card expiration month
        expirationYear:
          type: string
          description: Credit/Debit card expiration year
        expirationDate:
          type: string
          description: Credit/Debit card expiration date
        nameOnCard:
          type: string
          description: Credit/Debit card holder name.
        number:
          type: string
          description: |-
            If Credit/Debit, this is the tokenized card number by VGS.
            If UBN/VNA/CLABE, this is the number on clear text.

            Example: `tok_sandbox_9PNgfqqpqwertnD1jYkdw1_1111`.
        beneficiaryAccountId:
          type: string
        tokenData:
          type: string
        cardType:
          type: string
          enum:
            - DebitCard
            - CreditCard
        accountNumber:
          type: string
        bankEntityNumber:
          type: string
        bankName:
          type: string
        bankAccountType:
          type: string
          enum:
            - CheckingAccount
            - SavingsAccount
            - OtherAccount
        updatedAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
          description: Created at
        isPrimary:
          type: boolean
          description: Is primary payment method?
        type:
          $ref: '#/components/schemas/AvailablePaymentMethods'
          description: |-
            Payment method type

            Type of the payment method.
        name:
          type: string
          description: |-
            Payment method name

            Name of the payment method. Example `VISA-1234`.
        id:
          type: string
          description: Payment method ID
      required:
        - type
      type: object
      description: >-
        Base fields that can appear on any payment method.

        Discriminated variants (DebitCard, CreditCard, UBN, etc.) extend this
        and add required fields per type.
    ErrorResponse:
      properties:
        detail:
          type: string
        code:
          type: string
        reason:
          type: string
      required:
        - code
        - reason
      type: object
    PaymentToken:
      properties:
        paymentType:
          $ref: '#/components/schemas/PaymentMethodType'
          description: >-

            Type of the payment method.


            Example: `DebitCard`, `CreditCard`, `BankAccount`, `MobileWallet`,
            `CashLoadLocation`, `AppleDigitalWallet`, `GoogleDigitalWallet`,
            `CLABE`, `UBN`, `VirtualNetworkAccount`.
        displayName:
          type: string
          description: Display name
        transactionIdentifier:
          type: string
          description: Transaction identifier
        paymentNetwork:
          type: string
          description: Payment network
        data:
          type: string
          description: Payment token data
      required:
        - data
      type: object
    PaymentMethodStatus:
      type: string
      enum:
        - Created
        - Validated
        - Blocked
        - Validating
        - Removed
        - Disconnected
        - ValidationNotApproved
        - ValidatedPull
        - ValidatedPush
        - ValidatedPullAndPush
    AvailablePaymentMethods:
      type: string
      enum:
        - MobileWallet
        - BankAccount
        - DebitCard
        - CreditCard
        - CashLoadLocation
        - AppleDigitalWallet
        - GoogleDigitalWallet
        - CLABE
        - UBN
        - VirtualNetworkAccount
    PaymentMethodType:
      enum:
        - 0
        - 1
        - 2
        - 3
        - 4
        - 5
      type: number
  securitySchemes:
    api_key:
      type: apiKey
      name: api_key
      in: header

````