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

# Initiate Card Payment



## OpenAPI

````yaml POST /payments/initiate-card-payment
openapi: 3.0.1
info:
  title: CORE API OpenAPI Specification
  description: This is the API documentation for the ClickPesa CORE API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.clickpesa.com/third-parties
security:
  - bearerAuth: []
paths:
  /payments/initiate-card-payment:
    post:
      tags:
        - Payments
        - Initiate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              oneOf:
                - title: Body With Customer ID
                  required:
                    - customer
                    - orderReference
                    - currency
                    - amount
                  properties:
                    amount:
                      type: string
                      description: Your payment amount
                    orderReference:
                      type: string
                      description: Your unique Order reference
                    currency:
                      type: string
                      enum:
                        - USD
                    customer:
                      type: object
                      description: Customer
                      required:
                        - id
                      properties:
                        id:
                          type: string
                          description: Customer ID
                    checksum:
                      type: string
                      description: >-
                        If enabled, this is the generated checksum of the
                        payload. Refer to the
                        [documentation](https://docs.clickpesa.com/home/checksum)
                        for more details.
                - title: Body With Customer Details
                  required:
                    - customer
                    - orderReference
                    - currency
                    - amount
                  properties:
                    amount:
                      type: string
                      description: Your payment amount
                    orderReference:
                      type: string
                      description: Your unique Order reference
                    currency:
                      type: string
                      enum:
                        - USD
                    customer:
                      type: object
                      description: Customer details
                      required:
                        - phoneNumber
                        - email
                        - fullName
                      properties:
                        fullName:
                          type: string
                          description: >-
                            Customer Full Name - must match with card holder
                            name
                        email:
                          type: string
                          description: Valid customer email address
                        phoneNumber:
                          type: string
                          description: >-
                            Valid customer phone number, starting with country
                            code and without the plus sign, e.g., 255712345678
                    checksum:
                      type: string
                      description: >-
                        If enabled, this is the generated checksum of the
                        payload. Refer to the
                        [documentation](https://docs.clickpesa.com/home/checksum)
                        for more details.
      responses:
        '200':
          description: Initiate Card response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InitiateCardPaymentResponse'
        '400':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InitiateCardPaymentValidationError'
        '401':
          description: Invalid or Expired Token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: Not Found Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InitiateCardPaymentNotFoundError'
        '409':
          description: Conflict Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InitiateCardPaymentConflictError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InitiateCardPaymentInternalServerError'
components:
  schemas:
    InitiateCardPaymentResponse:
      type: object
      properties:
        cardPaymentLink:
          type: string
          description: A link for a customer to complete payment
        clientId:
          type: string
          description: Application Client ID associated with the payment
    InitiateCardPaymentValidationError:
      type: object
      properties:
        message:
          type: string
          enum:
            - >-
              Invalid Order Reference, should only contain alphanumeric
              characters and cannot be blank
            - >-
              Application has no access to COLLECTION API feature. Enable it on
              your application.
            - Valid Client ID is required
    UnauthorizedError:
      type: object
      properties:
        message:
          type: string
          description: Unauthorized Error
          example: Unauthorized
    InitiateCardPaymentNotFoundError:
      type: object
      properties:
        message:
          type: string
          enum:
            - Account has no payment collection methods
            - Account has no valid payment method
          example: Account has no payment collection methods
    InitiateCardPaymentConflictError:
      type: object
      properties:
        message:
          type: string
          description: Conflict message when an order reference is already used
          example: >-
            Order reference {Your reference} already used: Create a different
            reference
    InitiateCardPaymentInternalServerError:
      type: object
      properties:
        message:
          type: string
          description: Internal Server Error
          example: Error validating fee, try again later
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Authorization header containing the JWT access token returned from the
        generate token endpoint. The token already includes the Bearer prefix.
        Example: `Authorization: Bearer eyJhbGciOi...`
      bearerFormat: JWT

````