> ## 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.

# Get a payin



## OpenAPI

````yaml /openapi.json get /v1/payins/{id}
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/payins/{id}:
    get:
      tags:
        - Payins
      summary: Get a payin
      operationId: getV1PayinsId
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payin'
        '401':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Payin:
      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
        net_amount:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        currency:
          type: string
          enum:
            - XAF
            - NGN
        method:
          type: string
          enum:
            - mobile_money
            - bank_transfer
        customer:
          type: object
          properties:
            phone:
              type:
                - string
                - 'null'
            email:
              type:
                - string
                - 'null'
            name:
              type:
                - string
                - 'null'
          required:
            - phone
            - email
            - 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'
        next_action:
          anyOf:
            - type: object
              properties:
                type:
                  type: string
                  const: redirect_to_url
                url:
                  type: string
              required:
                - type
                - url
              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'
        settled_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
        - net_amount
        - currency
        - method
        - customer
        - reference
        - description
        - metadata
        - failure
        - next_action
        - mode
        - created_at
        - updated_at
        - succeeded_at
        - failed_at
        - settled_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.