Skip to content

Update Order

Overview

Use the UpdateOrder endpoint to update the status and details of an order. This is used to progress orders through their lifecycle, such as marking funds as received or providing transaction IDs.

Endpoint

POST https://api.brij.fi/brij.core.v1.partner.Service/UpdateOrder

Request Body

{
  "orderId": "order_abc123",
  "status": "FUNDS_RECEIVED",
  "sourceTransactionId": "txn_source_123"
}

Request Parameters

Field Type Required Description
orderId string Yes Unique identifier for the order
status string No New order status (see Order Statuses)
sourceTransactionId string No Transaction ID for the source transaction
destinationTransactionId string No Transaction ID for the destination transaction
depositInstructions object No Payment instructions for the customer
reason string No1 Reason for error or cancellation
customerFacingReason string No Customer-friendly reason message
returnDetails object No Details about returned funds
toAmount string No Updated destination amount

Response

{
  "order": {
    "id": "order_abc123",
    "customerId": "cust_xyz789",
    "externalId": "ext_123",
    "partnerId": "partner_456",
    "status": "FUNDS_RECEIVED",
    "sourceCurrency": "USD",
    "sourceAmount": "100.00",
    "destinationCurrency": "SOLANA_SOL",
    "destinationAmount": "1.5234",
    "transactionType": "ONRAMP",
    "network": "SOLANA",
    "sourceTransactionId": "txn_source_123",
    "paymentMethod": "USA_ACH",
    "createdAt": "2025-01-15T10:30:00Z",
    "updatedAt": "2025-01-15T10:35:00Z"
  }
}

Response Parameters

Field Type Description
order object The updated order

See Order Object for the full structure.

Error Responses

Status Code Description
400 Invalid request parameters
401 Invalid or missing API key
404 Order or partner not found
409 Invalid status transition
500 Internal server error

Examples

Example 1: Mark Funds Received

Update order status when funds are received from the customer:

{
  "orderId": "order_abc123",
  "status": "FUNDS_RECEIVED",
  "sourceTransactionId": "txn_source_123"
}

Example 2: Mark Payment Submitted

Update order when payment has been submitted to destination:

{
  "orderId": "order_abc123",
  "status": "PAYMENT_SUBMITTED",
  "destinationTransactionId": "txn_dest_456"
}

Example 3: Mark Payment Processed

Update order when payment has been completed:

{
  "orderId": "order_abc123",
  "status": "PAYMENT_PROCESSED"
}

Example 4: Mark Order as Error

Update order when an error occurs (reason is required):

{
  "orderId": "order_abc123",
  "status": "ERROR",
  "reason": "Bank transfer failed due to incorrect account details",
  "customerFacingReason": "Payment could not be completed. Please verify your bank details."
}

Example 5: Provide Deposit Instructions

Provide payment instructions for the customer:

{
  "orderId": "order_abc123",
  "depositInstructions": {
    "bankName": "Example Bank",
    "accountNumber": "1234567890",
    "routingNumber": "021000021",
    "reference": "REF-ABC123"
  }
}

  1. Required when setting status to ERROR