> For the complete documentation index, see [llms.txt](https://docs.fonbnk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fonbnk.com/v1.5/endpoints/models.md).

# Models

## The KycRequiredFieldType object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"KycRequiredFieldType":{"type":"string","enum":["number","string","date","boolean","email","phone","smile-identity-images"]}}}}
```

## The OnRampNetwork object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"OnRampNetwork":{"type":"string","enum":["POLYGON","ETHEREUM","STELLAR","AVALANCHE","SOLANA","CELO","BASE","TON","TRON","LISK","ARBITRUM","OPTIMISM","BNB"]}}}}
```

## The OnRampAsset object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"OnRampAsset":{"type":"string","enum":["USDC","USDT","CUSD","CKES","CGHS","USDE"]}}}}
```

## The OnRampOrderStatus object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"OnRampOrderStatus":{"type":"string","enum":["swap_initiated","swap_expired","swap_buyer_rejected","swap_buyer_confirmed","swap_seller_rejected","swap_seller_confirmed","pending","complete","failed"],"description":"- swap_initiated: user has created an order\n- swap_expired: an order has expired\n- swap_buyer_rejected: user has rejected an order\n- swap_buyer_confirmed: user has confirmed an order\n- swap_seller_rejected: agent has rejected an order, happens when agent don't receive a payment\n- swap_seller_confirmed: agent has confirmed an order\n- pending: crypto transaction is pending\n- complete: crypto transaction is complete\n- failed: crypto transaction has failed"}}}}
```

## The BuySwapStatus object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"BuySwapStatus":{"type":"string","enum":["initiated","expired","buyer_confirmed","seller_confirmation_pending","seller_confirmation_failed","seller_confirmed","seller_rejected"],"description":"- initiated: The buy swap has been initiated\n- expired: The buy swap has expired\n- buyer_confirmed: The buyer has confirmed the buy swap\n- seller_confirmation_pending: The agent is yet to confirm the buy swap\n- seller_confirmation_failed: The agent has failed to confirm the buy swap\n- seller_confirmed: The agent has confirmed the buy swap\n- seller_rejected: The agent has rejected the buy swap"}}}}
```

## The OnRampPaymentChannel object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"OnRampPaymentChannel":{"type":"string","enum":["bank","mobile_money","airtime"]}}}}
```

## The WithdrawalStatus object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"WithdrawalStatus":{"type":"string","enum":["pending","complete","failed"]}}}}
```

## The OnRampOrder object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"OnRampOrder":{"type":"object","properties":{"_id":{"type":"string","description":"Order ID"},"status":{"$ref":"#/components/schemas/OnRampOrderStatus"},"date":{"type":"string","format":"date-time","description":"Date of order creation"},"orderId":{"type":"string","description":"Order ID"},"phoneNumber":{"type":"string","description":"User phone number, should include country code"},"email":{"type":"string","description":"User email address"},"localCurrencyAmount":{"type":"number","description":"Amount in local currency"},"currencyIsoCode":{"type":"string","description":"Local currency ISO code, e.g. NGN, KES"},"countryIsoCode":{"type":"string","description":"Country ISO code, e.g. NG"},"paymentChannel":{"$ref":"#/components/schemas/OnRampPaymentChannel","description":"Payment channel used for the order, e.g. bank, mobile_money, airtime"},"amount":{"type":"number","description":"Amount in USD"},"amountCrypto":{"type":"number","description":"Amount in crypto"},"network":{"$ref":"#/components/schemas/OnRampNetwork","description":"Blockchain network of the order, e.g. POLYGON, ETHEREUM, STELLAR"},"asset":{"$ref":"#/components/schemas/OnRampAsset","description":"Blockchain asset of the order, e.g. USDC, USDT, CUSD"},"address":{"type":"string","description":"User wallet address"},"memo":{"type":"string","description":"Memo for the Stellar, TON and other networks transactions that support it"},"hash":{"type":"string","description":"Transaction hash if available"},"orderParams":{"type":"string","description":"Value of the orderParams query param during order creation"},"resumeUrl":{"type":"string","description":"URL to resume the order in the pay widget"},"carrierId":{"type":"string","description":"Carrier ID if applicable, e.g. for mobile money orders"},"feePercent":{"type":"number","description":"total fee percent (fonbnk fee + partner fee)"},"feePercentFonbnk":{"type":"number","description":"fonbnk fee percent"},"feePercentPartner":{"type":"number","description":"partner fee percent"},"feeAmountUsd":{"type":"number","description":"Total fee amount in USD"},"feeAmountLocalCurrency":{"type":"number","description":"Total fee amount in local currency"},"feeAmountUsdFonbnk":{"type":"number","description":"Fonbnk fee amount in USD"},"feeAmountLocalCurrencyFonbnk":{"type":"number","description":"Fonbnk fee amount in local currency"},"feeAmountUsdPartner":{"type":"number","description":"Partner fee amount in USD"},"feeAmountLocalCurrencyPartner":{"type":"number","description":"Partner fee amount in local currency"},"gasAmountUsd":{"type":"number","description":"Gas fee amount in USD"},"gasAmountLocalCurrency":{"type":"number","description":"Gas fee amount in local currency"},"transferInstructions":{"type":"object","properties":{"type":{"type":"string","description":"Type of action required to complete the order","enum":["manual","redirect","stk_push","otp_stk_push","ussd"]},"ussdCode":{"type":"string","description":"USSD code a user needs to dial to complete the order, present only if type is \"ussd\". May include \"{pin}\" placeholder for user PIN, e.g. \"*123*{pin}#\" in this case it should be replaced with their PIN"},"paymentUrl":{"type":"string","description":"URL to redirect the user to complete the payment, present only if type is \"redirect\""},"instructionsText":{"type":"string","description":"Text with instructions for the user to complete the order"},"warningText":{"type":"string","description":"Warning text for the user"},"transferDetails":{"type":"object","properties":{"key":{"type":"object","properties":{"label":{"type":"string","description":"Label for the transfer detail"},"description":{"type":"string","description":"Description of the transfer detail"},"value":{"type":"string","description":"Value of the transfer detail, e.g. account number, phone number, etc."}}}}}}}}},"OnRampOrderStatus":{"type":"string","enum":["swap_initiated","swap_expired","swap_buyer_rejected","swap_buyer_confirmed","swap_seller_rejected","swap_seller_confirmed","pending","complete","failed"],"description":"- swap_initiated: user has created an order\n- swap_expired: an order has expired\n- swap_buyer_rejected: user has rejected an order\n- swap_buyer_confirmed: user has confirmed an order\n- swap_seller_rejected: agent has rejected an order, happens when agent don't receive a payment\n- swap_seller_confirmed: agent has confirmed an order\n- pending: crypto transaction is pending\n- complete: crypto transaction is complete\n- failed: crypto transaction has failed"},"OnRampPaymentChannel":{"type":"string","enum":["bank","mobile_money","airtime"]},"OnRampNetwork":{"type":"string","enum":["POLYGON","ETHEREUM","STELLAR","AVALANCHE","SOLANA","CELO","BASE","TON","TRON","LISK","ARBITRUM","OPTIMISM","BNB"]},"OnRampAsset":{"type":"string","enum":["USDC","USDT","CUSD","CKES","CGHS","USDE"]}}}}
```

## The Paginated object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"Paginated":{"type":"object","properties":{"nextCursor":{"type":"string"}}}}}}
```

## The PaginatedOnrampOrders object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"PaginatedOnrampOrders":{"allOf":[{"$ref":"#/components/schemas/Paginated"},{"type":"object","properties":{"list":{"type":"array","items":{"$ref":"#/components/schemas/OnRampOrder"}}}}]},"Paginated":{"type":"object","properties":{"nextCursor":{"type":"string"}}},"OnRampOrder":{"type":"object","properties":{"_id":{"type":"string","description":"Order ID"},"status":{"$ref":"#/components/schemas/OnRampOrderStatus"},"date":{"type":"string","format":"date-time","description":"Date of order creation"},"orderId":{"type":"string","description":"Order ID"},"phoneNumber":{"type":"string","description":"User phone number, should include country code"},"email":{"type":"string","description":"User email address"},"localCurrencyAmount":{"type":"number","description":"Amount in local currency"},"currencyIsoCode":{"type":"string","description":"Local currency ISO code, e.g. NGN, KES"},"countryIsoCode":{"type":"string","description":"Country ISO code, e.g. NG"},"paymentChannel":{"$ref":"#/components/schemas/OnRampPaymentChannel","description":"Payment channel used for the order, e.g. bank, mobile_money, airtime"},"amount":{"type":"number","description":"Amount in USD"},"amountCrypto":{"type":"number","description":"Amount in crypto"},"network":{"$ref":"#/components/schemas/OnRampNetwork","description":"Blockchain network of the order, e.g. POLYGON, ETHEREUM, STELLAR"},"asset":{"$ref":"#/components/schemas/OnRampAsset","description":"Blockchain asset of the order, e.g. USDC, USDT, CUSD"},"address":{"type":"string","description":"User wallet address"},"memo":{"type":"string","description":"Memo for the Stellar, TON and other networks transactions that support it"},"hash":{"type":"string","description":"Transaction hash if available"},"orderParams":{"type":"string","description":"Value of the orderParams query param during order creation"},"resumeUrl":{"type":"string","description":"URL to resume the order in the pay widget"},"carrierId":{"type":"string","description":"Carrier ID if applicable, e.g. for mobile money orders"},"feePercent":{"type":"number","description":"total fee percent (fonbnk fee + partner fee)"},"feePercentFonbnk":{"type":"number","description":"fonbnk fee percent"},"feePercentPartner":{"type":"number","description":"partner fee percent"},"feeAmountUsd":{"type":"number","description":"Total fee amount in USD"},"feeAmountLocalCurrency":{"type":"number","description":"Total fee amount in local currency"},"feeAmountUsdFonbnk":{"type":"number","description":"Fonbnk fee amount in USD"},"feeAmountLocalCurrencyFonbnk":{"type":"number","description":"Fonbnk fee amount in local currency"},"feeAmountUsdPartner":{"type":"number","description":"Partner fee amount in USD"},"feeAmountLocalCurrencyPartner":{"type":"number","description":"Partner fee amount in local currency"},"gasAmountUsd":{"type":"number","description":"Gas fee amount in USD"},"gasAmountLocalCurrency":{"type":"number","description":"Gas fee amount in local currency"},"transferInstructions":{"type":"object","properties":{"type":{"type":"string","description":"Type of action required to complete the order","enum":["manual","redirect","stk_push","otp_stk_push","ussd"]},"ussdCode":{"type":"string","description":"USSD code a user needs to dial to complete the order, present only if type is \"ussd\". May include \"{pin}\" placeholder for user PIN, e.g. \"*123*{pin}#\" in this case it should be replaced with their PIN"},"paymentUrl":{"type":"string","description":"URL to redirect the user to complete the payment, present only if type is \"redirect\""},"instructionsText":{"type":"string","description":"Text with instructions for the user to complete the order"},"warningText":{"type":"string","description":"Warning text for the user"},"transferDetails":{"type":"object","properties":{"key":{"type":"object","properties":{"label":{"type":"string","description":"Label for the transfer detail"},"description":{"type":"string","description":"Description of the transfer detail"},"value":{"type":"string","description":"Value of the transfer detail, e.g. account number, phone number, etc."}}}}}}}}},"OnRampOrderStatus":{"type":"string","enum":["swap_initiated","swap_expired","swap_buyer_rejected","swap_buyer_confirmed","swap_seller_rejected","swap_seller_confirmed","pending","complete","failed"],"description":"- swap_initiated: user has created an order\n- swap_expired: an order has expired\n- swap_buyer_rejected: user has rejected an order\n- swap_buyer_confirmed: user has confirmed an order\n- swap_seller_rejected: agent has rejected an order, happens when agent don't receive a payment\n- swap_seller_confirmed: agent has confirmed an order\n- pending: crypto transaction is pending\n- complete: crypto transaction is complete\n- failed: crypto transaction has failed"},"OnRampPaymentChannel":{"type":"string","enum":["bank","mobile_money","airtime"]},"OnRampNetwork":{"type":"string","enum":["POLYGON","ETHEREUM","STELLAR","AVALANCHE","SOLANA","CELO","BASE","TON","TRON","LISK","ARBITRUM","OPTIMISM","BNB"]},"OnRampAsset":{"type":"string","enum":["USDC","USDT","CUSD","CKES","CGHS","USDE"]}}}}
```

## The OnRampBestOfferResponse object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"OnRampBestOfferResponse":{"type":"object","properties":{"quoteId":{"type":"string","description":"Unique quote id"},"offer":{"type":"object","properties":{"paymentChannel":{"$ref":"#/components/schemas/OnRampPaymentChannel","description":"Type of the payment channel, e.g. bank, mobile_money, airtime"},"countryIsoCode":{"type":"string","description":"Country ISO code, e.g. NG for Nigeria, KE for Kenya"},"currencyIsoCode":{"type":"string","description":"Local currency ISO code, e.g. NGN for Nigerian Naira, KES for Kenyan Shilling"},"exchangeRate":{"type":"number","description":"Exchange rate for the order"},"cryptoExchangeRate":{"type":"number","description":"Exchange rate for the crypto amount"},"requiredFields":{"type":"object","description":"Data required to submit the order","additionalProperties":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/RequiredFieldType"},"label":{"type":"string"},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}}}}}}}}},"cashout":{"type":"object","properties":{"localCurrencyAmount":{"type":"number","description":"Amount in local currency user must to pay"},"totalAmountUsd":{"type":"number","description":"Total amount of local currency in USD user must to pay"},"totalAmountCrypto":{"type":"number","description":"Total amount of local currency in crypto user must to pay"},"withdrawAmountUsd":{"type":"number","description":"Amount in USD user will receive after the order is completed"},"withdrawAmountCrypto":{"type":"number","description":"Amount in crypto user will receive after the order is completed"},"feePercent":{"type":"number","description":"Total fee percent (fonbnk fee + partner fee)"},"feeAmountUsd":{"type":"number","description":"Total fee amount in USD"},"feeAmountLocalCurrency":{"type":"number","description":"Total fee amount in local currency"},"feeAmountCrypto":{"type":"number","description":"Total fee amount in crypto"},"feePercentFonbnk":{"type":"number","description":"Fonbnk fee percent"},"feeAmountUsdFonbnk":{"type":"number","description":"Fonbnk fee amount in USD"},"feeAmountLocalCurrencyFonbnk":{"type":"number","description":"Fonbnk fee amount in local currency"},"feeAmountCryptoFonbnk":{"type":"number","description":"Fonbnk fee amount in crypto"},"feePercentPartner":{"type":"number","description":"Partner fee percent"},"feeAmountUsdPartner":{"type":"number","description":"Partner fee amount in USD"},"feeAmountLocalCurrencyPartner":{"type":"number","description":"Partner fee amount in local currency"},"feeAmountCryptoPartner":{"type":"number","description":"Partner fee amount in crypto"},"gasAmountUsd":{"type":"number","description":"Gas fee amount in USD"},"gasAmountLocalCurrency":{"type":"number","description":"Gas fee amount in local currency"},"gasAmountCrypto":{"type":"number","description":"Gas fee amount in crypto"}}}}},"OnRampPaymentChannel":{"type":"string","enum":["bank","mobile_money","airtime"]},"RequiredFieldType":{"type":"string","enum":["number","string","date","boolean","email","enum"]}}}}
```

## The OnRampPaymentChannelListResponse object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"OnRampPaymentChannelListResponse":{"type":"array","items":{"type":"object","properties":{"countryIsoCode":{"type":"string","description":"ISO code of the country, e.g. NG for Nigeria, KE for Kenya"},"currencyIsoCode":{"type":"string","description":"ISO code of the local currency, e.g. NGN for Nigerian Naira, KES for Kenyan Shilling"},"name":{"type":"string","description":"Name of the country, e.g. Nigeria, Kenya"},"paymentChannels":{"type":"array","description":"List of payment channels available for the country","items":{"type":"object","properties":{"paymentChannel":{"type":"string","description":"Type of the payment channel, e.g. bank, mobile_money, airtime"},"description":{"type":"string","description":"Description of the payment channel"},"requiresCarrier":{"type":"boolean","description":"Indicates if the payment channel requires a carrier ID"},"carriers":{"type":"array","description":"List of carriers available for the payment channel","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the carrier"},"name":{"type":"string","description":"Name of the carrier, e.g. Safaricom, MTN"},"code":{"type":"string","description":"Code of the carrier, e.g. ng_mtn, ke_safaricom"}}}}}}}}}}}}}
```

## The OnRampLimitsResponse object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"OnRampLimitsResponse":{"type":"object","properties":{"minUsd":{"type":"number","description":"Minimum amount in USD for the order"},"maxUsd":{"type":"number","description":"Maximum amount in USD for the order"},"minLocalCurrency":{"type":"number","description":"Minimum amount in local currency for the order"},"maxLocalCurrency":{"type":"number","description":"Maximum amount in local currency for the order"},"minCrypto":{"type":"number","description":"Minimum amount in crypto for the order"},"maxCrypto":{"type":"number","description":"Maximum amount in crypto for the order"}}}}}}
```

## The OffRampOrderStatus object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"OffRampOrderStatus":{"type":"string","enum":["initiated","awaiting_transaction_confirmation","transaction_confirmed","transaction_failed","offramp_success","offramp_pending","offramp_failed","offramp_retry","refunding","refunded","refund_failed","expired","cancelled","validating_transaction","transaction_invalid"],"description":"- initiated: The offramp order has been initiated\n- awaiting_transaction_confirmation: User sent the transaction hash and system is awaiting confirmation\n- transaction_confirmed: User transaction has been confirmed\n- transaction_failed: User transaction has failed\n- offramp_success: The offramp transaction has been successful\n- offramp_pending: The offramp transaction is pending\n- offramp_failed: The offramp transaction has failed\n- offramp_retry: The offramp transaction is being retried\n- refunding: The offramp transaction is being refunded\n- refunded: The offramp transaction has been refunded\n- refund_failed: The offramp transaction refund has failed\n- expired: The offramp order has expired\n- cancelled: The offramp order has been cancelled by the user\n- validating_transaction: The offramp transaction is being validated\n- transaction_invalid: The offramp transaction is invalid"}}}}
```

## The OffRampNetwork object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"OffRampNetwork":{"type":"string","enum":["AVALANCHE","POLYGON","CELO","ETHEREUM"]}}}}
```

## The OffRampAsset object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"OffRampAsset":{"type":"string","enum":["USDC","USDT","CUSD","CKES","CGHS"]}}}}
```

## The OffRampType object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"OffRampType":{"type":"string","enum":["bank","airtime","mobile_money","paybill"]}}}}
```

## The KycType object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"KycType":{"type":"string","enum":["basic","advanced"]}}}}
```

## The KycStatus object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"KycStatus":{"type":"object","properties":{"passedKycType":{"type":"string","description":"The type of KYC the user has passed."},"kycStatus":{"type":"string","enum":["initiated","approved","rejected","invalid"],"description":"The current KYC status of the user."},"kycStatusDescription":{"type":"string","description":"A description of the KYC status."},"reachedKycLimit":{"type":"boolean","description":"Indicates if the user has reached their KYC limit."},"basicDocuments":{"type":"array","items":{"$ref":"#/components/schemas/KycDocument"}},"advancedDocuments":{"type":"array","items":{"$ref":"#/components/schemas/KycDocument"}},"kycRules":{"$ref":"#/components/schemas/KycRules"}}},"KycDocument":{"type":"object","properties":{"_id":{"type":"string"},"type":{"type":"string","enum":["basic","advanced"]},"title":{"type":"string"},"value":{"type":"string"},"requiredFields":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/KycRequiredField"}}}},"KycRequiredField":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/KycRequiredFieldType"},"label":{"type":"string"},"required":{"type":"boolean"},"format":{"type":"string"},"regexp":{"type":"string"},"regexpFlags":{"type":"string"}}},"KycRequiredFieldType":{"type":"string","enum":["number","string","date","boolean","email","phone","smile-identity-images"]},"KycRules":{"type":"object","properties":{"onramp":{"type":"array","items":{"type":"object","properties":{"min":{"type":"number"},"max":{"oneOf":[{"type":"number"},{"type":"string"}]},"type":{"type":"string","enum":["none","basic","advanced"]}}}},"offramp":{"type":"array","items":{"type":"object","properties":{"min":{"type":"number"},"max":{"oneOf":[{"type":"number"},{"type":"string"}]},"type":{"type":"string","enum":["none","basic","advanced"]}}}}}}}}}
```

## The KycDocument object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"KycDocument":{"type":"object","properties":{"_id":{"type":"string"},"type":{"type":"string","enum":["basic","advanced"]},"title":{"type":"string"},"value":{"type":"string"},"requiredFields":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/KycRequiredField"}}}},"KycRequiredField":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/KycRequiredFieldType"},"label":{"type":"string"},"required":{"type":"boolean"},"format":{"type":"string"},"regexp":{"type":"string"},"regexpFlags":{"type":"string"}}},"KycRequiredFieldType":{"type":"string","enum":["number","string","date","boolean","email","phone","smile-identity-images"]}}}}
```

## The KycRequiredField object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"KycRequiredField":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/KycRequiredFieldType"},"label":{"type":"string"},"required":{"type":"boolean"},"format":{"type":"string"},"regexp":{"type":"string"},"regexpFlags":{"type":"string"}}},"KycRequiredFieldType":{"type":"string","enum":["number","string","date","boolean","email","phone","smile-identity-images"]}}}}
```

## The KycRules object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"KycRules":{"type":"object","properties":{"onramp":{"type":"array","items":{"type":"object","properties":{"min":{"type":"number"},"max":{"oneOf":[{"type":"number"},{"type":"string"}]},"type":{"type":"string","enum":["none","basic","advanced"]}}}},"offramp":{"type":"array","items":{"type":"object","properties":{"min":{"type":"number"},"max":{"oneOf":[{"type":"number"},{"type":"string"}]},"type":{"type":"string","enum":["none","basic","advanced"]}}}}}}}}}
```

## The OffRampPaymentChannel object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"OffRampPaymentChannel":{"type":"string","enum":["bank","airtime","mobile_money","paybill"]}}}}
```

## The OffRampOrder object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"OffRampOrder":{"type":"object","properties":{"_id":{"type":"string","description":"Unique identifier of the off-ramp order"},"network":{"$ref":"#/components/schemas/OffRampNetwork","description":"Blockchain network of the off-ramp order, e.g. AVALANCHE, POLYGON, CELO, ETHEREUM"},"asset":{"$ref":"#/components/schemas/OffRampAsset","description":"Blockchain asset of the off-ramp order, e.g. USDC, USDT, CUSD, CKES"},"exchangeRate":{"type":"number","description":"Exchange rate for the off-ramp order"},"cashout":{"type":"object","properties":{"localCurrencyAmount":{"type":"number","description":"Amount in local currency user will receive after the order is completed"},"usdAmount":{"type":"number","description":"Amount in USD user paid"},"feeAmountUsd":{"type":"number","description":"Total fee amount in USD"},"feeAmountUsdFonbnk":{"type":"number","description":"Fonbnk fee amount in USD"},"feeAmountUsdPartner":{"type":"number","description":"Partner fee amount in USD"},"feeAmountLocalCurrency":{"type":"number","description":"Total fee amount in local currency"},"feeAmountLocalCurrencyFonbnk":{"type":"number","description":"Fonbnk fee amount in local currency"},"feeAmountLocalCurrencyPartner":{"type":"number","description":"Partner fee amount in local currency"},"cryptoAmount":{"type":"number","description":"Amount in crypto user paid"},"feeAmountCrypto":{"type":"number","description":"Total fee amount in crypto"},"feeAmountCryptoFonbnk":{"type":"number","description":"Fonbnk fee amount in crypto"},"feeAmountCryptoPartner":{"type":"number","description":"Partner fee amount in crypto"}}},"fromAddress":{"type":"string","description":"User wallet address from which the off-ramp order was initiated"},"toAddress":{"type":"string","description":"The wallet address to which the crypto was sent"},"status":{"$ref":"#/components/schemas/OffRampOrderStatus","description":"Status of the off-ramp order"},"createdAt":{"type":"string","format":"date-time","description":"Date and time when the off-ramp order was created"},"expiresAt":{"type":"string","format":"date-time","description":"Date and time when the off-ramp order expires if it is not paid in time"},"hash":{"type":"string","description":"Transaction hash if available"},"statusHistory":{"type":"array","description":"History of status changes for the off-ramp order","items":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/OffRampOrderStatus","description":"Status of the off-ramp order at the time of the change"},"changedAt":{"type":"string","format":"date-time","description":"Date and time when the status was changed"}}}},"requiredFields":{"type":"object","description":"Fields that were provided by the user"},"countryIsoCode":{"type":"string","description":"Country ISO code, e.g. NG for Nigeria, KE for Kenya"},"userPhoneNumber":{"type":"string","description":"Phone number of the user, should include country code"},"userEmail":{"type":"string","description":"Email address of the user"},"currencyIsoCode":{"type":"string","description":"Local currency ISO code, e.g. NGN for Nigerian Naira, KES for Kenyan Shilling"},"offerRequiredFields":{"type":"array","description":"Pretty formatted required fields were provided by the user to display on the merchant side","items":{"type":"object","properties":{"label":{"type":"string","description":"Label of the required field"},"type":{"type":"string","description":"Type of the required field, e.g. number, string, date, boolean, email, enum"},"value":{"type":"string","description":"Value of the required field"}}}},"orderParams":{"type":"string","description":"Value of the orderParams query param during order creation"},"paymentChannel":{"$ref":"#/components/schemas/OffRampPaymentChannel","description":"Type of the payment channel used for the off-ramp order, e.g. bank, mobile_money, airtime"}}},"OffRampNetwork":{"type":"string","enum":["AVALANCHE","POLYGON","CELO","ETHEREUM"]},"OffRampAsset":{"type":"string","enum":["USDC","USDT","CUSD","CKES","CGHS"]},"OffRampOrderStatus":{"type":"string","enum":["initiated","awaiting_transaction_confirmation","transaction_confirmed","transaction_failed","offramp_success","offramp_pending","offramp_failed","offramp_retry","refunding","refunded","refund_failed","expired","cancelled","validating_transaction","transaction_invalid"],"description":"- initiated: The offramp order has been initiated\n- awaiting_transaction_confirmation: User sent the transaction hash and system is awaiting confirmation\n- transaction_confirmed: User transaction has been confirmed\n- transaction_failed: User transaction has failed\n- offramp_success: The offramp transaction has been successful\n- offramp_pending: The offramp transaction is pending\n- offramp_failed: The offramp transaction has failed\n- offramp_retry: The offramp transaction is being retried\n- refunding: The offramp transaction is being refunded\n- refunded: The offramp transaction has been refunded\n- refund_failed: The offramp transaction refund has failed\n- expired: The offramp order has expired\n- cancelled: The offramp order has been cancelled by the user\n- validating_transaction: The offramp transaction is being validated\n- transaction_invalid: The offramp transaction is invalid"},"OffRampPaymentChannel":{"type":"string","enum":["bank","airtime","mobile_money","paybill"]}}}}
```

## The RequiredFieldType object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"RequiredFieldType":{"type":"string","enum":["number","string","date","boolean","email","enum"]}}}}
```

## The OfframpBestOfferResponse object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"OfframpBestOfferResponse":{"type":"object","properties":{"quoteId":{"type":"string","description":"Unique quote id"},"offer":{"type":"object","properties":{"paymentChannel":{"$ref":"#/components/schemas/OffRampPaymentChannel","description":"Type of the payment channel, e.g. bank, mobile_money, airtime"},"countryIsoCode":{"type":"string","description":"Country ISO code, e.g. NG for Nigeria, KE for Kenya"},"currencyIsoCode":{"type":"string","description":"Local currency ISO code, e.g. NGN for Nigerian Naira, KES for Kenyan Shilling"},"exchangeRate":{"type":"number","description":"Exchange rate for the order"},"cryptoExchangeRate":{"type":"number","description":"Exchange rate for the crypto amount"},"requiredFields":{"type":"object","description":"Data required to submit the order","additionalProperties":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/RequiredFieldType"},"label":{"type":"string"},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}}}}}}}}},"cashout":{"type":"object","properties":{"localCurrencyAmount":{"type":"number","description":"Amount in local currency user will receive"},"usdAmount":{"type":"number","description":"Amount in USD user must pay"},"feeAmountUsd":{"type":"number","description":"Total fee amount in USD"},"feeAmountUsdFonbnk":{"type":"number","description":"Fonbnk fee amount in USD"},"feeAmountUsdPartner":{"type":"number","description":"Partner fee amount in USD"},"feeAmountLocalCurrency":{"type":"number","description":"Total fee amount in local currency"},"feeAmountLocalCurrencyFonbnk":{"type":"number","description":"Fonbnk fee amount in local currency"},"feeAmountLocalCurrencyPartner":{"type":"number","description":"Partner fee amount in local currency"},"cryptoAmount":{"type":"number","description":"Amount in crypto user must pay"},"feeAmountCrypto":{"type":"number","description":"Total fee amount in crypto"},"feeAmountCryptoFonbnk":{"type":"number","description":"Fonbnk fee amount in crypto"},"feeAmountCryptoPartner":{"type":"number","description":"Partner fee amount in crypto"}}}}},"OffRampPaymentChannel":{"type":"string","enum":["bank","airtime","mobile_money","paybill"]},"RequiredFieldType":{"type":"string","enum":["number","string","date","boolean","email","enum"]}}}}
```

## The WidgetAmountCurrency object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"WidgetAmountCurrency":{"type":"string","enum":["local","crypto"]}}}}
```

## The OffRampLimitsResponse object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"OffRampLimitsResponse":{"type":"object","properties":{"minUsd":{"type":"number"},"maxUsd":{"type":"number"},"minLocalCurrency":{"type":"number"},"maxLocalCurrency":{"type":"number"}}}}}}
```

## The OffRampPaymentChannelsResponse object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"OffRampPaymentChannelsResponse":{"type":"object","properties":{"countryIsoCode":{"type":"string","description":"ISO code of the country, e.g. NG for Nigeria, KE for Kenya"},"currencyIsoCode":{"type":"string","description":"ISO code of the local currency, e.g. NGN for Nigerian Naira, KES for Kenyan Shilling"},"name":{"type":"string","description":"Name of the country, e.g. Nigeria, Kenya"},"paymentChannels":{"type":"array","description":"List of payment channels available for the country","items":{"type":"object","properties":{"paymentChannel":{"$ref":"#/components/schemas/OffRampPaymentChannel","description":"Type of the payment channel, e.g. bank, mobile_money, airtime"},"description":{"type":"string","description":"Description of the payment channel, e.g. Bank Transfer, Mobile Money"},"carriers":{"type":"array","description":"List of carriers available for the payment channel","items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the carrier"},"name":{"type":"string","description":"Name of the carrier, e.g. Safaricom, MTN"},"code":{"type":"string","description":"Code of the carrier, e.g. ng_mtn, ke_safaricom"}}}}}}}}}},"OffRampPaymentChannel":{"type":"string","enum":["bank","airtime","mobile_money","paybill"]}}}}
```

## The OffRampWallet object

```json
{"openapi":"3.1.0","info":{"title":"Fonbnk On-ramp API","version":"1.0.0"},"components":{"schemas":{"OffRampWallet":{"type":"object","properties":{"network":{"$ref":"#/components/schemas/OffRampNetwork"},"asset":{"$ref":"#/components/schemas/OffRampAsset"}}},"OffRampNetwork":{"type":"string","enum":["AVALANCHE","POLYGON","CELO","ETHEREUM"]},"OffRampAsset":{"type":"string","enum":["USDC","USDT","CUSD","CKES","CGHS"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.fonbnk.com/v1.5/endpoints/models.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
