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

# Onramp and Offramp

> Initiates onramp and offramp requests.



## OpenAPI

````yaml post /ramp
openapi: 3.0.3
info:
  title: GetPartna Api Documentation
  version: '3.0'
servers:
  - url: https://staging-api.getpartna.com/v4
  - url: https://api.getpartna.com/v4
security:
  - x-api-key: []
    x-api-user: []
  - authorization: []
tags:
  - description: user endpoints
    name: User
  - description: account endpoints
    name: Account
  - description: transfer endpoints
    name: Transfer
  - description: supported assets and networks
    name: Supported
  - description: discount endpoints
    name: Discount
  - description: rate endpoints
    name: Rate
  - description: KYC endpoints
    name: KYC
  - description: Multi-Factor Authentication endpoints
    name: MFA
  - description: ramp endpoints
    name: Ramp
  - description: pricing endpoints
    name: Pricing
  - description: banks
    name: Bank
  - description: mock endpoints for testing
    name: Mock
paths:
  /ramp:
    post:
      tags:
        - Ramp
      summary: Onramp and Offramp
      description: Initiates onramp and offramp requests.
      operationId: post-ramp
      requestBody:
        content:
          application/json:
            schema:
              example:
                accountName: ''
                accountNumber: ''
                bankCode: ''
                cancelPendingRampRequest: false
                cryptoAddress: ''
                expireAction: ''
                fromAmount: 0
                fromCurrency: ''
                fromNetwork: ''
                mobileNetwork: ''
                paymentNetwork: ''
                phoneID: ''
                rampExpTime: 0
                rampReference: ''
                rateKey: ''
                sendingAddress: ''
                shortcode: ''
                toAmount: 0
                toCurrency: ''
                toNetwork: ''
                type: ''
              properties:
                accountName:
                  description: accountname of the user (not bank account name)
                  type: string
                accountNumber:
                  type: string
                bankCode:
                  type: string
                cancelPendingRampRequest:
                  description: >-
                    users can only have one pending RampRequest at a time; if
                    you have a pending RampRequest, set CancelPendingRampRequest
                    as true; defaults to false
                  type: boolean
                cryptoAddress:
                  type: string
                expireAction:
                  description: >-
                    allows you to choose what should happen to your ramp request
                    if the current rate is no longer applicable; default is
                    useCurrentRate
                  enum:
                    - useCurrentRate
                    - deposit
                  type: string
                fromAmount:
                  type: number
                fromCurrency:
                  enum:
                    - BTC
                    - ETH
                    - USDC
                    - USDT
                    - CUSD
                    - BNB
                    - NGN
                    - KES
                  type: string
                fromNetwork:
                  enum:
                    - avalanche
                    - base
                    - binance
                    - bitcoin
                    - celo
                    - ethereum
                    - polygon
                    - tron
                    - solana
                    - naira
                    - mobileMoney
                    - mpesa
                    - kenyanshilling
                  type: string
                mobileNetwork:
                  description: mobileNetwork, required if ToNetwork is kenyanshilling
                  enum:
                    - Safaricom
                    - Airtel
                  type: string
                paymentNetwork:
                  description: paymentNetwork, required if ToNetwork is kenyanshilling
                  enum:
                    - MOBILE
                    - BUY_GOODS
                    - PAYBILL
                  type: string
                phoneID:
                  type: string
                rampExpTime:
                  description: >-
                    allows you to set when you need the ramp to expire or
                    cancel; default is 1 hour
                  type: number
                rampReference:
                  type: string
                rateKey:
                  type: string
                sendingAddress:
                  description: >-
                    Address from which the user will be sending or receiving
                    funds
                  type: string
                shortcode:
                  description: shortcode, required if ToNetwork is kenyanshilling
                  type: string
                toAmount:
                  type: number
                toCurrency:
                  enum:
                    - BTC
                    - ETH
                    - USDC
                    - USDT
                    - CUSD
                    - BNB
                    - NGN
                    - KES
                  type: string
                toNetwork:
                  enum:
                    - avalanche
                    - base
                    - binance
                    - bitcoin
                    - celo
                    - ethereum
                    - polygon
                    - tron
                    - solana
                    - naira
                    - mobileMoney
                    - mpesa
                    - kenyanshilling
                  type: string
                type:
                  description: >-
                    initiate offramp with cryptoToFiat type and onramp with
                    fiatToCrypto type
                  enum:
                    - fiatToCrypto
                    - cryptoToFiat
                  type: string
              required:
                - fromCurrency
                - fromNetwork
                - toCurrency
                - toNetwork
                - rateKey
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                example:
                  data:
                    accountName: JANE DOE
                    accountNumber: '9003001002'
                    bankName: Paystack-Titan
                    currentRate: 0.000597221725
                    discountApplied: '0'
                    expiryDate: 1755873600
                    feeInFromCurrency: 16.74
                    feeInToCurrency: 0.01
                    fromAmount: 1000
                    fromCurrency: NGN
                    fromNetwork: naira
                    rampReference: f32c3925063447a54905d31305a14da5
                    toAmount: 0.5872
                    toCurrency: USDT
                    toNetwork: tron
                    totalFeesInFromCurrency: 16.74
                    totalFeesInToCurrency: 0.01
                  message: request completed
                properties:
                  data:
                    properties:
                      accountName:
                        type: string
                      accountNumber:
                        type: string
                      bankName:
                        type: string
                      currentRate:
                        type: number
                      discountApplied:
                        type: string
                      expiryDate:
                        type: number
                      feeInFromCurrency:
                        type: number
                      feeInToCurrency:
                        type: number
                      fromAmount:
                        type: number
                      fromCurrency:
                        type: string
                      fromNetwork:
                        type: string
                      rampReference:
                        type: string
                      toAmount:
                        type: number
                      toCurrency:
                        type: string
                      toNetwork:
                        type: string
                      totalFeesInFromCurrency:
                        type: number
                      totalFeesInToCurrency:
                        type: number
                    type: object
                  message:
                    type: string
                type: object
          description: post ramp ok
        '400':
          content:
            application/json:
              schema:
                example:
                  message: ramp reference already exists
                properties:
                  message:
                    type: string
                type: object
          description: post ramp bad request
      security:
        - x-api-key: []
          x-api-user: []
        - authorization: []
components:
  securitySchemes:
    x-api-key:
      in: header
      name: x-api-key
      type: apiKey
    x-api-user:
      in: header
      name: x-api-user
      type: apiKey
    authorization:
      bearerFormat: JWT
      scheme: bearer
      type: http

````