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

# Create a PIN

> Creates an Easypay PIN for an amount in rand. Your customer pays it through Easypay. The
USD/ZAR rate and the fee are locked when the PIN is created, and an unpaid PIN expires after
24 hours. Needs the `pins:create` scope (or a write key).




## OpenAPI

````yaml /api-reference/openapi.yaml post /pins
openapi: 3.1.0
info:
  title: Artery Partner API
  version: 0.2.0-draft
  summary: Collect rand in South Africa through Easypay PINs and receive US dollars.
  description: >
    The Artery Partner API lets your platform collect rand from customers in
    South Africa through

    Easypay PINs, and receive the net amount in US dollars on your Artery
    balance. You fund and

    withdraw that balance in stablecoin.


    **Draft (1 Dec 2026).** Realigned by hand to the partner routes in
    `Nuage-Payments/jano-money`

    (`dev`): `artery/artery-b2b.controller.ts`,
    `custody/custody-withdrawals.controller.ts`,

    `artery/withdrawal-destinations.controller.ts`,
    `custody/funding.controller.ts`, with types from

    `packages/types/src/artery.ts` and `custody.ts`. The code also generates its
    own OpenAPI file

    (`@nestjs/swagger`, `/api/v1/docs-json`); once exported it should replace
    this file. Charges and

    transfers (the Flutterwave consumer rail) are left out: they're off on the
    standalone Artery API.
  contact:
    name: Artery support
    email: support@artery.money
    url: https://docs.artery.money
servers:
  - url: https://api.artery.money/api/v1/artery/b2b
    description: Live
  - url: https://uat-api.artery.money/api/v1/artery/b2b
    description: Test (UAT). The partner sandbox address is still to be confirmed.
security:
  - apiKey: []
tags:
  - name: Account
    description: Check which organization and key you're using.
  - name: PINs
    description: Easypay PINs your customers pay.
  - name: Balance
    description: Your balance in US dollars.
  - name: Funding
    description: Stablecoin deposit addresses and the deposits made to them.
  - name: Withdrawals
    description: Withdrawal wallets and withdrawals in stablecoin.
paths:
  /pins:
    post:
      tags:
        - PINs
      summary: Create a PIN
      description: >
        Creates an Easypay PIN for an amount in rand. Your customer pays it
        through Easypay. The

        USD/ZAR rate and the fee are locked when the PIN is created, and an
        unpaid PIN expires after

        24 hours. Needs the `pins:create` scope (or a write key).
      operationId: createPin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PinCreate'
            example:
              amount_cents: 185000
              partner_ref: ORD-88421
      responses:
        '201':
          description: The PIN was created and is unpaid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pin'
              example:
                collection_id: '00000123'
                pin: '95974010123456789012'
                amount_cents: 185000
                currency: ZAR
                status: UNPAID
                is_reusable: false
                min_amount_cents: null
                max_amount_cents: null
                label: null
                total_collected_cents: 0
                payment_count: 0
                created_at: '2026-09-16T09:12:00.000Z'
                expires_at: '2026-09-17T09:12:00.000Z'
                paid_at: null
                partner_ref: ORD-88421
                rate_lock:
                  pair: USD/ZAR
                  rate: '16.69210000'
                  locked_until: '2026-09-17T09:12:00.000Z'
                  expected_usd_cents_gross: 11083
                  expected_usd_cents_net: 10695
                  fee_lines:
                    - code: billpay_deposit
                      description: Easypay PIN deposit
                      fee_type: PERCENTAGE
                      percent: 3.5
                      flat_fee_zar_cents: 0
                      amount_zar_cents: 6475
                      amount_usd_cents: 388
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    PinCreate:
      type: object
      required:
        - amount_cents
      properties:
        amount_cents:
          type: integer
          minimum: 1
          description: >-
            The rand amount your customer pays, in cents (R1,850.00 = `185000`).
            Must be within your limits.
        partner_ref:
          type: string
          minLength: 1
          maxLength: 128
          description: >-
            Your own reference, such as an order id. Echoed in `deposit.*`
            webhooks.
    Pin:
      type: object
      properties:
        collection_id:
          type: string
          description: Artery's id for the PIN, eight digits.
        pin:
          type: string
          description: The 20-digit Easypay number your customer pays.
        amount_cents:
          type: integer
          description: Rand amount in cents.
        currency:
          type: string
          enum:
            - ZAR
        status:
          type: string
          enum:
            - UNPAID
            - PAID
            - EXPIRED
            - VOIDED
        is_reusable:
          type: boolean
        min_amount_cents:
          type:
            - integer
            - 'null'
          description: Reusable PINs only.
        max_amount_cents:
          type:
            - integer
            - 'null'
          description: Reusable PINs only.
        label:
          type:
            - string
            - 'null'
          description: Reusable PINs only.
        total_collected_cents:
          type: integer
        payment_count:
          type: integer
        created_at:
          type: string
          format: date-time
        expires_at:
          type: string
          format: date-time
        paid_at:
          type:
            - string
            - 'null'
          format: date-time
        partner_ref:
          type:
            - string
            - 'null'
        rate_lock:
          oneOf:
            - $ref: '#/components/schemas/RateLock'
            - type: 'null'
    RateLock:
      type: object
      description: The rate and fee locked for this PIN until it expires.
      properties:
        pair:
          type: string
          enum:
            - USD/ZAR
        rate:
          type: string
          description: Rand per US dollar
          8 decimal places.: null
        locked_until:
          type: string
          format: date-time
        expected_usd_cents_gross:
          type: integer
          description: Rand amount at the locked rate
          rounded down.: null
        expected_usd_cents_net:
          type: integer
          description: Gross minus fees; what you'll be credited.
        fee_lines:
          type: array
          items:
            $ref: '#/components/schemas/FeeLine'
    Error:
      type: object
      required:
        - statusCode
        - message
      properties:
        statusCode:
          type: integer
        message:
          description: An error code such as `INVALID_AMOUNT`, or a short explanation.
          oneOf:
            - type: string
            - type: array
              items:
                type: string
        error:
          type: string
    FeeLine:
      type: object
      properties:
        code:
          type: string
        description:
          type: string
        fee_type:
          type: string
        percent:
          type: number
        flat_fee_zar_cents:
          type: integer
        amount_zar_cents:
          type: integer
        amount_usd_cents:
          type: integer
  responses:
    BadRequest:
      description: >-
        The request is invalid, for example `INVALID_AMOUNT`,
        `AMOUNT_EXCEEDS_LIMIT` or `INVALID_COLLECTION_ID`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 400
            message: AMOUNT_EXCEEDS_LIMIT
            error: Bad Request
    Unauthorized:
      description: >-
        The key is missing, malformed, unknown, expired, or for the other
        environment.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 401
            message: Invalid API key
            error: Unauthorized
    Forbidden:
      description: >-
        The key lacks the scope, or the request came from an address not on the
        key's IP allowlist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 403
            message: IP not allowed
            error: Forbidden
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >
        Send your key as `Authorization: Bearer <key>`. Sandbox keys start
        `art_test_ro_` (read) or

        `art_test_rw_` (write). A key only works in its own environment, and a
        key with an IP

        allowlist only works from those addresses.

````

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