Advanced API Integration

View as Markdown

Overview

For wallets and dApps that need full control over the user experience, BRIJ provides a direct Customer API integration path. Instead of embedding the BRIJ Widget, you can build your own UI and orchestrate the complete quote and partner selection flow.

This guide focuses on flow design, sequencing, and integration decisions. API Explorer is the canonical source for payload schemas and response models.

Integration Flow

Authentication and Environment

  • Send X-Api-Key with each Customer API request.
  • Use environment-specific base URLs:
    • Demo: https://api-demo.brij.fi
    • Production: https://api.brij.fi
  • Keep API keys server-side and never expose them in client bundles.

Method Sequence

  1. GetSupportedPaymentMethods Purpose: discover valid payment methods and limits for the selected quote context. API Reference: POST /brij.core.v1.customer.Service/GetSupportedPaymentMethods
  2. GetAvailablePartners Purpose: fetch partner offers for the selected method/amount and rank by business criteria. API Reference: POST /brij.core.v1.customer.Service/GetAvailablePartners
  3. CreateRedirectOrder Purpose: lock the selected offer and receive a redirect URL to complete checkout. API Reference: POST /brij.core.v1.customer.Service/CreateRedirectOrder

Integration Guidance

  • Quote freshness: Keep a short time window between partner quote retrieval and redirect order creation to avoid stale prices.
  • Selection transparency: Surface final amounts, fees, and partner identity before redirect.
  • Resilience: Handle partner unavailability by re-querying GetAvailablePartners and presenting fallback options.
  • Compliance and records: Persist request/response metadata needed for support and reconciliation.