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

# Test mode: partner fails



## OpenAPI

````yaml /openapi.json post /v1/test_helpers/payouts/{id}/fail
openapi: 3.1.0
info:
  title: One Pay API
  version: 0.1.0
  description: >-
    One API to collect payments and send payouts across Africa. Amounts are
    integers in minor units (XAF francs, NGN kobo). Guides: the One Pay
    developer docs.
servers:
  - url: https://onepay-api-eiy9.onrender.com
    description: One Pay (your key decides test or live)
  - url: http://localhost:3000
    description: Local development
security:
  - bearerAuth: []
paths:
  /v1/test_helpers/payouts/{id}/fail:
    post:
      tags:
        - Test helpers
      summary: 'Test mode: partner fails'
      operationId: postV1TestHelpersPayoutsIdFail
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/OptionalIdempotencyKey'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestFailRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payout'
        '400':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    OptionalIdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: Your unique key for this request; retries reuse it.
      schema:
        type: string
        minLength: 1
        maxLength: 255
  schemas:
    TestFailRequest:
      type: object
      properties:
        code:
          type: string
          pattern: ^[a-z_]{1,50}$
        message:
          type: string
          minLength: 1
          maxLength: 200
      additionalProperties: false
    Payout:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
          enum:
            - pending
            - processing
            - succeeded
            - failed
            - reversed
        amount:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        fee:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        total_debited:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        currency:
          type: string
          enum:
            - XAF
            - NGN
        method:
          type: string
          enum:
            - mobile_money
            - bank_transfer
        recipient:
          type: object
          properties:
            id:
              type:
                - string
                - 'null'
            phone:
              type:
                - string
                - 'null'
            name:
              type:
                - string
                - 'null'
          required:
            - id
            - phone
            - name
          additionalProperties: false
        reference:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        metadata:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type:
              - string
              - number
              - boolean
              - 'null'
        failure:
          anyOf:
            - type: object
              properties:
                code:
                  type: string
                message:
                  type:
                    - string
                    - 'null'
              required:
                - code
                - message
              additionalProperties: false
            - type: 'null'
        mode:
          type: string
          enum:
            - test
            - live
        created_at:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
        updated_at:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
        succeeded_at:
          anyOf:
            - type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
            - type: 'null'
        failed_at:
          anyOf:
            - type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
            - type: 'null'
      required:
        - id
        - status
        - amount
        - fee
        - total_debited
        - currency
        - method
        - recipient
        - reference
        - description
        - metadata
        - failure
        - mode
        - created_at
        - updated_at
        - succeeded_at
        - failed_at
      additionalProperties: false
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            request_id:
              type: string
          required:
            - code
            - message
            - request_id
          additionalProperties: false
      required:
        - error
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your secret key: sk_test_... or sk_live_...'

````

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