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

# Create a new collection (initiate inbound payment)



## OpenAPI

````yaml POST /v1/collections/{market}/rails/{rail}
openapi: 3.0.0
info:
  title: EQXPay API
  description: >-
    EQX v2.5 staging API for admin, liquidity-provider, and integrator
    operations.
  version: 2.5.0
  contact: {}
servers: []
security: []
tags: []
paths:
  /v1/collections/{market}/rails/{rail}:
    post:
      tags:
        - Collections
      summary: Create a new collection (initiate inbound payment)
      operationId: CollectionsController_createCollection
      parameters:
        - name: market
          required: true
          in: path
          schema:
            type: string
            example: MW
        - name: rail
          required: true
          in: path
          schema:
            type: string
            example: mobile_money
        - name: Idempotency-Key
          in: header
          description: Required; prevents duplicate charges on retry
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCollectionRequestDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionResponseDto'
        '400':
          description: Invalid market, rail, or customer fields
        '401':
          description: Unauthorized
        '422':
          description: Missing Idempotency-Key or amount out of range
      security:
        - bearer: []
components:
  schemas:
    CreateCollectionRequestDto:
      type: object
      properties:
        amount:
          type: number
          example: 5000
          description: Amount in minor currency units (e.g. MWK tambala)
        currency:
          type: string
          example: MWK
        reference:
          type: string
          example: INV-2026-001
          description: Integrator reconciliation reference
        customer:
          type: object
          example:
            phone_number: '+265991234567'
          description: Rail-required customer fields
        metadata:
          type: object
          example:
            order_id: ORD-123
          description: Arbitrary integrator metadata preserved in all webhook payloads
      required:
        - amount
        - currency
        - reference
        - customer
    CollectionResponseDto:
      type: object
      properties:
        collection_id:
          type: string
          example: e3d4b5c6-...
        integrator_id:
          type: string
          example: f1a2b3c4-...
        market:
          type: string
          example: MW
        rail:
          type: string
          example: mobile_money
        amount:
          type: number
          example: 5000
        currency:
          type: string
          example: MWK
        reference:
          type: string
          example: INV-2026-001
        status:
          type: string
          example: pending
          description: >-
            Canonical status: created | pending | processing | successful |
            failed | expired | refunded | reversed
        customer:
          type: object
          example:
            phone_number: '+265991234567'
        metadata:
          type: object
          example:
            order_id: ORD-123
        payment_instruction:
          type: object
          description: >-
            Provider payment instruction (e.g. USSD string, STK reference); null
            when provider is purely async
          example: null
        created_at:
          format: date-time
          type: string
        updated_at:
          format: date-time
          type: string
        expires_at:
          format: date-time
          type: string
      required:
        - collection_id
        - integrator_id
        - market
        - rail
        - amount
        - currency
        - reference
        - status
        - customer
        - created_at
        - updated_at
        - expires_at
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````