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

Orders

PreviousOrderNextBest offer

Get off-ramp orders

get

Returns a paginated list of orders. Filters can be applied to the list by providing query parameters.

Authorizations
Query parameters
cursorstringOptional

this parameter should be provided in order to get a next page from the pagination, it should be taken from "nextCursor" response value

limitintegerRequired

number from 1 to 100, describes how many records should be in each pagination page

paymentTypestring · enumOptional
  • CRYPTO_WALLET: User will pay with a crypto wallet
  • VIRTUAL_WALLET: Order will be paid from a merchant's virtual wallet
Possible values:
networkstring · enumOptionalPossible values:
assetstring · enumOptionalPossible values:
fromAddressstringOptional

address of a user wallet

userPhoneNumberstringOptional

phone number of the client, should include country code

hashstringOptional

hash of the user transaction

countryIsoCodestringOptional

country ISO code, e.g. NG

offrampTypestring · enumOptional

type of the offramp

Possible values:
orderParamsstringOptional

value of the orderParams query param during order creation

statusstring · enumOptional
  • initiated: The offramp order has been initiated
  • awaiting_transaction_confirmation: User sent the transaction hash and system is awaiting confirmation
  • transaction_confirmed: User transaction has been confirmed
  • transaction_failed: User transaction has failed
  • offramp_success: The offramp transaction has been successful
  • offramp_pending: The offramp transaction is pending
  • offramp_failed: The offramp transaction has failed
  • offramp_retry: The offramp transaction is being retried
  • refunding: The offramp transaction is being refunded
  • refunded: The offramp transaction has been refunded
  • refund_failed: The offramp transaction refund has failed
  • expired: The offramp order has expired
  • cancelled: The offramp order has been cancelled by the user
  • validating_transaction: The offramp transaction is being validated
  • transaction_invalid: The offramp transaction is invalid
Possible values:
Responses
200
Successful response
application/json
Responseall of
get
GET /api/offramp/orders HTTP/1.1
Host: sandbox-api.fonbnk.com
x-client-id: YOUR_API_KEY
Accept: */*
200

Successful response

{
  "list": [
    {
      "_id": "6603f8fc1c3f3f94d6b30818",
      "offerId": "65b8c6b8b188250081f30165",
      "network": "CELO",
      "asset": "CUSD",
      "paymentType": "CRYPTO_WALLET",
      "exchangeRate": 1268.6275,
      "cashout": {
        "localCurrencyAmount": 1294,
        "usdAmount": 1.02,
        "feeAmountUsd": 0.02,
        "feeAmountUsdFonbnk": 0.02,
        "feeAmountUsdPartner": 0,
        "feeAmountLocalCurrency": 26,
        "feeAmountLocalCurrencyFonbnk": 26,
        "feeAmountLocalCurrencyPartner": 0,
        "cryptoAmount": 1.02,
        "feeAmountCrypto": 0.02,
        "feeAmountCryptoFonbnk": 0.02,
        "feeAmountCryptoPartner": 0
      },
      "fromAddress": "0x5b7ae3c6c87F4A3F94b35c77233b13191eBFAD20",
      "toAddress": "0xe9bBDDCF0E8fcD41Bd1345aa5688B565931B0184",
      "status": "offramp_success",
      "createdAt": "2024-03-27T10:46:20.513Z",
      "expiresAt": "2024-03-27T11:46:20.509Z",
      "hash": "0xbda5dd11b17d65249238137f5d542320b66141ac96be3b750804354a6eadfb04",
      "statusHistory": [
        {
          "status": "initiated",
          "changedAt": "2024-03-27T10:46:20.509Z"
        },
        {
          "status": "initiated",
          "changedAt": "2024-03-27T10:46:20.522Z"
        },
        {
          "status": "awaiting_transaction_confirmation",
          "changedAt": "2024-03-27T10:46:31.007Z"
        },
        {
          "status": "transaction_confirmed",
          "changedAt": "2024-03-27T10:46:43.357Z"
        },
        {
          "status": "offramp_pending",
          "changedAt": "2024-03-27T10:46:44.568Z"
        },
        {
          "status": "offramp_success",
          "changedAt": "2024-03-27T10:50:02.649Z"
        }
      ],
      "requiredFields": {
        "bankCode": "011:02",
        "buyerBankAccountNumber": "3159586782",
        "phoneNumber": "2347000000007"
      },
      "countryIsoCode": "NG",
      "currencyIsoCode": "NGN",
      "offerRequiredFields": [
        {
          "label": "Phone number",
          "type": "phone",
          "value": "2347000000007"
        },
        {
          "label": "Bank name",
          "type": "enum",
          "value": "First Bank of Nigeria"
        },
        {
          "label": "Bank account Number",
          "type": "string",
          "value": "3179586682"
        }
      ],
      "orderParams": "43"
    }
  ],
  "nextCursor": "646c7e3ce2597a00921e2c53"
}