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

# Initiate On-Ramp

> Start an on-ramp transaction. Returns bank account details where the user should transfer NGN.

**Flow:**
1. Call this endpoint with a valid `quoteId`
2. Display the `depositAccount` details to your user
3. User transfers the exact NGN `amount` via bank transfer
4. Zet detects the deposit, converts to crypto, and delivers to the wallet
5. You receive an `onramp.completed` webhook when done

For **custodial** flow, provide `walletId`. For **non-custodial** flow, provide `destinationAddress`.




## OpenAPI

````yaml POST /onramp/initiate
openapi: 3.1.0
info:
  title: Zet API
  description: >
    The Zet API enables businesses to integrate smart on/off ramp, token swap,
    and cross-chain transfer capabilities into their applications.


    Built on ERC-4337 smart accounts with gas-sponsored transactions, Zet
    handles the complexity of blockchain interactions so you can focus on your
    product.


    ## Base URL


    ```

    https://api.zet.money/v1

    ```


    ## Authentication


    All requests must include your API key in the `x-api-key` header. Contact
    [zetdotmoney@gmail.com](mailto:zetdotmoney@gmail.com) to obtain your API
    keys.


    ## Rate Limits


    - **60 requests per minute** per API key (default)

    - Rate limit headers are included in every response

    - Contact us for higher limits
  version: 1.0.0
  contact:
    name: Zet Support
    url: https://zet.money/support
    email: support@zet.money
  license:
    name: Proprietary
servers:
  - url: https://api.zet.money/v1
    description: Production
  - url: https://api-staging.zet.money/v1
    description: Staging
security:
  - apiKey: []
tags:
  - name: Wallets
    description: Create and manage smart wallets for your users
  - name: On-Ramp
    description: Buy crypto with Nigerian Naira (NGN)
  - name: Off-Ramp
    description: Sell crypto for Nigerian Naira (NGN)
  - name: Swap
    description: Swap tokens on the same chain or across chains
  - name: Cross-Chain Transfer
    description: Transfer tokens across different blockchains
  - name: Webhooks
    description: Register webhook URLs to receive async event notifications
  - name: Transactions
    description: Query transaction history and details
paths:
  /onramp/initiate:
    post:
      tags:
        - On-Ramp
      summary: Initiate on-ramp
      description: >
        Start an on-ramp transaction. Returns bank account details where the
        user should transfer NGN.


        **Flow:**

        1. Call this endpoint with a valid `quoteId`

        2. Display the `depositAccount` details to your user

        3. User transfers the exact NGN `amount` via bank transfer

        4. Zet detects the deposit, converts to crypto, and delivers to the
        wallet

        5. You receive an `onramp.completed` webhook when done


        For **custodial** flow, provide `walletId`. For **non-custodial** flow,
        provide `destinationAddress`.
      operationId: initiateOnramp
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OnrampInitiateRequest'
      responses:
        '200':
          description: On-ramp initiated. Display deposit details to user.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/OnrampInitiateResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    OnrampInitiateRequest:
      type: object
      required:
        - quoteId
        - walletId
      properties:
        quoteId:
          type: string
          description: Quote ID from a prior `/onramp/quote` call.
          example: qt_01H8X3...
        walletId:
          type: string
          description: Zet wallet ID to receive the crypto. Required for custodial flow.
          example: wal_01H8X3...
        destinationAddress:
          type: string
          description: >-
            External wallet address to receive crypto. Used for non-custodial
            flow. Mutually exclusive with `walletId`.
          example: 0xabc...
        reference:
          type: string
          description: >-
            Your unique reference for this transaction. If not provided, one is
            generated.
          example: order_12345
        callbackUrl:
          type: string
          format: uri
          description: >-
            URL to receive webhook events for this specific transaction.
            Overrides the default webhook URL.
          example: https://yourapp.com/webhooks/zet
    OnrampInitiateResponse:
      type: object
      properties:
        transactionId:
          type: string
          example: txn_01H8X3...
        reference:
          type: string
          example: order_12345
        status:
          $ref: '#/components/schemas/TransactionStatus'
        depositAccount:
          type: object
          description: Bank account details where the user should send NGN.
          properties:
            bankName:
              type: string
              example: Wema Bank
            bankCode:
              type: string
              example: '035'
            accountNumber:
              type: string
              example: '0123456789'
            accountName:
              type: string
              example: Zet / John Doe
        amount:
          type: string
          description: Exact NGN amount the user must transfer.
          example: '50120'
        expiresAt:
          type: string
          format: date-time
          description: Deadline for the bank transfer. Typically 30 minutes.
    TransactionStatus:
      type: string
      enum:
        - pending
        - completed
        - failed
    Error:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: INVALID_REQUEST
            message:
              type: string
              example: The 'amount' field is required.
  responses:
    BadRequest:
      description: Invalid request parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error:
              code: INVALID_REQUEST
              message: The 'amount' field must be a positive number.
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error:
              code: UNAUTHORIZED
              message: Invalid API key.
    RateLimited:
      description: Rate limit exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error:
              code: RATE_LIMITED
              message: Rate limit exceeded. Try again in 60 seconds.
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Your Zet API key. Contact zetdotmoney@gmail.com to obtain your keys.

````