Advanced API Integration
Overview
For wallets and dApps that need full control over the user experience, BRIJ provides a direct API integration path.
Instead of embedding the BRIJ Widget, you can build your own UI and interact with the BRIJ API
directly.
This approach is ideal when you need to:
- Build a fully custom UI that matches your application's design language
- Integrate the on/off-ramp flow deeply into your existing user journey
- Have programmatic control over partner selection and order creation
Integration Flow
The API integration follows a three-step process:
sequenceDiagram
participant User
participant Wallet
participant BRIJ API
participant Partner
User ->> Wallet: Select currency/country
Wallet ->> BRIJ API: GetSupportedPaymentMethods
BRIJ API -->> Wallet: Available methods & limits
User ->> Wallet: Enter amount & select payment method
Wallet ->> BRIJ API: GetAvailablePartners
BRIJ API -->> Wallet: Partner quotes (sorted by best rate)
User ->> Wallet: Confirm
Wallet ->> BRIJ API: CreateRedirectOrder
BRIJ API -->> Wallet: Redirect URL
Wallet ->> Partner: Redirect user
Authentication
Include your API key in the X-Api-Key header with every request:
X-Api-Key: your-api-key-here
| Environment |
Base URL |
| Demo |
https://api-demo.brij.fi |
| Production |
https://api.brij.fi |
GetSupportedPaymentMethods
Get available payment methods with their limits for a specific currency pair and ramp type.
Endpoint
POST https://api.brij.fi/brij.core.v1.customer.Service/GetSupportedPaymentMethods
Request Body
{
"countryCode": "USA",
"rampType": "ONRAMP",
"fromCurrency": "USD",
"toCurrency": "SOLANA_USDC"
}
Request Parameters
| Field |
Type |
Required |
Description |
countryCode |
string |
No |
ISO 3166-1 alpha-3 country code (e.g., USA, CZE). If not provided, detected from user IP |
rampType |
string |
Yes |
Transaction type: ONRAMP or OFFRAMP |
fromCurrency |
string |
Yes |
Source currency code (fiat for onramp, crypto for offramp) |
toCurrency |
string |
No |
Destination currency code. Defaults to country currency if not provided |
Response
{
"countryCode": "USA",
"rampType": "ONRAMP",
"fromCurrency": "USD",
"toCurrency": "SOLANA_USDC",
"paymentMethods": [
{
"code": "CARD",
"name": "Card payment",
"icon": "https://cdn.brij.fi/img/payment-methods/128x128/card.png",
"limits": {
"moonpay": {
"min": "20",
"max": "5000"
},
"transak": {
"min": "30",
"max": "3000"
}
},
"aggregatedLimit": {
"min": "20",
"max": "5000"
}
},
{
"code": "USA_ACH",
"name": "ACH transfer (USA)",
"icon": "https://cdn.brij.fi/img/payment-methods/128x128/usa_ach.png",
"limits": {
"moonpay": {
"min": "100",
"max": "25000"
}
},
"aggregatedLimit": {
"min": "100",
"max": "25000"
}
}
]
}
Response Parameters
| Field |
Type |
Description |
countryCode |
string |
Resolved country code |
rampType |
string |
The ramp type from the request |
fromCurrency |
string |
Source currency |
toCurrency |
string |
Destination currency |
paymentMethods |
array |
List of available payment methods with limits |
Payment Method Object
| Field |
Type |
Description |
code |
string |
Payment method code (e.g., CARD, USA_ACH) |
name |
string |
Human-readable name of the payment method |
icon |
string |
URL to the payment method icon |
limits |
object |
Per-partner limits, keyed by partner ID |
aggregatedLimit |
object |
Combined min/max limits across all partners |
Limit Object
| Field |
Type |
Description |
min |
string |
Minimum transaction amount in the source currency |
max |
string |
Maximum transaction amount in the source currency |
GetAvailablePartners
Get partner quotes for a specific transaction. Returns a list of available ramp partners sorted by the best rate (
highest
toAmount first).
Endpoint
POST https://api.brij.fi/brij.core.v1.customer.Service/GetAvailablePartners
Request Body
{
"countryCode": "USA",
"rampType": "ONRAMP",
"fromCurrency": "USD",
"toCurrency": "SOLANA_USDC",
"paymentMethod": "CARD",
"fromAmount": "100",
"partnerTypes": [
"REDIRECT"
]
}
Request Parameters
| Field |
Type |
Description |
countryCode |
string |
ISO 3166-1 alpha-3 country code |
rampType |
string |
Transaction type: ONRAMP or OFFRAMP |
fromCurrency |
string |
Source currency code |
toCurrency |
string |
Destination currency code |
paymentMethod |
string |
The payment method code from Step 1 |
fromAmount |
string |
The amount in the source currency |
partnerTypes |
string[] |
Array of partner types. Use ["REDIRECT"] for redirect-based partners |
Response
{
"partners": [
{
"partnerId": "moonpay",
"partnerName": "Moonpay",
"toAmount": "98.45",
"icon": "https://cdn.brij.fi/img/partners/128x128/moonpay.png",
"type": "REDIRECT",
"termsUrl": "https://moonpay.com/terms",
"privacyPolicyUrl": "https://moonpay.com/privacy"
},
{
"partnerId": "transak",
"partnerName": "Transak",
"toAmount": "97.82",
"icon": "https://cdn.brij.fi/img/partners/128x128/transak.png",
"type": "REDIRECT",
"termsUrl": "https://transak.com/terms",
"privacyPolicyUrl": "https://transak.com/privacy"
}
]
}
Response Parameters
| Field |
Type |
Description |
partners |
array |
List of available partners, sorted by best rate first |
Partner Object
| Field |
Type |
Description |
partnerId |
string |
Unique identifier for the partner |
partnerName |
string |
Display name of the partner |
toAmount |
string |
Amount the user will receive in toCurrency |
icon |
string |
URL to the partner's logo |
type |
string |
Partner type (e.g., REDIRECT) |
termsUrl |
string |
URL to the partner's terms of service |
privacyPolicyUrl |
string |
URL to the partner's privacy policy |
Note
Partners are sorted by toAmount in descending order. The first partner in the list offers the best rate.
CreateRedirectOrder
Create an order and get the redirect URL to send the user to the partner's checkout flow.
Endpoint
POST https://api.brij.fi/brij.core.v1.customer.Service/CreateRedirectOrder
Request Body
{
"countryCode": "USA",
"rampType": "ONRAMP",
"fromCurrency": "USD",
"toCurrency": "SOLANA_USDC",
"paymentMethod": "CARD",
"fromAmount": "100",
"partnerId": "moonpay"
}
Request Parameters
| Field |
Type |
Description |
countryCode |
string |
ISO 3166-1 alpha-3 country code |
rampType |
string |
Transaction type: ONRAMP or OFFRAMP |
fromCurrency |
string |
Source currency code |
toCurrency |
string |
Destination currency code |
paymentMethod |
string |
The payment method code |
fromAmount |
string |
The amount in the source currency |
partnerId |
string |
The partner ID from GetAvailablePartners response |
Response
{
"redirectUrl": "https://buy.moonpay.com/checkout?transactionId=abc123",
"fromAmount": "100",
"fromCurrency": "USD",
"toAmount": "98.45",
"toCurrency": "SOLANA_USDC"
}
Response Parameters
| Field |
Type |
Description |
redirectUrl |
string |
URL to redirect the user to complete the order |
fromAmount |
string |
Confirmed source amount |
fromCurrency |
string |
Source currency |
toAmount |
string |
Expected destination amount |
toCurrency |
string |
Destination currency |
Error Responses
| Status Code |
Description |
400 |
Invalid request parameters |
401 |
Invalid or missing API key |
404 |
Partner not found |
422 |
Amount outside allowed limits |
500 |
Internal server error |
After receiving the response, redirect the user to redirectUrl to complete their transaction with the partner.