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

# Initiate an Orchestrator charge.

> Create a charge with Orchestator helper.



## OpenAPI

````yaml Flutterwave_v4_Open_API.json post /orchestration/direct-charges
openapi: 3.1.0
info:
  version: '1.0'
  title: Flutterwave APIs
  description: APIs for Enterprise Customers
  contact:
    name: Flutterwave
    email: hi@flutterwavego.com
servers:
  - url: https://developersandbox-api.flutterwave.com
    description: Dev server
security:
  - bearerAuth: []
paths:
  /orchestration/direct-charges:
    post:
      tags:
        - Orchestration
      summary: Initiate an Orchestrator charge.
      description: Create a charge with Orchestator helper.
      operationId: orchestration_direct_charge_post
      parameters:
        - $ref: '#/components/parameters/trace_id'
        - $ref: '#/components/parameters/idempotency_key'
        - $ref: '#/components/parameters/scenario_key'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/direct_charge_in'
      responses:
        '201':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/status'
                  message:
                    type: string
                  data:
                    $ref: '#/components/schemas/charge'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400'
        '401':
          description: Unauthorised request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/409'
components:
  parameters:
    trace_id:
      description: >-
        A unique identifier to track this operation. It must be between 12 and
        255 characters in length.
      in: header
      name: X-Trace-Id
      schema:
        type: string
        minLength: 12
        maxLength: 255
      example: acb123e4-f567-4a8b-9c0d-1e2f3a4b5c6d
    idempotency_key:
      description: >-
        A unique identifier to prevent duplicate requests. It must be between 12
        and 255 characters in length.
      in: header
      name: X-Idempotency-Key
      required: false
      schema:
        type: string
        minLength: 12
        maxLength: 255
      example: req-5c0a2e8c-f3b9-4d1a-8e2f-0c1d2e3f4a5b
    scenario_key:
      in: header
      name: X-Scenario-Key
      schema:
        type: string
        minimum: 1
        maximum: 1000
      description: >-
        An optional scenario key that can be used to simulate specific behaviors
        or test different scenarios within the API. Providing this header allows
        you to trigger predefined responses or alter data based on the key's
        value, which can be useful for testing, development, or demonstrating
        specific functionalities. The key should be a string of 1 to 1000
        characters.
      example: scenario:auth_redirect
  schemas:
    '400':
      description: Bad Request
      type: object
      properties:
        status:
          type: string
          nullable: false
          enum:
            - failed
        error:
          type: object
          properties:
            type:
              type: string
              example: REQUEST_NOT_VALID
            code:
              type: string
              example: '10400'
            message:
              type: string
              nullable: true
              example: Request is not valid
            validation_errors:
              type: array
              items:
                type: object
                properties:
                  field_name:
                    type: string
                    example: amount
                  message:
                    type: string
                    example: must not be null
          description: >-
            The request cannot be accepted and is malformed and/or missing
            required parameters.
    '401':
      description: Unauthorized
      type: object
      properties:
        status:
          type: string
          nullable: false
          enum:
            - failed
        message:
          type: string
          nullable: true
          description: Invalid API key provided
          example: UNAUTHORIZED
        error:
          type: object
          properties:
            type:
              type: string
              example: UNAUTHORIZED
            code:
              type: string
              example: '10401'
            message:
              type: string
              example: unauthorized
    '403':
      description: Forbidden
      type: object
      properties:
        status:
          type: string
          nullable: false
          enum:
            - failed
        message:
          type: string
          description: API key doesn't have permission to access this resource
        error:
          type: object
          properties:
            type:
              type: string
              example: FORBIDDEN
            code:
              type: string
              example: '10403'
            message:
              type: string
              example: Forbidden
    '409':
      description: Conflict
      type: object
      properties:
        status:
          type: string
          nullable: false
          enum:
            - failed
        message:
          type: string
          description: The request conflicts with another request
        error:
          type: object
          properties:
            type:
              type: string
              example: RESOURCE_CONFLICT
            code:
              type: string
              example: '10409'
            message:
              type: string
              example: Resource conflict
    direct_charge_in:
      type: object
      required:
        - amount
        - currency
        - customer
        - payment_method
        - reference
      properties:
        amount:
          allOf:
            - $ref: '#/components/schemas/amount'
          description: The payment amount in decimals.
        currency:
          $ref: '#/components/schemas/currency'
        reference:
          $ref: '#/components/schemas/reference'
        customer:
          $ref: '#/components/schemas/customer_in'
        meta:
          $ref: '#/components/schemas/meta'
        payment_method:
          $ref: '#/components/schemas/payment_method_in'
        redirect_url:
          type: string
          description: Specifies the URL to redirect to.
          example: https://www.google.com
        authorization:
          $ref: '#/components/schemas/authorization_in'
    status:
      type: string
      nullable: false
      enum:
        - success
        - failed
    charge:
      type: object
      properties:
        id:
          description: ID of the charge.
          type: string
          example: chg_nONgeAGY97
        amount:
          allOf:
            - $ref: '#/components/schemas/amount'
          description: The payment amount in decimals.
        fees:
          allOf:
            - $ref: '#/components/schemas/fees'
        billing_details:
          type: object
          description: The customer's billing information.
          properties:
            email:
              $ref: '#/components/schemas/email'
            name:
              $ref: '#/components/schemas/name'
            phone:
              $ref: '#/components/schemas/phone'
        currency:
          $ref: '#/components/schemas/currency'
        customer_id:
          type: string
          description: ID of the customer.
          example: cus_3XarBILKQS
        description:
          description: The charge's description.
          type: string
        disputed:
          description: Boolean indicating if the charge was disputed.
          type: boolean
          example: false
        settled:
          description: Boolean indicating if the transaction has been settled.
          type: boolean
          example: false
        settlement_id:
          description: Id for the settlement the transaction belongs to.
          type: array
          items:
            type: string
        meta:
          $ref: '#/components/schemas/meta'
        next_action:
          $ref: '#/components/schemas/next_action'
        payment_method_details:
          $ref: '#/components/schemas/payment_method'
        redirect_url:
          type: string
          description: Specifies the URL to redirect to.
          example: https://www.google.com
        refunded:
          description: Boolean indicating if the transaction has been refunded.
          type: boolean
          example: false
        reference:
          $ref: '#/components/schemas/reference'
        status:
          $ref: '#/components/schemas/charge_status'
        processor_response:
          $ref: '#/components/schemas/processor_response'
        created_datetime:
          type: string
          format: date-time
          description: Timestamp for when the transaction was created.
    amount:
      type: number
      format: decimal
      description: The payment amount in decimals.
      example: 12.34
      minimum: 0.01
    currency:
      description: ISO 4217 currency code.
      type: string
      example: NGN
      enum:
        - AED
        - AFN
        - ALL
        - AMD
        - ANG
        - AOA
        - AQD
        - ARS
        - AUD
        - AZN
        - BAM
        - BBD
        - BDT
        - BGN
        - BHD
        - BIF
        - BMD
        - BND
        - BOB
        - BRL
        - BSD
        - BWP
        - BYR
        - BZD
        - CAD
        - CDF
        - CHF
        - CLP
        - CNY
        - COP
        - CRC
        - CUP
        - CVE
        - CYP
        - CZK
        - DJF
        - DKK
        - DOP
        - DZD
        - ECS
        - EEK
        - EGP
        - ETB
        - EUR
        - FJD
        - FKP
        - GBP
        - GEL
        - GGP
        - GHS
        - GIP
        - GMD
        - GNF
        - GTQ
        - GYD
        - HKD
        - HNL
        - HRK
        - HTG
        - HUF
        - IDR
        - ILS
        - INR
        - IQD
        - IRR
        - ISK
        - JMD
        - JOD
        - JPY
        - KES
        - KGS
        - KHR
        - KMF
        - KPW
        - KRW
        - KWD
        - KYD
        - KZT
        - LAK
        - LBP
        - LKR
        - LRD
        - LSL
        - LTL
        - LVL
        - LYD
        - MAD
        - MDL
        - MGA
        - MKD
        - MMK
        - MNT
        - MOP
        - MRO
        - MTL
        - MUR
        - MVR
        - MWK
        - MXN
        - MYR
        - MZN
        - NAD
        - NGN
        - NIO
        - NOK
        - NPR
        - NZD
        - OMR
        - PAB
        - PEN
        - PGK
        - PHP
        - PKR
        - PLN
        - PYG
        - QAR
        - RON
        - RSD
        - RUB
        - RWF
        - SAR
        - SBD
        - SCR
        - SDG
        - SEK
        - SGD
        - SKK
        - SLL
        - SOS
        - SRD
        - STD
        - SVC
        - SYP
        - SZL
        - THB
        - TJS
        - TMT
        - TND
        - TOP
        - TRY
        - TTD
        - TWD
        - TZS
        - UAH
        - UGX
        - USD
        - UYU
        - UZS
        - VEF
        - VND
        - VUV
        - XAF
        - XCD
        - XOF
        - XPF
        - YER
        - ZAR
        - ZMK
        - ZWD
        - ZMW
    reference:
      type: string
      pattern: ^[a-zA-Z0-9\-]+$
      minLength: 6
      maxLength: 42
      description: >-
        A custom identifier to track the transaction, This must be unique across
        all your transactions.
      x-pattern-message: must be an alphanumeric string
    customer_in:
      type: object
      required:
        - email
      properties:
        address:
          $ref: '#/components/schemas/address'
        email:
          $ref: '#/components/schemas/email'
        meta:
          $ref: '#/components/schemas/meta'
        name:
          $ref: '#/components/schemas/name'
        phone:
          $ref: '#/components/schemas/phone'
    meta:
      type: object
      additionalProperties:
        type: string
    payment_method_in:
      oneOf:
        - $ref: '#/components/schemas/card_payment_method_in'
        - $ref: '#/components/schemas/bank_account_payment_method_in'
        - $ref: '#/components/schemas/mobile_money_payment_method_in'
        - $ref: '#/components/schemas/opay_payment_method_in'
        - $ref: '#/components/schemas/applepay_payment_method_in'
        - $ref: '#/components/schemas/googlepay_payment_method_in'
        - $ref: '#/components/schemas/ussd_payment_method_in'
        - $ref: '#/components/schemas/pwbt_payment_method_in'
      discriminator:
        propertyName: type
        mapping:
          card: '#/components/schemas/card_payment_method_in'
          bank_account: '#/components/schemas/bank_account_payment_method_in'
          mobile_money: '#/components/schemas/mobile_money_payment_method_in'
          opay: '#/components/schemas/opay_payment_method_in'
          applepay: '#/components/schemas/applepay_payment_method_in'
          googlepay: '#/components/schemas/googlepay_payment_method_in'
          ussd: '#/components/schemas/ussd_payment_method_in'
          bank_transfer: '#/components/schemas/pwbt_payment_method_in'
    authorization_in:
      oneOf:
        - $ref: '#/components/schemas/otp_authorization_in'
        - $ref: '#/components/schemas/encrypted_pin_authorization_in'
        - $ref: '#/components/schemas/external_3ds_authorization_in'
        - $ref: '#/components/schemas/avs_authorization_in'
      discriminator:
        propertyName: type
        mapping:
          otp: '#/components/schemas/otp_authorization_in'
          pin: '#/components/schemas/encrypted_pin_authorization_in'
          external_3ds: '#/components/schemas/external_3ds_authorization_in'
          avs: '#/components/schemas/avs_authorization_in'
    fees:
      type: array
      description: Fees charged on payment amount
      items:
        type: object
        properties:
          type:
            type: string
            description: >-
              The specific type of fee. i.e., "vat", "app", "merchant",
              "stamp_duty".
            example: vat
          amount:
            type: number
            format: decimal
            description: The fee amount in decimal format.
            example: 12.3
    email:
      type: string
      description: The Customer's email address.
      pattern: >-
        ^[a-zA-Z0-9_+&*-]+(?:\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$
      example: cornelius@gmail.com
      x-pattern-message: must be an email format
    name:
      type: object
      description: The Customer's full name.
      properties:
        first:
          type: string
          description: The Customer's first name.
          example: King
          pattern: ^(?![ ,.'-]*$)[A-Za-z ,.'-]{2,50}$
          x-pattern-message: >-
            must be between 2 and 50 characters long, cannot be empty, only
            spaces, or only symbols, and can only contain letters, spaces,
            commas, periods, apostrophes, or hyphens.
        middle:
          type: string
          description: The Customer's middle name.
          example: Leo
          pattern: ^(?![ ,.'-]*$)[A-Za-z ,.'-]{2,50}$
          x-pattern-message: >-
            must be between 2 and 50 characters long, cannot be empty, only
            spaces, or only symbols, and can only contain letters, spaces,
            commas, periods, apostrophes, or hyphens.
        last:
          type: string
          description: The Customer's last name.
          example: LeBron
          pattern: ^(?![ ,.'-]*$)[A-Za-z ,.'-]{2,50}$
          x-pattern-message: >-
            must be between 2 and 50 characters long, cannot be empty, only
            spaces, or only symbols, and can only contain letters, spaces,
            commas, periods, apostrophes, or hyphens.
    phone:
      type: object
      description: The customer's mobile number.
      required:
        - number
        - country_code
      example:
        country_code: '234'
        number: '08012345678'
      properties:
        country_code:
          description: ISO 3166 alpha-3 country code.
          type: string
          pattern: ^[0-9]{1,3}$
          example: '234'
          x-pattern-message: must be a valid ISO 3166 alpha-3 country code
        number:
          description: Unformatted 7-10-digit phone number without the country code.
          type: string
          pattern: ^[0-9]{7,10}$
          example: '8001122334'
          x-pattern-message: must be a digit containing between 7 and 10 characters
    next_action:
      oneOf:
        - $ref: '#/components/schemas/redirect_url_next_action'
        - $ref: '#/components/schemas/requires_additional_fields_next_action'
        - $ref: '#/components/schemas/requires_pin_next_action'
        - $ref: '#/components/schemas/requires_requery_next_action'
        - $ref: '#/components/schemas/requires_otp_next_action'
        - $ref: '#/components/schemas/payment_instruction_next_action'
        - $ref: '#/components/schemas/requires_capture_next_action'
        - $ref: '#/components/schemas/requires_bank_transfer_next_action'
      discriminator:
        propertyName: type
        mapping:
          redirect_url: '#/components/schemas/redirect_url_next_action'
          requires_additional_fields: '#/components/schemas/requires_additional_fields_next_action'
          requires_pin: '#/components/schemas/requires_pin_next_action'
          requires_requery: '#/components/schemas/requires_requery_next_action'
          requires_otp: '#/components/schemas/requires_otp_next_action'
          requires_capture: '#/components/schemas/requires_capture_next_action'
          payment_instruction: '#/components/schemas/payment_instruction_next_action'
          requires_bank_transfer: '#/components/schemas/requires_bank_transfer_next_action'
    payment_method:
      oneOf:
        - $ref: '#/components/schemas/card_payment_method'
        - $ref: '#/components/schemas/bank_account_payment_method'
        - $ref: '#/components/schemas/mobile_money_payment_method'
        - $ref: '#/components/schemas/opay_payment_method'
        - $ref: '#/components/schemas/applepay_payment_method'
        - $ref: '#/components/schemas/googlepay_payment_method'
        - $ref: '#/components/schemas/ussd_payment_method'
        - $ref: '#/components/schemas/pwbt_payment_method'
      discriminator:
        propertyName: type
        mapping:
          card: '#/components/schemas/card_payment_method'
          bank_account: '#/components/schemas/bank_account_payment_method'
          mobile_money: '#/components/schemas/mobile_money_payment_method'
          opay: '#/components/schemas/opay_payment_method'
          applepay: '#/components/schemas/applepay_payment_method'
          googlepay: '#/components/schemas/googlepay_payment_method'
          ussd: '#/components/schemas/ussd_payment_method'
          bank_transfer: '#/components/schemas/pwbt_payment_method'
    charge_status:
      type: string
      description: The status of the charge.
      example: succeeded
      enum:
        - succeeded
        - pending
        - failed
        - voided
    processor_response:
      type: object
      required:
        - type
        - code
      properties:
        type:
          type: string
        code:
          type: string
          pattern: \d{2}
          x-pattern-message: must be two digits
      enum:
        - type: approved
          code: '00'
        - type: refer_to_issuer
          code: '01'
        - type: refer_to_issuer_special_condition
          code: '02'
        - type: invalid_merchant
          code: '03'
        - type: pick_up_card_no_fraud
          code: '04'
        - type: do_not_honor
          code: '05'
        - type: error
          code: '06'
        - type: pick_up_card_fraud
          code: '07'
        - type: partial_approval
          code: '10'
        - type: invalid_transaction
          code: '12'
        - type: invalid_amount
          code: '13'
        - type: invalid_account_number
          code: '14'
        - type: no_such_issuer
          code: '15'
        - type: reenter_transaction
          code: '19'
        - type: no_action_taken
          code: '21'
        - type: unable_to_locate_record_in_file
          code: '25'
        - type: file_temporarily_not_available
          code: '28'
        - type: lost_card_pick_up
          code: '41'
        - type: stolen_card_pick_up
          code: '43'
        - type: insufficient_funds
          code: '51'
        - type: no_checking_account
          code: '52'
        - type: no_savings_account
          code: '53'
        - type: expired_card
          code: '54'
        - type: incorrect_pin
          code: '55'
        - type: transaction_not_permitted_card
          code: '57'
        - type: transaction_not_permitted_terminal
          code: '58'
        - type: suspected_fraud
          code: '59'
        - type: exceeds_approval_amount_limit
          code: '61'
        - type: invalid_restricted_service_code
          code: '62'
        - type: security_violation
          code: '63'
        - type: transaction_does_not_fulfill_aml_req
          code: '64'
        - type: exceeds_withdrawal_limit
          code: '65'
        - type: pin_data_required
          code: '70'
        - type: pin_entry_tries_exceeded
          code: '75'
        - type: unsolicited_reversal
          code: '76'
        - type: blocked_first_use
          code: '78'
        - type: already_reversed
          code: '79'
        - type: negative_cvv_result
          code: '82'
        - type: no_reason_to_decline
          code: '85'
        - type: cannot_verify_pin
          code: '86'
        - type: issuer_unavailable
          code: '91'
        - type: unable_to_route_transaction
          code: '92'
        - type: cannot_complete_violation_of_law
          code: '93'
        - type: system_error
          code: '96'
        - type: invalid_cvv
          code: '97'
    address:
      type: object
      description: Customer address information.
      required:
        - line1
        - city
        - state
        - country
        - postal_code
      properties:
        city:
          type: string
          description: The name of the city.
          example: New York
          pattern: ^.+$
          x-pattern-message: value must not be empty
        country:
          description: ISO2 country code
          type: string
          pattern: ^[A-Z]{2}$
          example: US
          x-pattern-message: must be a valid country ISO2 format
        line1:
          type: string
          description: The first line of the Customer's address.
          example: 123 Main Street
          pattern: ^.+$
          x-pattern-message: value must not be empty
        line2:
          type: string
          description: The second line of the Customer's address.
          example: Apt 4B
          pattern: ^.+$
          x-pattern-message: value must not be empty
        postal_code:
          type: string
          example: '10001'
          pattern: ^.+$
          x-pattern-message: value must not be empty
        state:
          type: string
          description: The state or region.
          example: New York
          pattern: ^.+$
          x-pattern-message: value must not be empty
    card_payment_method_in:
      allOf:
        - $ref: '#/components/schemas/base_payment_method_in'
      type: object
      required:
        - type
        - card
      properties:
        type:
          type: string
          description: The type of the payment method.
          default: card
          readOnly: true
        card:
          $ref: '#/components/schemas/encrypted_card_in'
    bank_account_payment_method_in:
      allOf:
        - $ref: '#/components/schemas/base_payment_method_in'
      type: object
      required:
        - type
      properties:
        type:
          type: string
          description: The type of the payment method.
          default: bank_account
          readOnly: true
        bank_account:
          $ref: '#/components/schemas/bank_account_in'
    mobile_money_payment_method_in:
      allOf:
        - $ref: '#/components/schemas/base_payment_method_in'
      type: object
      required:
        - type
        - mobile_money
      properties:
        type:
          type: string
          description: The type of the payment method.
          default: mobile_money
          readOnly: true
        mobile_money:
          $ref: '#/components/schemas/mobile_money_in'
    opay_payment_method_in:
      allOf:
        - $ref: '#/components/schemas/base_payment_method_in'
      type: object
      required:
        - type
      properties:
        type:
          type: string
          description: The type of the payment method.
          default: opay
          readOnly: true
        opay:
          $ref: '#/components/schemas/opay_in'
    applepay_payment_method_in:
      allOf:
        - $ref: '#/components/schemas/base_payment_method_in'
      type: object
      required:
        - type
      properties:
        type:
          type: string
          description: The type of the payment method.
          default: applepay
          readOnly: true
        applepay:
          $ref: '#/components/schemas/applepay_in'
    googlepay_payment_method_in:
      allOf:
        - $ref: '#/components/schemas/base_payment_method_in'
      type: object
      required:
        - type
      properties:
        type:
          type: string
          description: The type of the payment method.
          default: googlepay
          readOnly: true
        googlepay:
          $ref: '#/components/schemas/googlepay_in'
    ussd_payment_method_in:
      allOf:
        - $ref: '#/components/schemas/base_payment_method_in'
      type: object
      required:
        - type
        - ussd
      properties:
        type:
          type: string
          description: The type of the payment method.
          default: ussd
          readOnly: true
        ussd:
          $ref: '#/components/schemas/ussd_in'
    pwbt_payment_method_in:
      allOf:
        - $ref: '#/components/schemas/base_payment_method_in'
      type: object
      required:
        - type
        - bank_transfer
      properties:
        type:
          type: string
          description: The type of the payment method.
          default: bank_transfer
          readOnly: true
        bank_transfer:
          $ref: '#/components/schemas/pwbt_in'
    otp_authorization_in:
      type: object
      description: OTP authorization object.
      required:
        - type
      properties:
        type:
          type: string
          default: otp
          readOnly: true
        otp:
          $ref: '#/components/schemas/otp'
    encrypted_pin_authorization_in:
      type: object
      description: PIN authorization object.
      required:
        - type
      properties:
        type:
          type: string
          default: pin
          readOnly: true
        pin:
          $ref: '#/components/schemas/encrypted_pin'
    external_3ds_authorization_in:
      type: object
      description: External 3DS authorization object.
      required:
        - type
        - external_3ds
      properties:
        type:
          type: string
          default: external_3ds
          readOnly: true
        external_3ds:
          $ref: '#/components/schemas/external_3ds'
    avs_authorization_in:
      type: object
      description: AVS authorization object.
      required:
        - type
      properties:
        type:
          type: string
          default: avs
          readOnly: true
        avs:
          $ref: '#/components/schemas/avs'
    redirect_url_next_action:
      type: object
      required:
        - type
        - redirect_url
      properties:
        type:
          type: string
          default: redirect_url
          readOnly: true
        redirect_url:
          $ref: '#/components/schemas/redirect_url'
    requires_additional_fields_next_action:
      type: object
      required:
        - type
        - requires_additional_fields
      properties:
        type:
          type: string
          default: requires_additional_fields
          readOnly: true
        requires_additional_fields:
          $ref: '#/components/schemas/requires_additional_fields'
    requires_pin_next_action:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          default: requires_pin
          readOnly: true
        requires_pin:
          type: object
    requires_requery_next_action:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          default: requires_requery
          readOnly: true
        requires_requery:
          type: object
    requires_otp_next_action:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          default: requires_otp
          readOnly: true
        requires_otp:
          type: object
    payment_instruction_next_action:
      type: object
      required:
        - type
        - payment_instruction
      properties:
        type:
          type: string
          default: payment_instruction
          readOnly: true
        payment_instruction:
          $ref: '#/components/schemas/payment_instruction'
    requires_capture_next_action:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          default: requires_capture
          readOnly: true
        requires_capture:
          type: object
    requires_bank_transfer_next_action:
      type: object
      required:
        - type
        - redirect_url
      properties:
        type:
          type: string
          default: requires_bank_transfer
          readOnly: true
        requires_bank_transfer:
          $ref: '#/components/schemas/requires_bank_transfer'
    card_payment_method:
      allOf:
        - $ref: '#/components/schemas/base_payment_method'
      type: object
      required:
        - type
        - card
      properties:
        type:
          type: string
          description: The type of the payment method.
          default: card
          readOnly: true
        card:
          $ref: '#/components/schemas/card'
    bank_account_payment_method:
      allOf:
        - $ref: '#/components/schemas/base_payment_method'
      type: object
      required:
        - type
      properties:
        type:
          type: string
          description: The type of the payment method.
          default: bank_account
          readOnly: true
        bank_account:
          $ref: '#/components/schemas/bank_account'
    mobile_money_payment_method:
      allOf:
        - $ref: '#/components/schemas/base_payment_method'
      type: object
      required:
        - type
        - mobile_money
      properties:
        type:
          type: string
          description: The type of the payment method.
          default: mobile_money
          readOnly: true
        mobile_money:
          $ref: '#/components/schemas/mobile_money'
    opay_payment_method:
      allOf:
        - $ref: '#/components/schemas/base_payment_method'
      type: object
      required:
        - type
      properties:
        type:
          type: string
          description: The type of the payment method.
          default: opay
          readOnly: true
        opay:
          $ref: '#/components/schemas/opay'
    applepay_payment_method:
      allOf:
        - $ref: '#/components/schemas/base_payment_method'
      type: object
      required:
        - type
      properties:
        type:
          type: string
          description: The type of the payment method.
          default: applepay
          readOnly: true
        applepay:
          $ref: '#/components/schemas/applepay'
    googlepay_payment_method:
      allOf:
        - $ref: '#/components/schemas/base_payment_method'
      type: object
      required:
        - type
      properties:
        type:
          type: string
          description: The type of the payment method.
          default: googlepay
          readOnly: true
        googlepay:
          $ref: '#/components/schemas/googlepay'
    ussd_payment_method:
      allOf:
        - $ref: '#/components/schemas/base_payment_method'
      type: object
      required:
        - type
      properties:
        type:
          type: string
          description: The type of the payment method.
          default: ussd
          readOnly: true
        ussd:
          $ref: '#/components/schemas/ussd'
    pwbt_payment_method:
      allOf:
        - $ref: '#/components/schemas/base_payment_method'
      type: object
      required:
        - type
        - bank_transfer
      properties:
        type:
          type: string
          description: The type of the payment method.
          default: bank_transfer
          readOnly: true
        bank_transfer:
          $ref: '#/components/schemas/pwbt'
    base_payment_method_in:
      properties:
        type:
          type: string
          description: The type of the payment method.
          example: card
        customer_id:
          type: string
          description: ID of the customer.
          example: cus_3XarBILKQS
        meta:
          $ref: '#/components/schemas/meta'
    encrypted_card_in:
      type: object
      required:
        - encrypted_expiry_month
        - encrypted_expiry_year
        - encrypted_card_number
        - nonce
      properties:
        nonce:
          $ref: '#/components/schemas/nonce'
        encrypted_expiry_month:
          type: string
          description: Encrypted value of the card's expiry month.
          pattern: ^.+$
          x-pattern-message: value must not be empty
          example: sQpvQEb7GrUCjPuEN/NmHiPl
        encrypted_expiry_year:
          type: string
          description: Encrypted value of the card's expiry year.
          pattern: ^.+$
          x-pattern-message: value must not be empty
          example: sgHNEDkJ/RmwuWWq/RymToU5
        encrypted_card_number:
          type: string
          description: Encrypted value of the card number.
          pattern: ^.+$
          x-pattern-message: value must not be empty
          example: sAE3hEDaDQ+yLzo4Py+Lx15OZjBGduHu/DcdILh3En0=
        encrypted_cvv:
          type: string
          description: Encrypted value of the card's security code (CVV/CSC).
          pattern: ^.+$
          x-pattern-message: value must not be empty
          example: tAUzH7Qjma7diGdi7938F/ESNA==
        billing_address:
          $ref: '#/components/schemas/address'
        cof:
          $ref: '#/components/schemas/credential_on_file_in'
        card_holder_name:
          type: string
          description: Name on the card
          example: Alex James
    bank_account_in:
      type: object
    mobile_money_in:
      type: object
      required:
        - network
        - phone_number
        - country_code
      properties:
        network:
          type: string
          description: The mobile network of the customer's phone number.
          example: MTN
        country_code:
          type: string
          example: '234'
          pattern: ^[0-9]{1,3}$
          description: ISO 3166 alpha-3 country code.
          x-pattern-message: must be a valid 3 digit country code
        phone_number:
          type: string
          example: '8001122334'
          pattern: ^[0-9]{7,10}$
          x-pattern-message: must be a valid 7 to 10 digit phone number
          description: Unformatted 7-10-digit phone number without the country code.
    opay_in:
      type: object
    applepay_in:
      type: object
      properties:
        card_holder_name:
          type: string
          description: The cardholder name.
          example: Yohan Blake
          pattern: ^(?![ ,.'-]*$)[A-Za-z ,.'-]{2,50}$
          x-pattern-message: >-
            must be between 2 and 50 characters long, cannot be empty, only
            spaces, or only symbols, and can only contain letters, spaces,
            commas, periods, apostrophes, or hyphens.
    googlepay_in:
      type: object
      properties:
        card_holder_name:
          type: string
          description: The cardholder name.
          example: Yohan Blake
          pattern: ^(?![ ,.'-]*$)[A-Za-z ,.'-]{2,50}$
          x-pattern-message: >-
            must be between 2 and 50 characters long, cannot be empty, only
            spaces, or only symbols, and can only contain letters, spaces,
            commas, periods, apostrophes, or hyphens.
    ussd_in:
      type: object
      required:
        - account_bank
      properties:
        account_bank:
          type: string
          pattern: ^\d{3,}$
          description: A valid Nigerian bank code consisting of 3 or more digits.
          example: '050'
          x-pattern-message: must be more than 3 digits long and contain only numbers.
    pwbt_in:
      type: object
      required:
        - account_type
      properties:
        account_expires_in:
          type: integer
          description: The expiry time of the virtual account.
          maximum: 432000
        account_type:
          $ref: '#/components/schemas/pwbt_type'
        bvn:
          type: string
          description: This is the customer's Bank Verification Number.
          pattern: ^[1-9][0-9]{10}$
          x-pattern-message: bvn must be exactly 11 characters long and a signed integer
          example: '12345678912'
        nin:
          type: string
          description: This is the customer's National Identity Number.
          pattern: ^[1-9][0-9]{10}$
          x-pattern-message: nin must be exactly 11 characters long and a signed integer
          example: '12345678912'
    otp:
      type: object
      required:
        - code
      properties:
        code:
          type: string
          pattern: ^\d{4,8}$
          description: One-time password(OTP) sent by the Bank.
          x-pattern-message: must be a numeric value between 4 and 8 digits long.
    encrypted_pin:
      type: object
      description: PIN authorization object.
      required:
        - encrypted_pin
        - nonce
      properties:
        nonce:
          $ref: '#/components/schemas/nonce'
        encrypted_pin:
          type: string
    external_3ds:
      type: object
      required:
        - eci
        - authentication_token
        - transaction_id
        - version
        - transaction_status
        - status_reason_code
        - amount
        - time
      properties:
        eci:
          type: string
          description: >-
            Electronic Commerce Indicator from the issuer's Access Control
            Server (ACS), showing the outcome of the payer's authentication
            attempt.
          example: '03'
        time:
          type: string
          description: The time of the payer's authentication in UTC.
          example: '2024-04-11T08:08:43.974Z'
        authentication_token:
          type: string
          description: Base64 encoded value generated by the card issuer.
          example: zPkn+YYYYYY53434HFHDss=
        transaction_id:
          type: string
          description: >-
            The unique transaction identifier from the Access Control Server
            (ACS).
          example: 1F3Uciah9cnh4mrnPPtyT_RA_test
        version:
          type: string
          description: EMV 3D Secure protocol.
          example: 2.1.0
        transaction_status:
          type: string
          description: The status of the external authorization attempt.
          example: 'Y'
          enum:
            - 'Y'
            - 'N'
            - U
            - A
            - R
        status_reason_code:
          type: string
        amount:
          $ref: '#/components/schemas/amount'
    avs:
      type: object
      required:
        - address
      properties:
        address:
          $ref: '#/components/schemas/address'
    redirect_url:
      type: object
      required:
        - url
      properties:
        url:
          type: string
          description: Payment screen URL to redirect customer to.
          example: >-
            https://developer-sandbox-ui-sit.flutterwave.cloud/redirects?opay&token=eyJhbGciOiJIUzI1NiJ9.eyJjbGllbnRJZCI6ImNiYThhMTkwLTE2OGUtNGNmZS05NmY5LTE2NDZhYjFhOWNkYiIsImNoYXJnZUlkIjoiY2hnX25PTmdlQUdZOTciLCJzdWIiOiJjYmE4YTE5MC0xNjhlLTRjZmUtOTZmOS0xNjQ2YWIxYTljZGIiLCJpYXQiOjE3MzgzMTc3MTAsImV4cCI6MTczODMxODAxMH0.QgLoZYfNhHJOJJvOsLA9eLoxOjGF0qnuehPMgMP4zD4
    requires_additional_fields:
      type: object
      required:
        - fields
      properties:
        fields:
          type: array
          items:
            type: string
          maxItems: 50
    payment_instruction:
      type: object
      required:
        - note
      properties:
        note:
          type: string
          description: Custom field containing the payment instruction.
          example: Please dial *1414# to complete this transaction.
    requires_bank_transfer:
      type: object
      required:
        - account_number
        - account_type
        - account_bank_name
      properties:
        account_number:
          type: string
          description: The account number designated for receiving payments.
        account_bank_name:
          type: string
          description: The Bank name.
        account_expiration_datetime:
          type: string
          description: Specifies when the virtual account expires.
          format: date-time
        note:
          type: string
    base_payment_method:
      required:
        - id
        - type
      properties:
        id:
          $ref: '#/components/schemas/payment_method_id'
        type:
          type: string
          description: The type of the payment method.
          example: card
        customer_id:
          type: string
          description: ID of the customer.
          example: cus_3XarBILKQS
        meta:
          $ref: '#/components/schemas/meta'
        device_fingerprint:
          description: The customer's device fingerprint.
          type: string
          example: 62wd23423rq324323qew1
        client_ip:
          description: The customer's device IP.
          type: string
          example: 154.123.220.1
        created_datetime:
          type: string
          format: date-time
          description: The date and time when the virtual account was created.
          example: '2024-12-03T13:54:21.546559974Z'
    card:
      type: object
      required:
        - expiry_month
        - expiry_year
        - first6
        - last4
        - network
      properties:
        expiry_month:
          type: integer
          description: Expiry month of the card.
          example: '09'
        expiry_year:
          type: integer
          description: Expiry year of the card.
          example: '32'
        first6:
          type: string
          description: Bank identification number (BIN) of the card.
          minLength: 6
          maxLength: 6
          example: '123412'
        last4:
          type: string
          description: The last four digits of the card number.
          minLength: 4
          maxLength: 4
          example: '1234'
        network:
          $ref: '#/components/schemas/card_network'
        billing_address:
          $ref: '#/components/schemas/address'
        cof:
          $ref: '#/components/schemas/credential_on_file'
        card_holder_name:
          type: string
          description: Name on the card
          example: Alex James
    bank_account:
      type: object
    mobile_money:
      type: object
      required:
        - network
        - phone_number
        - country_code
      properties:
        network:
          type: string
          description: The mobile network of the customer's phone number.
          example: MTN
        country_code:
          type: string
          description: ISO 3166 alpha-3 country code.
          example: '233'
        phone_number:
          type: string
          description: The phone number of customer.
          example: '9012345678'
    opay:
      type: object
    applepay:
      type: object
      properties:
        card_holder_name:
          type: string
          description: The cardholder name.
          example: Yohan Blake
    googlepay:
      type: object
      properties:
        card_holder_name:
          type: string
          description: The cardholder name.
          example: Yohan Blake
    ussd:
      type: object
      properties:
        account_bank:
          type: string
          description: The bank code of the USSD string to generate.
          example: '050'
    pwbt:
      type: object
      required:
        - account_type
      properties:
        account_expires_in:
          type: integer
          description: The expiry time of the virtual account.
          example: 360
          maximum: 432000
        account_display_name:
          type: string
          description: >-
            The name that is shown to the customer when the account is resolved
            to a name.
          example: Alex James
          minLength: 3
          maxLength: 256
        account_type:
          $ref: '#/components/schemas/pwbt_type'
        originator_bank_name:
          type: string
          description: The sender's Bank name
          example: Mock Bank
        originator_account_number:
          type: string
          description: The Sender's masked account number
          example: 002*******78
        originator_name:
          type: string
          description: The sender's name
          example: Jane Doe
    nonce:
      type: string
      pattern: ^[a-zA-Z0-9]+$
      minLength: 12
      maxLength: 12
      description: >-
        A single-use 12 character alphanumeric string for field-level
        encryption.
      x-pattern-message: must be an alphanumeric string of length 12
    credential_on_file_in:
      type: object
      required:
        - enabled
      properties:
        enabled:
          type: boolean
          description: >-
            Set to true to enable recurring card charge with Credential-on-File
            (COF).
          example: true
        agreement_id:
          type: string
          description: >-
            A unique reference generated by Flutterwave during the initial
            Customer Initiated Transaction (CIT).
          example: Agreement00w02W1
        trace_id:
          type: string
          description: >-
            A reference generated by the card scheme during the initial Customer
            Initiated Transaction (CIT).
          example: '123456789'
    pwbt_type:
      type: string
      description: The type of virtual account.
      example: static
      enum:
        - static
        - dynamic
    payment_method_id:
      type: string
      description: ID of the payment method.
      example: pmd_WRq7L4TM8p
    card_network:
      type: string
      description: The card network.
      example: MASTERCARD
      enum:
        - MASTERCARD
        - VISA
        - AMERICAN EXPRESS
        - DISCOVER
        - VERVE
        - AFRIGO
        - UNKNOWN
    credential_on_file:
      type: object
      required:
        - enabled
      properties:
        enabled:
          type: boolean
          description: >-
            Indicates whether the recurring card charge with Credential-on-File
            (COF) is enabled.
          example: true
        agreement_id:
          type: string
          description: >-
            A unique reference generated by Flutterwave during the initial
            Customer Initiated Transaction (CIT).
          example: Agreement00w02W1
        recurring_amount_variability:
          type: string
          description: >-
            This indicates whether the amount charged for subsequent payments
            remains the same, or differs.
          example: VARIABLE
          enum:
            - VARIABLE
        agreement_type:
          type: string
          definition: This indicates the type of charge agreement with Flutterwave.
          example: UNSCHEDULED
          enum:
            - UNSCHEDULED
        trace_id:
          type: string
          description: >-
            A reference generated by the card scheme during the initial Customer
            Initiated Transaction (CIT).
          example: '123456789'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````