Redirect Order Request

View as Markdown

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

1{
2 "countryCode": "USA",
3 "rampType": "ONRAMP",
4 "fromCurrency": "USD",
5 "toCurrency": "SOLANA_SOL",
6 "network": "SOLANA",
7 "paymentMethod": "USA_ACH",
8 "fromAmount": "100.50",
9 "walletAddress": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"
10}

Request Parameters

FieldTypeRequiredDescription
countryCodestringYesISO 3166-1 alpha-3 country code (e.g., “USA”, “GBR”)
rampTypestringYesTransaction type: "ONRAMP" (buy crypto) or "OFFRAMP" (sell crypto)
fromCurrencystringYesSource currency code (see Currency Codes)
toCurrencystringYesDestination currency code (see Currency Codes)
networkstringYesBlockchain network (see Networks)
paymentMethodstringYesPayment method code (see Payment Methods)
fromAmountstringYesAmount in source currency (decimal as string, e.g., “100.50”)
walletAddressstringNoCustomer’s wallet address for receiving/sending crypto

Response Body

1{
2 "redirectUrl": "https://yourplatform.com/complete-order?session=abc123xyz",
3 "toAmount": "1.5234",
4 "rawResponse": {
5 "orderId": "order_xyz789",
6 "expiresAt": "2025-01-15T10:45:00Z",
7 "estimatedCompletion": "2025-01-15T10:20:00Z"
8 }
9}

Response Parameters

FieldTypeRequiredDescription
redirectUrlstringYesURL where customer will be redirected to complete transaction
toAmountstringYesAmount customer will receive (decimal as string)
rawResponseobjectNoAdditional 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 CodeDescriptionExample Body
400Invalid request parameters{"error": "Invalid wallet address"}
422Amount outside limits or service unavailable{"error": "Service temporarily unavailable for this currency pair"}
503Service temporarily unavailable{"error": "Order creation service unavailable"}