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

# Collection API - Direct

> Charge the Customer via API



## OpenAPI

````yaml /api-reference/openapi-3.1.yml post /payments/v1/payments/direct-charge
openapi: 3.1.0
info:
  title: Payfonte - OpenAPI 3.1
  description: >-
    This is the minimal API for payfonte collection and disbursements API. To
    view a more elaborate documentation see here.


    Some useful links:

    - [Home](https://payfonte.com)

    - [Payfonte Documentation](https://docs.payfonte.com)
  termsOfService: https://www.payfonte.com/terms
  contact:
    email: tech@payfonte.com
  version: 1.0.0
servers:
  - url: https://sandbox-api.payfonte.com
    description: Sandbox API Base URL
  - url: https://api.payfonte.com
    description: Production API Base URL
security:
  - clientId: []
    clientSecret: []
tags:
  - name: Collections
    description: Everything about your payment collection with payfonte
    externalDocs:
      description: Find out more
      url: https://docs.payfonte.com/#/collections/inline
  - name: Card Collections
    description: Everything about your card payment collections with payfonte
  - name: Disbursements
    description: >
      Find full list of supported Disbursement providers here [Supported
      Providers](https://docs.payfonte.com/#/Disbursements/supported-Disbursements)

      There are 3 main process to carry out a Disbursement on Payfonte

      1. Validate A transfer Recipient

      2. Initiate a Disbursement Request

      3. Verify a Disbursement Request
  - name: Wallets
    description: >-
      A Little bit about our [wallets here]
      (https://docs.payfonte.com/#/introductions/wallets)
paths:
  /payments/v1/payments/direct-charge:
    post:
      tags:
        - Collections
      summary: Collection API - Direct
      description: Charge the Customer via API
      operationId: DirectChargeAPI
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DirectChargeAPIRequest'
        required: true
      responses:
        '201':
          description: Request Submitted Successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DirectChargeAPIResponse'
components:
  schemas:
    DirectChargeAPIRequest:
      required:
        - provider
        - amount
        - customerInput
      type: object
      properties:
        provider:
          $ref: '#/components/schemas/Provider'
          description: >-
            This is the provider we are routing the request through. Find full
            list of providers here [Supported
            Providers](https://docs.payfonte.com/#/collections/direct-charge/supported-providers)
          examples:
            - airtel-smartcash-ng
            - mtn-momo-ivory-coast
        amount:
          $ref: '#/components/schemas/Amount'
          description: >-
            Amount should be sent in the lowest denomination e.g for 100 USD you
            should send 100 * 100 = 10000
        reference:
          type: string
          description: >-
            A reference code you'll generate to identify this transaction. This
            must be unique for every transaction. If you don't pass one, we will
            generate one for you.
        customerInput:
          type: object
          properties:
            phoneNumber:
              type: string
              description: customer's phone number
              example: '2347012345678'
              examples:
                - '2347012345678'
        redirectURL:
          type: string
          format: uri
          description: >-
            Fully qualified URL to which the customer should be redirected after
            the payment is completed
          example: https://example.com/redirect/success
          examples:
            - https://example.com/redirect/success
        webhook:
          type: string
          format: uri
          description: >-
            This is a URL, if this is passed we will send the event webhook
            payload to this endpoint. Use this to override the webhook url
            provided on the dashboard for this transaction. Read more on
            [Webhooks](https://docs.payfonte.com/#/collections/webhook)
          example: https://example.com/webhook
          examples:
            - https://example.com/webhook
        metadata:
          $ref: '#/components/schemas/Metadata'
    DirectChargeAPIResponse:
      type: object
      properties:
        reference:
          type: string
          description: Transaction Reference
        status:
          type: string
          description: Transaction Status
        sessionId:
          type: string
          description: Transaction Session ID. This is from the provider.
        amount:
          $ref: '#/components/schemas/Amount'
    Provider:
      type: string
      description: >-
        This is the provider we are validating the account against. Find full
        list of providers here [Supported
        Providers](https://docs.payfonte.com/#/Disbursements/supported-Disbursements)
      examples:
        - provider-slug
    Amount:
      type: integer
      description: >-
        Amount should be in the subunit of the supported currency i.e value *
        100 [Amount
        Specification](https://docs.payfonte.com/guides/introductions/amount-specification)
      format: int64
      example: 100000
      examples:
        - 100000
    Metadata:
      type: object
      properties:
        merchantName:
          type: string
          example: Karis Clothing
          examples:
            - Karis Clothing
        trafficType:
          type: string
          example: ECOMMERCE
          examples:
            - ECOMMERCE
  securitySchemes:
    clientId:
      type: apiKey
      name: client-id
      in: header
    clientSecret:
      type: apiKey
      name: client-secret
      in: header

````