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

# Authorize transfer collection

> Send the code the payer received after the collection leg was submitted.

Use this endpoint only when a transfer's `payin_action.type` is `submit_otp`. The payer has received a code from the operator; send it here. See [Customer actions](https://developers.bumxpress.com/guides/customer-actions.md) for the full flow.

* The transfer stays `collecting`. The collection result arrives by webhook or `GET /transfers/{transfer_id}`, as for any transfer.
* No `Idempotency-Key` is needed. A transfer accepts one code; sending another after it was accepted returns `409`.
* A wrong code returns `422` and leaves the transfer waiting, so the payer can try again.
* `503` with reason `provider_outcome_unknown` means the provider did not confirm the code. Fetch the transfer before retrying: if `payin_action` is gone, the code was accepted.


## OpenAPI

````yaml POST /transfers/{transfer_id}/authorize
openapi: 3.0.3
info:
  title: Bumxpress Business Merchant API
  version: 1.0.0
  description: >
    Merchant API for customers, KYC, quotes, payins, payouts, transfers, and
    webhooks.

    All merchant resources are scoped to the merchant attached to the API key.
  license:
    name: Proprietary
    url: https://business.bumxpress.com
servers:
  - url: https://api.business.bumxpress.com
    description: Production
  - url: https://sandbox.api.business.bumxpress.com
    description: Sandbox (simulated providers, sandbox API keys)
security:
  - ApiKeyAuth: []
    ApiSecretAuth: []
tags:
  - name: Customers
    description: Create and retrieve merchant-scoped customer records.
  - name: Customer KYC
    description: Submit and retrieve customer identity document status.
  - name: Quotes
    description: Create and retrieve pricing and routing quotes.
  - name: Payins
    description: Create and retrieve payment collection resources.
  - name: Payouts
    description: Create and retrieve disbursement resources.
  - name: Transfers
    description: Create, retrieve, and relaunch two-leg transfer resources.
  - name: Coverage
    description: List the operators, fees, and limits available to your merchant account.
paths:
  /transfers/{transfer_id}/authorize:
    post:
      tags:
        - Transfers
      summary: Authorize transfer collection
      description: >-
        Send the code the payer received after the collection leg was submitted,
        when the transfer's `payin_action.type` is `submit_otp`. The transfer
        stays `collecting`; the collection result arrives by webhook or `GET
        /transfers/{transfer_id}`. No `Idempotency-Key` is needed. See the
        Customer actions guide.
      operationId: authorizeTransferCollection
      parameters:
        - $ref: '#/components/parameters/TransferId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthorizePayinRequest'
      responses:
        '200':
          description: >-
            The transfer, still collecting, with `payin_action` removed once the
            code is accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transfer'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: The collection is not waiting for a code (`action_not_pending`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: >-
            The provider rejected the code (`otp_invalid`). The transfer keeps
            waiting, so the payer can try again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          description: >-
            The provider did not confirm the code (`provider_outcome_unknown`,
            retryable). Fetch the transfer first; if `payin_action` is gone the
            code was accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  parameters:
    TransferId:
      name: transfer_id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    AuthorizePayinRequest:
      type: object
      required:
        - otp_code
      properties:
        otp_code:
          type: string
          writeOnly: true
          description: >-
            The code the customer received after submission. Never returned by
            the API.
          example: '654321'
    Transfer:
      type: object
      properties:
        id:
          type: string
          format: uuid
        merchant_id:
          type: string
          format: uuid
        customer_id:
          type: string
          format: uuid
        quote_id:
          type: string
          format: uuid
        merchant_reference:
          type: string
          nullable: true
          description: The `merchant_reference` you sent on creation.
        merchant_metadata:
          type: object
          additionalProperties: true
          description: The `merchant_metadata` you sent on creation, or an empty object.
        status:
          type: string
          enum:
            - pending
            - collecting
            - disbursing
            - completed
            - failed
        payin_status:
          type: string
        payin_action:
          $ref: '#/components/schemas/ProviderAction'
        payout_status:
          type: string
        send_amount:
          $ref: '#/components/schemas/DecimalString'
        send_currency:
          $ref: '#/components/schemas/CurrencyCode'
        receive_amount:
          $ref: '#/components/schemas/DecimalString'
        receive_currency:
          $ref: '#/components/schemas/CurrencyCode'
        payin_amount:
          $ref: '#/components/schemas/DecimalString'
        payin_currency:
          $ref: '#/components/schemas/CurrencyCode'
        payout_amount:
          $ref: '#/components/schemas/DecimalString'
        payout_currency:
          $ref: '#/components/schemas/CurrencyCode'
        corridor_code:
          type: string
        corridor_type:
          type: string
        execution:
          type: object
          additionalProperties: true
        payer:
          $ref: '#/components/schemas/RailParty'
        recipient:
          $ref: '#/components/schemas/Recipient'
        pricing:
          type: object
          additionalProperties: true
        history:
          type: array
          items:
            $ref: '#/components/schemas/StatusHistory'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - reason
            - message
            - retryable
          properties:
            code:
              type: string
              description: >-
                HTTP class of the error. Kept for backward compatibility; branch
                on `reason` instead.
              enum:
                - bad_request
                - unauthorized
                - forbidden
                - not_found
                - conflict
                - rate_limited
                - service_unavailable
                - internal_error
              example: bad_request
            reason:
              type: string
              description: >-
                Stable, machine-readable cause. New values may be added;
                existing values never change.
              enum:
                - invalid_request
                - missing_field
                - invalid_field
                - authentication_failed
                - ip_not_allowed
                - flow_not_enabled
                - resource_not_found
                - quote_not_found
                - quote_expired
                - quote_flow_mismatch
                - customer_not_found
                - customer_required
                - duplicate_external_ref
                - duplicate_merchant_reference
                - recipient_invalid
                - operator_mismatch
                - route_unavailable
                - amount_below_minimum
                - amount_above_maximum
                - amount_out_of_range
                - insufficient_balance
                - wallet_not_active
                - provider_fields_required
                - otp_required
                - fx_rate_unavailable
                - idempotency_key_missing
                - idempotency_key_invalid
                - idempotency_conflict
                - idempotency_in_progress
                - transfer_not_relaunchable
                - payout_amount_increase_not_allowed
                - rate_limited
                - service_unavailable
                - internal_error
              example: missing_field
            message:
              type: string
              description: >-
                Human-readable explanation. Do not parse it; use `reason` and
                `param`.
              example: quote_id is required
            retryable:
              type: boolean
              description: >-
                True when retrying the same request later may succeed without
                changing it.
              example: false
            param:
              type: string
              description: The request field at fault, when it can be identified.
              example: quote_id
    ProviderAction:
      type: object
      description: >-
        What the customer must do now that the provider accepted the request. It
        appears shortly after the payin is created, not in the `201` response
        itself.
      properties:
        type:
          type: string
          enum:
            - redirect
            - dial_ussd
            - submit_otp
        redirect_url:
          type: string
          format: uri
        app_links:
          type: object
          additionalProperties:
            type: string
          description: Deep links for mobile apps, for example `orange_money`.
        ussd_code:
          type: string
        message:
          type: string
        next_action:
          type: string
          description: >-
            Legacy field, still returned for existing integrations. Read `type`
            instead.
        otp_required:
          type: boolean
          description: Legacy field, still returned for existing integrations.
    DecimalString:
      type: string
      pattern: ^[0-9]+(\.[0-9]+)?$
      example: '10000'
    CurrencyCode:
      type: string
      enum:
        - XAF
        - XOF
      example: XAF
      description: Supported currencies for payins, payouts, and transfers.
    RailParty:
      type: object
      required:
        - country_code
        - rail_type
      properties:
        country_code:
          $ref: '#/components/schemas/CountryCode'
        rail_type:
          $ref: '#/components/schemas/RailType'
        phone:
          type: string
          example: '+237670000000'
        operator_code:
          type: string
          example: CM_MTN_MOMO
        bank_name:
          type: string
        bank_code:
          type: string
        account_name:
          type: string
        account_number:
          type: string
    Recipient:
      allOf:
        - $ref: '#/components/schemas/RailParty'
        - type: object
          required:
            - recipient_type
          properties:
            recipient_type:
              type: string
              enum:
                - individual
                - business
            first_name:
              type: string
            last_name:
              type: string
            business_name:
              type: string
            email:
              type: string
              format: email
            recipient_nationality_code:
              $ref: '#/components/schemas/CountryCode'
            address_line1:
              type: string
            city:
              type: string
    StatusHistory:
      type: object
      properties:
        status:
          type: string
        reason:
          type: string
          nullable: true
          description: >-
            Human-readable reason for this status. On a `failed` entry it
            explains why the transaction failed, in plain language and without
            provider details. Do not parse it; the wording can change. The full
            list is in the Errors guide under "Transaction failure reasons".
          example: >-
            The phone number is invalid or not registered for mobile money.
            Check the number and try again.
        created_at:
          type: string
          format: date-time
    CountryCode:
      type: string
      minLength: 2
      maxLength: 2
      example: CM
    RailType:
      type: string
      enum:
        - mobile_money
        - bank_transfer
  responses:
    BadRequest:
      description: >-
        Invalid body, missing field, expired quote, quote mismatch, or
        insufficient balance.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Missing, invalid, expired, or inactive API credentials.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Resource not found for the authenticated merchant.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    TooManyRequests:
      description: >-
        Rate limit exceeded for this API key. Retry after the number of seconds
        in `Retry-After`.
      headers:
        Retry-After:
          description: Seconds until the current rate-limit window resets.
          schema:
            type: integer
        X-RateLimit-Limit:
          description: Requests allowed per minute for this API key.
          schema:
            type: integer
        X-RateLimit-Remaining:
          description: Requests left in the current window.
          schema:
            type: integer
        X-RateLimit-Reset:
          description: Unix timestamp when the current window resets.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
      description: Public API key from the merchant dashboard.
    ApiSecretAuth:
      type: apiKey
      in: header
      name: X-Api-Secret
      description: Secret shown once when the API key is created.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.