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

# Reverse transfer

> Cancel or reverse a transfer (if supported by channel)

# Reverse Transfer

Reversing a transfer allows you to cancel or refund a transaction when authorized. Use the Reverse Transfer API to initiate a reversal for a specific transfer ID, subject to eligibility and conditions.


## OpenAPI

````yaml post /v1/transfers/{transfer_id}/reverse
openapi: 3.0.3
info:
  title: Adullam Payment API
  version: 1.0.0
  description: >
    Adullam is a payment processing platform for mobile money transactions in
    West Africa.


    This API enables developers to:

    - Collect payments from customers via mobile money

    - Send money to recipients

    - Track transactions and account balance


    ## Authentication

    All endpoints (except auth endpoints) require Bearer token authentication.


    ## Base URL

    Production: `https://api.adullam.dev`


    ## Rate Limiting

    - 100 requests per minute

    - 1000 requests per hour
  contact:
    email: support@adullam.dev
    url: https://docs.adullam.dev
  license:
    name: Proprietary
    url: https://adullam.dev/terms
servers:
  - url: https://api.adullam.dev
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: Partner authentication and token management
  - name: Payments
    description: Collect money from customers via mobile money
  - name: Transfers
    description: Send money to recipients via mobile money
  - name: Account
    description: Account and balance management
paths:
  /v1/transfers/{transfer_id}/reverse:
    post:
      tags:
        - Transfers
      summary: Reverse transfer
      description: Cancel or reverse a transfer (if supported by channel)
      parameters:
        - $ref: '#/components/parameters/TransferId'
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReversalRequest'
      responses:
        '201':
          description: Reversal created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Reversal'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
components:
  parameters:
    TransferId:
      name: transfer_id
      in: path
      required: true
      schema:
        type: string
      description: Transfer ID
      example: txf_abc123
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: true
      schema:
        type: string
        format: uuid
      description: UUID for idempotent requests
      example: 550e8400-e29b-41d4-a716-446655440000
  schemas:
    ReversalRequest:
      type: object
      required:
        - reason
      properties:
        reason:
          type: string
          enum:
            - fraud
            - error
            - customer_request
            - technical_issue
          example: error
        description:
          type: string
          maxLength: 200
          example: Wrong recipient
    Reversal:
      type: object
      properties:
        id:
          type: string
          example: rev_xyz789
        transfer_id:
          type: string
          example: txf_abc123
        type:
          type: string
          enum:
            - cancellation
            - reversal
          description: Cancellation if transfer not completed, reversal if completed
          example: reversal
        status:
          type: string
          enum:
            - pending
            - processing
            - completed
            - failed
          example: processing
        amount:
          type: integer
          example: 10000
        currency:
          type: string
          example: XOF
        reason:
          type: string
          enum:
            - fraud
            - error
            - customer_request
            - technical_issue
          example: error
        description:
          type: string
          example: Wrong recipient
        ussd_reference:
          type: string
          nullable: true
          example: null
        created_at:
          type: string
          format: date-time
          example: '2024-01-15T11:00:00Z'
        completed_at:
          type: string
          format: date-time
          nullable: true
          example: null
        failure_reason:
          type: string
          nullable: true
          example: null
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - authentication_error
                - invalid_request
                - insufficient_funds
                - rate_limit_exceeded
                - channel_error
                - transaction_failed
                - server_error
              example: invalid_request
            code:
              type: string
              example: amount_too_low
            message:
              type: string
              example: Amount must be at least 100 XOF
            field:
              type: string
              nullable: true
              example: amount
            request_id:
              type: string
              example: req_abc123
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              type: invalid_request
              code: invalid_parameter
              message: Invalid parameter provided
              request_id: req_abc123
    Unauthorized:
      description: Unauthorized - Invalid or missing authentication
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              type: authentication_error
              code: invalid_token
              message: Invalid or expired access token
              request_id: req_abc123
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              type: invalid_request
              code: resource_not_found
              message: The requested resource was not found
              request_id: req_abc123
    Conflict:
      description: Conflict - Idempotency key conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              type: invalid_request
              code: idempotency_key_conflict
              message: Idempotency key already used with different parameters
              request_id: req_abc123
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Use the access token obtained from /v1/auth/token

````