Bando Docs
Launch AppLearn More
  • Bando for Developers
    • The On-chain Spending Protocol
    • Quickstart
    • Glossary
    • Use Cases
    • Protocol Architecture
      • Payment Reference Validation
      • Order Request
      • Order Fulfillment
      • Refunds
  • Spending Widget
    • Widget Quick Start
    • Configuration
    • Customization
    • Localization
    • Wallet Management
    • Framework Integration
      • Next.js
      • Svelte
  • Fulfiller API
    • Get Started with the API
    • Authentication
    • Guides
      • Get Available Products
      • Get a Payment Reference
      • Validate a payment reference
      • Get a Quote
      • Get Available Tokens for a Chain
    • API Reference
  • EVM Smart Contracts
    • EVM Smart Contracts | Architecture
    • Contracts
      • Core
        • BandoERC20Fulfillable
        • BandoFulfillmentManager
        • BandoFulfillable
        • BandoRouter
        • FulfillmentTypes
      • Libraries
        • FulfillmentRequestLib
        • SwapLib
      • Periphery
        • ERC20TokenRegistry
        • FulfillableRegistry
      • Proxy
        • Upgradeability
    • Security
      • Access Control
      • Security Considerations
      • Rekt Test
      • Audits
    • Code
Powered by GitBook
On this page
  • Getting a Price Quote
  • Endpoint
  • Request Format
  • Response Example
  • Common Use Cases
  • 1. Mobile Top-up Quote
  • 2. Prepaid Code Quote
  • 3. eSIM Quote
  • Understanding the Quote
  • Best Practices

Was this helpful?

Edit on GitHub
  1. Fulfiller API
  2. Guides

Get a Quote

Technical guide for implementing Bando's quote retrieval system. Learn how to fetch real-time pricing for crypto payments across multiple chains.

Learn how to get price quotes for converting fiat currency to digital assets for your purchases.

Getting a Price Quote

The Quote API helps you get current prices for purchasing products using digital assets.

Endpoint

POST /quotes

Request Format

{
  "sku": "ATT_MX_10-I",
  "fiat_currency": "USD",
  "digital_asset": "USDC",
  "chain_id": 137
}

Field descriptions:

  • sku: Product identifier (e.g., "TMOBILE_US_001-ROW_0081" )

  • fiat_currency: Local currency code (e.g., "MXN", "USD")

  • digital_asset: Digital token symbol (e.g., "USDC", "USDT")

  • chain_id: Blockchain network ID (e.g., 137 for Polygon)

Response Example

{
  "error": "",
  "message": "Quote created successfully.",
  "data": {
    "fiat_currency": "USD",
    "fiat_amount": "10.00",
    "digital_asset": "USDC",
    "digital_asset_amount": "0.58",
    "total_amount": "0.60",
    "sku": "ATT_MX_10-I"
  }
}

Common Use Cases

1. Mobile Top-up Quote

{
  "sku": "TMOBILE_US_001-ROW_0081",
  "fiat_currency": "USD",
  "digital_asset": "USDC",
  "chain_id": 137
}

2. Prepaid Code Quote

{
  "sku": "AMAZON_MX_500-I",
  "fiat_currency": "USD",
  "digital_asset": "USDT",
  "chain_id": 137
}

3. eSIM Quote

{
  "sku": "ESIM_US_30D-I",
  "fiat_currency": "USD",
  "digital_asset": "USDC",
  "chain_id": 1
}

Understanding the Quote

The quote response includes:

  1. Original Price

    • fiat_currency: Local currency (MXN, USD, etc.)

    • fiat_amount: Price in local currency

  2. Converted Amount

    • digital_asset: Token used (USDC, USDT, etc.)

    • digital_asset_amount: Base price in tokens

Best Practices

  1. Currency Conversion

    • Rates update in real-time

    • Final amounts may vary slightly

    • Always use latest quote for transactions

  2. SKU Format

    • Use correct SKU format: BRAND_COUNTRY_AMOUNT-I

    • Check SKU exists

    • Verify product availability

PreviousValidate a payment referenceNextGet Available Tokens for a Chain

Last updated 1 month ago

Was this helpful?