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

# Create a collection

> Charges a payer's mobile money wallet. `from.accountNumber` is the payer's phone number and `from.code` the rail (e.g. `gh_mtn`); the payer gets a prompt on their phone and must approve it, so the collection starts `pending` and finishes `completed` or `failed` — listen for the `collection.completed` / `collection.failed` webhooks rather than polling. Money is credited in the collected currency (`to.currency` must match). `externalReference` is your idempotency key: an identical retry returns the original with status 200; the same reference with a different amount, payer, or method is rejected with 409.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/collections
openapi: 3.1.0
info:
  title: Chipper Platform API
  version: '2026-02-20'
  description: >-
    Payouts, collections, and FX across African rails — bank, mobile money, and
    stablecoins — through one API.
servers:
  - url: https://sandbox-api.platform.chipper.ai
    description: Sandbox (sk_test_ keys — simulated rails, no real money)
  - url: https://api.platform.chipper.ai
    description: Production (sk_live_ keys)
security:
  - bearerAuth: []
paths:
  /v1/collections:
    post:
      tags:
        - Collections
      summary: Create a collection
      description: >-
        Charges a payer's mobile money wallet. `from.accountNumber` is the
        payer's phone number and `from.code` the rail (e.g. `gh_mtn`); the payer
        gets a prompt on their phone and must approve it, so the collection
        starts `pending` and finishes `completed` or `failed` — listen for the
        `collection.completed` / `collection.failed` webhooks rather than
        polling. Money is credited in the collected currency (`to.currency` must
        match). `externalReference` is your idempotency key: an identical retry
        returns the original with status 200; the same reference with a
        different amount, payer, or method is rejected with 409.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                from:
                  type: object
                  properties:
                    accountNumber:
                      type: string
                      minLength: 1
                      maxLength: 50
                    code:
                      type: string
                      minLength: 1
                    amount:
                      anyOf:
                        - type: string
                          pattern: ^\d+(\.\d{1,8})?$
                        - type: number
                          exclusiveMinimum: 0
                    currency:
                      type: string
                      minLength: 2
                      maxLength: 10
                    kyc:
                      type: object
                      additionalProperties: {}
                  required:
                    - accountNumber
                    - code
                    - amount
                    - currency
                to:
                  type: object
                  properties:
                    currency:
                      type: string
                      minLength: 2
                      maxLength: 10
                narration:
                  type: string
                  maxLength: 500
                externalReference:
                  type: string
                  minLength: 1
                  maxLength: 255
                metadata:
                  type: object
                  additionalProperties: {}
              required:
                - from
                - externalReference
      responses:
        '200':
          description: >-
            Idempotent replay — this externalReference was already used with the
            same details, the original collection is returned.
          content:
            application/json:
              schema:
                type: object
                properties:
                  collection:
                    $ref: '#/components/schemas/Collection'
                required:
                  - collection
        '201':
          description: The collection was created and the payer has been prompted.
          content:
            application/json:
              schema:
                type: object
                properties:
                  collection:
                    $ref: '#/components/schemas/Collection'
                required:
                  - collection
        '400':
          description: Invalid request — the body failed validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: validation_error
                message: Request validation failed
                requestId: req_q7vei435zifs51ia0lqr
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: unauthorized
                message: Invalid API key
                requestId: req_q7vei435zifs51ia0lqr
        '403':
          description: The API key lacks the required scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: forbidden
                message: API key does not have the required scope
                requestId: req_q7vei435zifs51ia0lqr
        '409':
          description: >-
            This externalReference was already used with different amount,
            currency, method, or payer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: duplicate
                message: Collection with this externalReference already exists
                requestId: req_q7vei435zifs51ia0lqr
      security:
        - bearerAuth: []
components:
  schemas:
    Collection:
      type: object
      properties:
        id:
          type: string
          example: col_h2sk8dqz4mtv9xnp1wbf
        type:
          type: string
          enum:
            - mobile_money
            - virtual_account
            - crypto
          description: >-
            How the money arrived. `mobile_money` is a charge you initiated; the
            others are inbound deposits.
        status:
          type: string
          enum:
            - pending
            - processing
            - completed
            - failed
            - reversed
            - disputed
          description: >-
            Charges start `pending`, move to `processing` once the provider
            accepts, and end `completed` (balance credited) or `failed`.
        from:
          type: object
          properties:
            accountNumber:
              type:
                - string
                - 'null'
              description: >-
                Where the money came from: the payer's mobile money number, the
                virtual account number, or the crypto address.
              example: '233559630374'
            code:
              type:
                - string
                - 'null'
              description: >-
                Payment method code. Null for virtual account and crypto
                deposits.
              example: gh_mtn
            amount:
              type: string
              description: Decimal string — never parse as float for arithmetic.
              example: '150.00'
            currency:
              type: string
              example: GHS
          required:
            - accountNumber
            - code
            - amount
            - currency
        to:
          type: object
          properties:
            accountNumber:
              type:
                - string
                - 'null'
              description: Your balance account that is credited.
              example: GHS12345678
            amount:
              type: string
              description: Decimal string — never parse as float for arithmetic.
              example: '150.00'
            currency:
              type: string
              example: GHS
          required:
            - accountNumber
            - amount
            - currency
        fee:
          type:
            - object
            - 'null'
          properties:
            amount:
              type: string
              description: Decimal string — never parse as float for arithmetic.
              example: '1.50'
            currency:
              type: string
              example: GHS
          required:
            - amount
            - currency
        rate:
          type: string
          description: >-
            Always `1` — collections settle in the currency they arrive in. Use
            Conversions to change currency afterwards.
          example: '1'
        details:
          type:
            - object
            - 'null'
          additionalProperties: {}
          description: >-
            Null for charges. Virtual account deposits: `{ bank, accountNumber,
            accountName, sessionId }`. Crypto deposits: `{ hash, chain, tag }`.
        narration:
          type:
            - string
            - 'null'
          example: 'Order #1042'
        externalReference:
          type:
            - string
            - 'null'
          description: >-
            Your idempotency key on charges; null on deposits you did not
            initiate.
          example: order-1042
        metadata:
          type: object
          additionalProperties: {}
        statusMessage:
          type:
            - string
            - 'null'
          description: Failure reason when status is failed.
        completedAt:
          type:
            - string
            - 'null'
          format: date-time
        createdAt:
          type: string
          format: date-time
          example: '2026-08-01T09:12:44.000Z'
      required:
        - id
        - type
        - status
        - from
        - to
        - fee
        - rate
        - details
        - narration
        - externalReference
        - metadata
        - statusMessage
        - completedAt
        - createdAt
    Error:
      type: object
      properties:
        error:
          type: string
          description: Stable machine-readable code.
        message:
          type: string
          description: Human-readable explanation.
        requestId:
          type: string
          description: Echoed in the x-request-id response header — quote it to support.
      required:
        - error
        - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your API key: `sk_test_…` (sandbox) or `sk_live_…` (production).'

````