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

# Create Card

> Create, map or replace cards for a specific customer.



## OpenAPI

````yaml openapi.json post /cards
openapi: 3.1.0
info:
  title: Sudo Sandbox API
  version: '1.0'
servers:
  - url: https://api.sandbox.sudo.cards
security:
  - sec0: []
paths:
  /cards:
    post:
      summary: Create Card
      description: Create, map or replace cards for a specific customer.
      operationId: create-card
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - customerId
                - type
                - currency
                - status
              properties:
                customerId:
                  type: string
                  description: The customer `_id`.
                fundingSourceId:
                  type: string
                  description: >-
                    The funding source `_id`. Required if you wish to map card
                    to an existing funding source.
                type:
                  type: string
                  description: The card type.
                  default: physical
                  enum:
                    - physical
                    - virtual
                brand:
                  type: string
                  description: The card brand.
                  enum:
                    - Verve
                    - AfriGo
                    - MasterCard
                    - Visa
                number:
                  type: string
                  description: >-
                    The card PAN (Verve or AfriGo) or Card ID (Visa). Required
                    if `type` is `physical`.
                enable2FA:
                  type: boolean
                  description: >-
                    Enable 2FA for the card, this enables the card to receive
                    OTP for web and mobile transactions.
                  default: false
                currency:
                  type: string
                  description: The currency type.
                  default: NGN
                  enum:
                    - NGN
                    - USD
                issuerCountry:
                  type: string
                  description: >-
                    3 Digits Issuer Country. `NGA` for Nigeria and `USA` for
                    United States. Defaults to `NGA`.
                  default: NGA
                  enum:
                    - NGA
                    - USA
                status:
                  type: string
                  description: The initial card status.
                  default: active
                  enum:
                    - active
                    - inactive
                metadata:
                  type: string
                  description: >-
                    The metadata object to attach to the card. Stored in
                    key-value pair
                  format: json
                spendingControls:
                  type: object
                  description: >-
                    Card spending controls.  Default usage limits will be
                    applied if non is provided.
                  properties:
                    allowedCategories:
                      type: array
                      description: Array of allowed categories (MCC).
                      default: []
                      items:
                        type: string
                    blockedCategories:
                      type: array
                      description: Array of blocked categories (MCC).
                      default: []
                      items:
                        type: string
                    channels:
                      type: object
                      description: Channels allowed to use card on
                      properties:
                        atm:
                          type: boolean
                          description: >-
                            Set to `true` to allow atm transactions. Otherwise,
                            set to `false`.
                          default: true
                        pos:
                          type: boolean
                          description: >-
                            Set to `true` to allow pos transactions. Otherwise,
                            set to `false`.
                          default: true
                        web:
                          type: boolean
                          description: >-
                            Set to `true` to allow web transactions. Otherwise,
                            set to `false`.
                          default: true
                        mobile:
                          type: boolean
                          description: Set to `true` to allow mobile transactions.
                          default: true
                    spendingLimits:
                      type: array
                      description: Array of spending limit objects.
                      items:
                        properties:
                          amount:
                            type: integer
                            description: The amount to set as limit.
                            format: int32
                          interval:
                            type: string
                            description: The limit interval.
                            default: daily
                            enum:
                              - daily
                              - weekly
                              - monthly
                              - yearly
                        required:
                          - amount
                          - interval
                        type: object
                bankCode:
                  type: string
                  description: >-
                    The bank code of existing account. Required if you wish to
                    map card to existing account.
                accountNumber:
                  type: string
                  description: >-
                    The account number of existing account. Required if you wish
                    to map card to existing account.
                replacementFor:
                  type: string
                  description: >-
                    The `_id` of the current card you wish to replace. Required
                    for card replacement.
                replacementReason:
                  type: string
                  description: The reason for replacement. Required for card replacement.
                  enum:
                    - lost
                    - stolen
                debitAccountId:
                  type: string
                  description: >-
                    Debit account `_id`. Required for all virtual cards and
                    giftcards.
                amount:
                  type: integer
                  description: Funding amount. Required for mastercard.
                  format: int32
                sendPINSMS:
                  type: boolean
                  description: Send default PIN to customer phone number via SMS.
                  default: false
                expirationDate:
                  type: string
                  description: >-
                    Card expiry date. Applies to Visa cards only. Format
                    `MMM-YYYY` example `AUG-2025`. All cards are subject to
                    maximum of 3 years validity.
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer
      x-default: '{{APIKey}}'

````