# Advanced API Integration ## 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](/docs/for-wallets-d-apps/wallet-integration-guide), 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 ```mermaid sequenceDiagram participant User participant Wallet participant BRIJ API participant Partner User ->> Wallet: Select country/currencies Wallet ->> BRIJ API: GetSupportedPaymentMethods BRIJ API -->> Wallet: Methods and limits User ->> Wallet: Select method and amount Wallet ->> BRIJ API: GetAvailablePartners BRIJ API -->> Wallet: Ranked partner offers User ->> Wallet: Confirm selected partner Wallet ->> BRIJ API: CreateRedirectOrder BRIJ API -->> Wallet: Redirect URL Wallet ->> Partner: Redirect user ``` ## 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`](/api-reference/ap-is/brij-customer-api/brij-customer-api/brij-core-v-1-customer-service-get-supported-payment-methods) Purpose: discover valid payment methods and limits for the selected quote context. API Reference: [POST /brij.core.v1.customer.Service/GetSupportedPaymentMethods](/api-reference/ap-is/brij-customer-api/brij-customer-api/brij-core-v-1-customer-service-get-supported-payment-methods) 2. [`GetAvailablePartners`](/api-reference/ap-is/brij-customer-api/brij-customer-api/brij-core-v-1-customer-service-get-available-partners) Purpose: fetch partner offers for the selected method/amount and rank by business criteria. API Reference: [POST /brij.core.v1.customer.Service/GetAvailablePartners](/api-reference/ap-is/brij-customer-api/brij-customer-api/brij-core-v-1-customer-service-get-available-partners) 3. [`CreateRedirectOrder`](/api-reference/ap-is/brij-customer-api/brij-customer-api/brij-core-v-1-customer-service-create-redirect-order) Purpose: lock the selected offer and receive a redirect URL to complete checkout. API Reference: [POST /brij.core.v1.customer.Service/CreateRedirectOrder](/api-reference/ap-is/brij-customer-api/brij-customer-api/brij-core-v-1-customer-service-create-redirect-order) ## 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. ## Related Reference Data * [Currency Codes](/docs/reference/currency-codes) * [Networks](/docs/reference/networks) * [Payment Methods](/docs/reference/payment-methods)