Redirect Order Request¶
BRIJ sends this request to create an order and get a redirect URL where the customer completes the transaction.
Note
This request is only used in Tier 1 integration mode. For full integration mode, see Create Order Request.
Endpoint¶
POST https://api.yourplatform.com/redirect-order
Content-Type: application/json
X-Forwarded-For: 203.0.113.42
The X-Forwarded-For header contains the end-user's IP address, which you can use for geo-based restrictions, fraud
detection, or compliance requirements.
Request Body¶
{
"countryCode": "USA",
"rampType": "ONRAMP",
"fromCurrency": "USD",
"toCurrency": "SOLANA_SOL",
"network": "SOLANA",
"paymentMethod": "USA_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
- 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"} |