Create Order Request¶
Note
This request is only used in full integration mode.
BRIJ sends this request to create an order in full integration mode. Unlike the Redirect Order Request used for Tier 1 partners, this request is used when the partner handles the full transaction flow without redirecting the customer.
Endpoint¶
POST https://api.yourplatform.com/create-order
Content-Type: application/json
Request Body¶
{
"orderId": "order_abc123",
"customerId": "cust_xyz789",
"fromCurrency": "USD",
"toCurrency": "SOLANA_SOL",
"fromAmount": "100.50",
"type": "ONRAMP",
"paymentMethod": "USA_ACH",
"customerPaymentDetailsDataId": "cpd_def456",
"customerWalletDataId": "cwd_ghi012",
"network": "SOLANA"
}
Request Parameters¶
| Field | Type | Required | Description |
|---|---|---|---|
orderId |
string | Yes | BRIJ's unique identifier for this order |
customerId |
string | Yes | BRIJ's unique identifier for the customer |
fromCurrency |
string | Yes | Source currency code (see Currency Codes) |
toCurrency |
string | Yes | Destination currency code (see Currency Codes) |
fromAmount |
string | Yes | Amount in source currency (decimal as string, e.g., "100.50") |
type |
string | Yes | Transaction type: "ONRAMP" (buy crypto) or "OFFRAMP" (sell crypto) |
paymentMethod |
string | Yes | Payment method code (see Payment Methods) |
customerPaymentDetailsDataId |
string | Yes | Data ID for customer's payment details (bank account, card, etc.) |
customerWalletDataId |
string | Yes | Data ID for customer's crypto wallet |
network |
string | Yes | Blockchain network (see Networks) |
Note
- For ONRAMP:
fromCurrencyis fiat (e.g., "USD"),toCurrencyis crypto (e.g., "SOLANA_SOL") - For OFFRAMP:
fromCurrencyis crypto (e.g., "SOLANA_SOL"),toCurrencyis fiat (e.g., "USD")
Response Body¶
Success Response¶
{
"externalOrderId": "partner_order_12345",
"status": "AWAITING_FUNDS",
"toAmount": "1.5234",
"depositInstructions": {
"paymentMethod": "USA_ACH",
"amount": "100.50",
"currency": "USD",
"bankName": "Partner Bank",
"bankRoutingNumber": "123456789",
"bankAccountNumber": "9876543210",
"bankBeneficiaryName": "Partner Inc.",
"depositMessage": "Order order_abc123"
}
}
Response Parameters¶
| Field | Type | Required | Description |
|---|---|---|---|
externalOrderId |
string | Yes | Your platform's unique identifier for this order |
status |
string | Yes | Initial order status (see Order statuses) |
toAmount |
string | Yes | Amount customer will receive (decimal as string) |
depositInstructions |
object | No1 | Instructions for the customer to deposit funds (see Deposit instructions) |
Error Response¶
Return an error response when the order cannot be created:
{
"error": {
"reason": "insufficient_data",
"customerFacingReason": "Unable to process order at this time. Please try again later."
}
}
Error Fields¶
| Field | Type | Description |
|---|---|---|
reason |
string | Internal error reason (for logging and debugging) |
customerFacingReason |
string | User-friendly message that can be shown to the customer |
HTTP Status Codes¶
| Status Code | Description |
|---|---|
400 |
Invalid request parameters |
422 |
Business rule violation (e.g., limits exceeded) |
503 |
Service temporarily unavailable |
-
Required when
statusisAWAITING_FUNDS. ↩