Fonbnk Docs
  • Intro
  • Integration Guide
  • On-ramp
    • How it works
    • URL Parameters
    • Webhook
  • Off-ramp
    • How it works
    • URL Parameters
    • Webhook
  • Reference
    • Servers
    • Signing requests
    • Endpoints
      • On-ramp
        • Assets
        • Order
        • Orders
        • Price
        • Providers
        • Limits
      • Off-ramp
        • Order
        • Orders
        • Best offer
        • Limits
        • Countries
        • Wallets
        • Validate fields
        • Create order
        • Confirm order
      • Util
        • Check address
        • Assets
      • Kyc
        • State
        • Submit
    • Specification
Powered by GitBook
On this page
  1. Reference
  2. Endpoints
  3. Off-ramp

Best offer

PreviousOrdersNextLimits

Get best offer

get

Returns the best offer for the provided country, network, asset, amount and off-ramp type.

Authorizations
Query parameters
amountnumberRequired

Amount of usd user wants to pay or amount of local currency user wants to receive depending on the currency param value

currencystring · enumRequired

Currency of the amount param

Possible values:
countrystringRequired

country ISO code, for example KE for Kenya, NG for Nigeria

typestring · enumRequiredPossible values:
networkstring · enumRequiredPossible values:
assetstring · enumRequiredPossible values:
Responses
200
Successful response
application/json
get
GET /api/offramp/best-offer HTTP/1.1
Host: sandbox-api.fonbnk.com
x-client-id: YOUR_API_KEY
Accept: */*
200

Successful response

{
  "offer": {
    "_id": "65b8c6b8b188250081f30165",
    "countryIsoCode": "NG",
    "currencyIsoCode": "NGN",
    "exchangeRate": 1260.2,
    "requiredFields": {
      "phoneNumber": {
        "type": "phone",
        "label": "Phone number",
        "required": true
      },
      "bankCode": {
        "required": true,
        "type": "enum",
        "label": "Bank name",
        "options": [
          {
            "value": "120001:02",
            "label": "9Payment Service Bank"
          },
          {
            "value": "801:02",
            "label": "Abbey Mortgage Bank"
          }
        ]
      },
      "buyerBankAccountNumber": {
        "type": "string",
        "label": "Bank account Number",
        "required": true
      }
    },
    "type": "bank"
  },
  "cashout": {
    "localCurrencyAmount": 6301,
    "usdAmount": 5,
    "feeAmountUsd": 0.12,
    "feeAmountUsdFonbnk": 0.12,
    "feeAmountUsdPartner": 0,
    "feeAmountLocalCurrency": 155,
    "feeAmountLocalCurrencyFonbnk": 155,
    "feeAmountLocalCurrencyPartner": 0,
    "cryptoAmount": 5,
    "feeAmountCrypto": 0.12,
    "feeAmountCryptoFonbnk": 0.12,
    "feeAmountCryptoPartner": 0
  }
}