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

# Tokenize a Card

> In order to store your customers payment details, you need to pass some additional parameter when making the first payment request using the payments/tokenize endpoint, the Cvv field and pin are optional(this could be null). After the first  payment is made, the payment details is collected and a token is generated for it which is then stored for future use.



## OpenAPI

````yaml https://raw.githubusercontent.com/seerbit/openapi/master/specs/external-api.yml post /payments/tokenize
openapi: 3.0.1
info:
  title: SeerBit API Reference
  contact: {}
  version: '1.0'
servers:
  - url: https://seerbitapi.com/api/v2
security: []
tags:
  - name: AUTHENTICATION
  - name: STANDARD CHECKOUT
  - name: ORDER CHECKOUT
  - name: PAYMENT METHOD
  - name: MOMO
  - name: NON 3DS PAYMENT
  - name: CARD
  - name: ACCOUNT
  - name: TOKENIZE
  - name: AUTHORISE
  - name: PREAUTHORIZATION
  - name: RECURRENT
paths:
  /payments/tokenize:
    post:
      tags:
        - TOKENIZE
      summary: Tokenize a Card
      description: >-
        In order to store your customers payment details, you need to pass some
        additional parameter when making the first payment request using the
        payments/tokenize endpoint, the Cvv field and pin are optional(this
        could be null). After the first  payment is made, the payment details is
        collected and a token is generated for it which is then stored for
        future use.
      operationId: TokenizeaCard
      requestBody:
        content:
          application/json:
            schema:
              type: object
            examples:
              TokenizeaCardRequest:
                $ref: '#/components/examples/TokenizeaCardRequest'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenizeCardResponse'
        '400':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                type: object
              examples:
                400Response:
                  $ref: '#/components/examples/400Response'
                400Response9:
                  $ref: '#/components/examples/400Response9'
                400Response10:
                  $ref: '#/components/examples/400Response10'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenizeCard401Response'
        '403':
          description: Missing Header Token
          content:
            application/json:
              schema:
                type: object
              examples:
                403Response3:
                  $ref: '#/components/examples/403Response3'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
              examples:
                404Response1:
                  $ref: '#/components/examples/404Response1'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
              examples:
                500Response:
                  $ref: '#/components/examples/500Response'
      deprecated: false
      security:
        - Basic: []
components:
  examples:
    TokenizeaCardRequest:
      summary: 3DSAuthorise Request payload
      value:
        publicKey: SBPUBK_OMX6ZNRZPLIHQ9Y0ZG6FCNR0EAYIGIAT
        amount: '0.00'
        fullName: john doe
        mobileNumber: 8033456599
        currency: NGN
        country: NG
        paymentReference: KES0092992991
        email: johndoe@gmail.com
        productId: Foods
        productDescription: RASPBERRY
        cardNumber: '5123450000000008'
        cvv: '100'
        expiryMonth: '05'
        expiryYear: '21'
    400Response:
      summary: An example of 400 response payload
      value:
        message: Bad Request
        error: There has been a problem with reading or understanding the request.
    400Response9:
      summary: An example of 400 response payload
      value:
        status: ERROR
        data:
          code: S12
          message: Invalid Card Number
    400Response10:
      summary: An example of 400 response payload
      value:
        status: ERROR
        data:
          code: S12
          message: Bad credentials = invalid public key
    403Response3:
      summary: An example of 403 response payload
      value:
        status: ERROR
        data:
          code: S12
          message: Bad credentials
    404Response1:
      summary: An example of 404 response payload
      value:
        message: Not Found
        error: The server can not find the requested resource
    500Response:
      summary: An example of 500 response payload
      value:
        message: Internal Server Error
        error: PROCESSING
  schemas:
    TokenizeCardResponse:
      title: CheckStatusResponse
      type: object
      example:
        status: SUCCESS
        data:
          code: S20
          payments:
            paymentReference: KES0092992991
            linkingReference: SEERBIT428813491603106540088
            status: TOKENIZED
            card:
              bin: '512345'
              last4: '0008'
              token: tk_fa12ee73-9807-4a8a-bc91-8e81ca3c47ce
    TokenizeCard401Response:
      title: CheckStatusResponse
      type: object
      example:
        message: Invalid Authentication Token
        error: INPUT
  securitySchemes:
    Basic:
      type: http
      scheme: basic

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.