Flutterwave Orders API

Server-side cart and order objects backing checkout sessions.

OpenAPI Specification

flutterwave-orders-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Flutterwave Banks AccountResolution Orders 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: Orders
  description: Server-side cart and order objects backing checkout sessions.
paths:
  /orders:
    get:
      summary: List Orders
      operationId: listOrders
      tags:
      - Orders
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderList'
    post:
      summary: Create An Order
      operationId: createOrder
      tags:
      - Orders
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderRequest'
      responses:
        '201':
          description: Order Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
  /orders/{id}:
    parameters:
    - in: path
      name: id
      required: true
      schema:
        type: string
    get:
      summary: Retrieve An Order
      operationId: getOrder
      tags:
      - Orders
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
    put:
      summary: Update An Order
      operationId: updateOrder
      tags:
      - Orders
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderRequest'
      responses:
        '200':
          description: Order Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
components:
  schemas:
    OrderRequest:
      type: object
      required:
      - amount
      - currency
      properties:
        amount:
          type: number
        currency:
          type: string
        reference:
          type: string
        customer_id:
          type: string
        items:
          type: array
          items:
            type: object
        meta:
          type: object
    Order:
      type: object
      properties:
        id:
          type: string
        amount:
          type: number
        currency:
          type: string
        status:
          type: string
        reference:
          type: string
        customer_id:
          type: string
        items:
          type: array
          items:
            type: object
        meta:
          type: object
    OrderList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Order'
  parameters:
    IdempotencyKey:
      in: header
      name: X-Idempotency-Key
      required: false
      description: UUID-style key used to safely retry POST requests.
      schema:
        type: string
        format: uuid
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://idp.flutterwave.com/realms/flutterwave/protocol/openid-connect/token
          scopes: {}