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. On-ramp

Orders

PreviousOrderNextPrice

Get orders

get

Returns a paginated list of pay widget 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

walletTypestring · enumOptional

wallet type of orders

Possible values:
walletAddressstringOptional
userPhoneNumberstringOptional

phone number of the client, should include country code

swapProviderstring · enumOptionalPossible values:
buySwapStatusstring · enumOptional
  • initiated: The buy swap has been initiated
  • expired: The buy swap has expired
  • buyer_confirmed: The buyer has confirmed the buy swap
  • seller_confirmation_pending: The agent is yet to confirm the buy swap
  • seller_confirmation_failed: The agent has failed to confirm the buy swap
  • seller_confirmed: The agent has confirmed the buy swap
  • seller_rejected: The agent has rejected the buy swap
Possible values:
withdrawalStatusstring · enumOptional

status of a crypto transfer

Possible values:
Responses
200
Successful response
application/json
Responseall of
get
GET /api/pay-widget-merchant/orders HTTP/1.1
Host: sandbox-api.fonbnk.com
x-client-id: YOUR_API_KEY
Accept: */*
200

Successful response

{
  "nextCursor": "651e764399a4b360c7eb0178",
  "list": [
    {
      "_id": "651e764399a4b360c7eb0178",
      "walletType": "SOLANA",
      "asset": "USDC",
      "walletAddress": "53L9ahwHcNnD4F11TqNHQgVUa75WgaCL2WGeiKiK2gCc",
      "feePercent": 2.5,
      "fonbnkFeePercent": 1.5,
      "partnerFeePercent": 1,
      "gasUsdAmount": 0,
      "merchantId": "645a20cbaf1d31dbd52c0fda",
      "createdAt": "2023-10-05T08:39:31.691Z",
      "buySwap": {
        "_id": "651e764399a4b360c7eb016d",
        "buyerUserPhone": "380962669394",
        "sellerUserPhone": "380960000000",
        "amount": 210,
        "airtimeAmount": 2100,
        "status": "seller_confirmed",
        "provider": "bank_transfer",
        "expiresAt": "2023-10-05T09:39:31.492Z",
        "createdAt": "2023-10-05T08:39:31.500Z",
        "buyerConfirmedAt": "2023-10-05T08:39:37.027Z",
        "countryIsoCode": "NG"
      },
      "withdrawal": {
        "_id": "651e7653db37ee6b74883fe1",
        "status": "complete",
        "withdrawAmount": 2,
        "withdrawCryptoAmount": 2,
        "transactionHash": "F19TfyGxBgebZt4q8h5bgf9Luabpypm3zSSzWR5ZUp8CKGNvL2r58zqGvWXvKftppiWKszV11jNQtsMUoFppmyb"
      },
      "feeAmount": 0.05,
      "localCurrencyFeeAmount": 50,
      "fonbnkFeeAmount": 0.03,
      "localCurrencyFonbnkFeeAmount": 30,
      "partnerFeeAmount": 0.02,
      "localCurrencyPartnerFeeAmount": 20,
      "networkFeeAmount": 0,
      "localCurrencyNetworkFeeAmount": 0,
      "resumeUrl": "https://pay.fonbnk.com/swap-status?orderId=651e764399a4b360c7eb0178"
    }
  ]
}