Skip to content

BRIJ Tier 1 Partner Integration Guide

Overview

This guide describes how to integrate with BRIJ as a Tier 1 Partner. As a Tier 1 partner, BRIJ acts as an aggregator for your crypto on/off-ramp services, displaying your payment options alongside other partners. When customers select your service, they are redirected to your platform to complete the transaction.

Prerequisites

  • API Key: BRIJ will provide you with an API key for authentication
  • Base URLs: Provide BRIJ with your JSON API base URLs for:
    • Quote endpoint
    • Redirect order creation endpoint
  • Supported configurations: Define your supported countries, currencies, payment methods, and limits

Part 1: Sync Your Payment Options to BRIJ

Overview

Use the SyncPaymentOptions endpoint to inform BRIJ about your service capabilities. This endpoint operates in full replacement mode - each sync completely replaces your previous configuration.

Authentication

Include your API key in the request header:

X-Api-Key: your-api-key-here

Endpoint

POST https://api.brij.fi/brij.core.v1.partner.Service/SyncPaymentOptions
Content-Type: application/json
X-Api-Key: your-api-key-here

Request Body

{
  "countryAvailabilities": [
    {
      "countryCode": "USA",
      "paymentMethod": "USA_ACH",
      "onrampEnabled": true,
      "offrampEnabled": true
    },
    {
      "countryCode": "BRA",
      "paymentMethod": "BRA_PIX",
      "onrampEnabled": true,
      "offrampEnabled": false
    }
  ],
  "limits": [
    {
      "currency": "USD",
      "onrampLimitMin": "10.00",
      "onrampLimitMax": "10000.00",
      "offrampLimitMin": "50.00",
      "offrampLimitMax": "5000.00"
    }
  ],
  "cryptoAvailabilities": [
    {
      "currency": "SOLANA_SOL",
      "onrampEnabled": true,
      "offrampEnabled": true
    },
    {
      "currency": "ETHEREUM_ETH",
      "onrampEnabled": true,
      "offrampEnabled": false
    }
  ],
  "fiatPaymentAvailabilities": [
    {
      "currency": "USD",
      "paymentMethod": "USA_ACH",
      "onrampEnabled": true,
      "offrampEnabled": true
    },
    {
      "currency": "BRL",
      "paymentMethod": "BRA_PIX",
      "onrampEnabled": true,
      "offrampEnabled": false
    }
  ]
}

Request Parameters

countryAvailabilities (array)

Defines which countries and payment methods you support.

Field Type Description
countryCode string ISO 3166-1 alpha-3 country code (e.g., "USA", "GBR", "BRA")
paymentMethod string Payment method code (see Payment Methods)
onrampEnabled boolean Whether you support buying crypto (fiat → crypto)
offrampEnabled boolean Whether you support selling crypto (crypto → fiat)

limits (array)

Defines transaction limits per currency.

Field Type Description
currency string Currency code (see Currency Codes)
onrampLimitMin string Minimum amount for buying crypto (decimal as string)
onrampLimitMax string Maximum amount for buying crypto (decimal as string)
offrampLimitMin string Minimum amount for selling crypto (decimal as string)
offrampLimitMax string Maximum amount for selling crypto (decimal as string)

Note

  • Limits should be specified in the currency's natural units (e.g., "10.50" for USD)
  • Limits should only be set for fiat currencies (e.g., USD, EUR, BRL), not crypto currencies

cryptoAvailabilities (array)

Defines which cryptocurrencies you support.

Field Type Description
currency string Crypto currency code (see Currency Codes)
onrampEnabled boolean Whether you support buying this cryptocurrency
offrampEnabled boolean Whether you support selling this cryptocurrency

fiatPaymentAvailabilities (array)

Defines which fiat currencies and payment method combinations you support.

Field Type Description
currency string Fiat currency code (see Currency Codes)
paymentMethod string Payment method code (see Payment Methods)
onrampEnabled boolean Whether you support buying crypto with this fiat/payment method
offrampEnabled boolean Whether you support selling crypto to this fiat/payment method

Response

{
  "countryAvailabilitiesSynced": 2,
  "limitsSynced": 1,
  "cryptoAvailabilitiesSynced": 2,
  "fiatPaymentAvailabilitiesSynced": 2
}
Field Type Description
countryAvailabilitiesSynced integer Number of country availability records synced
limitsSynced integer Number of limit records synced
cryptoAvailabilitiesSynced integer Number of crypto availability records synced
fiatPaymentAvailabilitiesSynced integer Number of fiat payment availability records synced

Error Responses

Status Code Description
401 Invalid or missing API key
404 Partner not found
500 Internal server error

Part 2: Implement Your Partner API

BRIJ will call your API endpoints to get quotes and create redirect orders. You must implement two JSON API endpoints.

Authentication

BRIJ does not include authentication headers by default. If you require authentication, include it in your endpoint URLs as query parameters during onboarding:

https://api.yourplatform.com/quote?api_key=your-secret-key
https://api.yourplatform.com/redirect-order?api_key=your-secret-key

Client IP Forwarding

BRIJ forwards the end-user's IP address in the X-Forwarded-For header for both endpoints. You can use this for:

  • Geo-based restrictions
  • Fraud detection
  • Compliance requirements

2.1 Quote Endpoint

Returns a quote for a crypto transaction.

Endpoint

POST https://api.yourplatform.com/quote
Content-Type: application/json
X-Forwarded-For: 203.0.113.42

Request Body

{
  "countryCode": "USA",
  "rampType": "ONRAMP",
  "fromCurrency": "USD",
  "toCurrency": "SOLANA_SOL",
  "network": "SOLANA",
  "paymentMethod": "ACH",
  "fromAmount": "100.50"
}

Request Parameters

Field Type Required Description
countryCode string Yes ISO 3166-1 alpha-3 country code (e.g., "USA", "GBR")
rampType string Yes Transaction type: "ONRAMP" (buy crypto) or "OFFRAMP" (sell crypto)
fromCurrency string Yes Source currency code (see Currency Codes)
toCurrency string Yes Destination currency code (see Currency Codes)
network string Yes Blockchain network (see Networks)
paymentMethod string Yes Payment method code (see Payment Methods)
fromAmount string Yes Amount in source currency (decimal as string, e.g., "100.50")

Note

  • For ONRAMP: fromCurrency is fiat (e.g., "USD"), toCurrency is crypto (e.g., "SOLANA_SOL")
  • For OFFRAMP: fromCurrency is crypto (e.g., "SOLANA_SOL"), toCurrency is fiat (e.g., "USD")

Response Body

{
  "toAmount": "1.5234",
  "rawResponse": {
    "exchangeRate": "65.9123",
    "fees": "1.50",
    "estimatedTime": "5-10 minutes",
    "quoteId": "quote_abc123",
    "expiresAt": "2025-01-15T10:30:00Z"
  }
}

Response Parameters

Field Type Required Description
toAmount string Yes Amount customer will receive in destination currency (decimal as string)
rawResponse object No Additional quote details (free-form, stored for reference)

rawResponse Guidelines:

  • Can include any JSON-serializable data
  • Common fields: exchangeRate, fees, estimatedTime, quoteId, expiresAt
  • BRIJ displays this to customers for comparing quotes between partners
  • Keep it user-friendly and informative

Error Response

Return appropriate HTTP status codes:

Status Code Description Example Body
400 Invalid request parameters {"error": "Invalid currency code"}
422 Amount outside limits {"error": "Amount below minimum limit of 10 USD"}
503 Service temporarily unavailable {"error": "Quote service unavailable"}

2.2 Redirect Order Endpoint

Creates an order and returns a redirect URL where the customer completes the transaction.

Endpoint

POST https://api.yourplatform.com/redirect-order
Content-Type: application/json
X-Forwarded-For: 203.0.113.42

Request Body

{
  "countryCode": "USA",
  "rampType": "ONRAMP",
  "fromCurrency": "USD",
  "toCurrency": "SOLANA_SOL",
  "network": "SOLANA",
  "paymentMethod": "ACH",
  "fromAmount": "100.50",
  "walletAddress": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"
}

Request Parameters

Field Type Required Description
countryCode string Yes ISO 3166-1 alpha-3 country code (e.g., "USA", "GBR")
rampType string Yes Transaction type: "ONRAMP" (buy crypto) or "OFFRAMP" (sell crypto)
fromCurrency string Yes Source currency code (see Currency Codes)
toCurrency string Yes Destination currency code (see Currency Codes)
network string Yes Blockchain network (see Networks)
paymentMethod string Yes Payment method code (see Payment Methods)
fromAmount string Yes Amount in source currency (decimal as string, e.g., "100.50")
walletAddress string No Customer's wallet address for receiving/sending crypto

Response Body

{
  "redirectUrl": "https://yourplatform.com/complete-order?session=abc123xyz",
  "toAmount": "1.5234",
  "rawResponse": {
    "orderId": "order_xyz789",
    "expiresAt": "2025-01-15T10:45:00Z",
    "estimatedCompletion": "2025-01-15T10:20:00Z"
  }
}

Response Parameters

Field Type Required Description
redirectUrl string Yes URL where customer will be redirected to complete transaction
toAmount string Yes Amount customer will receive (decimal as string)
rawResponse object No Additional order details (free-form, stored for reference)

redirectUrl Requirements:

  • Must be a valid HTTPS URL
  • Can include session tokens, order IDs, or any parameters
  • Customer will be redirected to this URL immediately after order creation
  • You control the redirect destination - BRIJ does not impose requirements on where customers should return

rawResponse Guidelines:

  • Can include any JSON-serializable data
  • Common fields: orderId, expiresAt, estimatedCompletion
  • BRIJ stores this for audit and reference purposes

Error Response

Return appropriate HTTP status codes:

Status Code Description Example Body
400 Invalid request parameters {"error": "Invalid wallet address"}
422 Amount outside limits or service unavailable {"error": "Service temporarily unavailable for this currency pair"}
503 Service temporarily unavailable {"error": "Order creation service unavailable"}

Integration Flow

1. Initial Setup

  1. BRIJ provides you with an API key
  2. You provide BRIJ with your API endpoint URLs
  3. You call SyncPaymentOptions to register your capabilities

2. Runtime Flow

  1. Customer browses available options on BRIJ
  2. BRIJ calls your /quote endpoint to get live prices
  3. Customer selects your service
  4. BRIJ calls your /redirect-order endpoint
  5. Customer is redirected to your platform via redirectUrl
  6. Customer completes transaction on your platform

Best Practices

1. Sync Frequency

  • Sync payment options whenever your capabilities change
  • Full replacement mode means you don't need to track deltas

2. Quote Caching

  • Return fresh quotes on each request
  • Consider short-lived quote IDs (e.g., 5-10 minutes)
  • Include expiration times in rawResponse

3. Error Handling

  • Return appropriate HTTP status codes
  • Include descriptive error messages for debugging
  • Log all requests for troubleshooting

4. Performance

  • Quote endpoint should respond within 2 seconds
  • Redirect order endpoint should respond within 5 seconds

5. Security

  • Use HTTPS for all endpoints
  • Validate all input parameters
  • Use the X-Forwarded-For header for fraud detection
  • Implement your own authentication if needed (via URL parameters)

Testing

Test Credentials

Contact BRIJ support for test API keys and sandbox endpoint URLs.

Sample cURL Commands

Sync Payment Options

curl -X POST https://api.brij.fi/brij.core.v1.partner.Service/SyncPaymentOptions \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: your-test-api-key" \
  -d '{
    "countryAvailabilities": [
      {
        "countryCode": "USA",
        "paymentMethod": "USA_ACH",
        "onrampEnabled": true,
        "offrampEnabled": true
      }
    ],
    "limits": [
      {
        "currency": "USD",
        "onrampLimitMin": "10.00",
        "onrampLimitMax": "10000.00",
        "offrampLimitMin": "50.00",
        "offrampLimitMax": "5000.00"
      }
    ],
    "cryptoAvailabilities": [
      {
        "currency": "SOLANA_SOL",
        "onrampEnabled": true,
        "offrampEnabled": true
      }
    ],
    "fiatPaymentAvailabilities": [
      {
        "currency": "USD",
        "paymentMethod": "USA_ACH",
        "onrampEnabled": true,
        "offrampEnabled": true
      }
    ]
  }'

Support

For integration support or questions:


Changelog

Date Version Changes
2025-01-10 1.0 Initial Tier 1 partner integration documentation