Flutterwave Charges API

Create and manage charges across supported payment methods.

OpenAPI Specification

flutterwave-charges-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Flutterwave Banks AccountResolution Charges API
  description: 'Flutterwave v4 reference data APIs for supported banks, bank branches,

    mobile networks, and bank account name resolution. These endpoints are

    used to populate dropdowns and validate destination accounts before

    initiating payouts.

    '
  version: 4.0.0
  contact:
    name: Flutterwave
    url: https://developer.flutterwave.com
    email: developers@flutterwavego.com
  license:
    name: Flutterwave Terms of Service
    url: https://flutterwave.com/us/terms
servers:
- url: https://api.flutterwave.cloud/f4b/production
  description: Production
- url: https://api.flutterwave.cloud/f4b/sandbox
  description: Sandbox
security:
- OAuth2: []
tags:
- name: Charges
  description: Create and manage charges across supported payment methods.
paths:
  /charges:
    get:
      summary: List Charges
      operationId: listCharges
      tags:
      - Charges
      parameters:
      - $ref: '#/components/parameters/Limit'
      - $ref: '#/components/parameters/Page'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChargeList'
    post:
      summary: Create A Charge
      operationId: createCharge
      tags:
      - Charges
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChargeRequest'
      responses:
        '201':
          description: Charge Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Charge'
  /charges/{id}:
    parameters:
    - $ref: '#/components/parameters/ChargeId'
    get:
      summary: Retrieve A Charge
      operationId: getCharge
      tags:
      - Charges
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Charge'
    put:
      summary: Update A Charge
      operationId: updateCharge
      tags:
      - Charges
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                authorization:
                  type: object
      responses:
        '200':
          description: Charge Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Charge'
components:
  parameters:
    Limit:
      in: query
      name: limit
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 25
    Page:
      in: query
      name: page
      schema:
        type: integer
        minimum: 1
        default: 1
    IdempotencyKey:
      in: header
      name: X-Idempotency-Key
      required: false
      description: UUID-style key used to safely retry POST requests.
      schema:
        type: string
        format: uuid
    ChargeId:
      in: path
      name: id
      required: true
      schema:
        type: string
  schemas:
    Customer:
      type: object
      properties:
        id:
          type: string
        email:
          type: string
          format: email
        name:
          type: object
          properties:
            first:
              type: string
            middle:
              type: string
            last:
              type: string
        phone:
          type: object
          properties:
            country_code:
              type: string
            number:
              type: string
        address:
          type: object
        meta:
          type: object
        created_datetime:
          type: string
          format: date-time
    ChargeRequest:
      type: object
      required:
      - amount
      - currency
      - customer
      properties:
        amount:
          type: number
        currency:
          type: string
        reference:
          type: string
        redirect_url:
          type: string
        customer:
          type: object
        payment_method:
          type: object
        meta:
          type: object
    Charge:
      type: object
      properties:
        id:
          type: string
        amount:
          type: number
        currency:
          type: string
          example: NGN
        status:
          type: string
          enum:
          - pending
          - succeeded
          - failed
        reference:
          type: string
        customer:
          $ref: '#/components/schemas/Customer'
        payment_method:
          $ref: '#/components/schemas/PaymentMethod'
        processor_response:
          type: object
          properties:
            type:
              type: string
            code:
              type: string
        redirect_url:
          type: string
        meta:
          type: object
        created_datetime:
          type: string
          format: date-time
    PaymentMethod:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
          - card
          - mobile_money
          - bank_transfer
          - ussd
          - opay
        card:
          type: object
        mobile_money:
          type: object
        bank_transfer:
          type: object
        client:
          type: object
        device_fingerprint:
          type: string
        created_datetime:
          type: string
          format: date-time
    ChargeList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Charge'
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://idp.flutterwave.com/realms/flutterwave/protocol/openid-connect/token
          scopes: {}