Order status simulation

The TransFi Sandbox includes a set of Simulation APIs that let you drive your integration end-to-end without waiting for real-world events. You can call a simulation endpoint to instantly move an order to any target status — and have the corresponding webhook fired automatically.

Note: All simulation endpoints are strictly for the Sandbox environment and require a valid MID header in every request.


Simulate Order Status Update

Use this endpoint to move an existing order (or prefund) to a target status. The update is accepted asynchronously — your request returns immediately with a 202 Accepted, and the status transitions (including any intermediate states) are applied in the background with webhooks fired at each step.

Request

curl --location 'https://sandbox-api.transfi.com/v3/simulation/order' \
--header 'MID: YOUR_MID' \
--header 'Content-Type: application/json' \
--header 'Authorization: ******' \
--data '{
    "orderId": "OR-2603130504320558904",
    "status": "fund_settled"
}'

Request Parameters

ParameterTypeRequiredDescription
orderIdStringYesThe ID of the order or prefund to update. Prefund IDs begin with PF-; order IDs begin with OR-.
statusStringYesThe target status to simulate. See the table below for allowed values per order type.
errorCodeStringNoAn optional error code to attach when simulating a failure or review status. See error code table.

Allowed Statuses by Order Type

The statuses you can simulate depend on the order's type and fund flow. The simulation engine automatically fires all intermediate status events to reach the target state.

Order TypeFund FlowAllowed Target Statuses
payinfiatfund_settled, fund_failed, manual_review, expired
gamingfiatfund_settled, completed, fund_failed, manual_review, expired
payoutfiatfund_settled, fund_failed, manual_review
fiat_prefundfund_settled, completed, fund_failed, manual_review, expired
payincryptoasset_settled, expired
payoutcryptoasset_deposited
crypto_prefundcompleted, expired
buyfiat_to_cryptofund_deposited, fund_deposit_failed, manual_review, asset_settled, asset_settle_failed, expired
sellcrypto_to_fiatasset_deposited, fund_settled, fund_failed, manual_review, expired
swapfiat_to_fiatfund_deposited, fund_deposit_failed, manual_review, fund_settled, fund_failed, expired
swapcrypto_to_cryptoasset_deposited, asset_settled, asset_settle_failed, expired

Gaming order types are not supported for simulation.

Allowed Error Codes

Error codes are only valid for certain failure and review statuses. Passing errorCode for any other status will return a 400 error. If you omit errorCode for a status that supports one, the default code listed below is used.

Error CodeApplicable StatusDescription
PAYMENT_NOT_COMPLETEDfund_deposit_failed, fund_failedUser cancelled the payment or did not complete within the session.
NAME_NOT_MATCHEDfund_deposit_failed, fund_failedUser name on the sender's bank account did not match TransFi records.
BEHAVIORAL_CHECK_FAILEDfund_deposit_failed, fund_failedBiometric check of the user's device failed.
AMOUNT_MISMATCHfund_deposit_failed, fund_failedThe payment amount does not match the expected amount.
AUTHENTICATION_FAILEDfund_deposit_failed, fund_failedUser authentication failed.
BANK_ACCOUNT_ALREADY_IN_USEfund_deposit_failed, fund_failedThis bank account is already linked to another user.
BANK_UNDER_MAINTENANCEfund_deposit_failed, fund_failedThere was a technical issue with the bank.
DECLINED_BY_BANKfund_deposit_failed, fund_failedBank declined the transaction.
INVALID_ACCOUNT_DETAILSfund_deposit_failed, fund_failedThe provided account details are invalid.
OTHERSfund_deposit_failed, fund_failedAn unexpected error occurred.
TRANSACTION_FAILEDasset_settle_failedTransaction has failed.
VALIDATION_FAILEDasset_settle_failedValidation has failed for the transaction.
OTHERSasset_settle_failedAn unexpected error occurred.
BEHAVIORAL_CHECK_IN_REVIEWmanual_reviewBiometric check of the user's device is under review.
NAME_NOT_MATCHEDmanual_reviewUser name on the sender's bank account did not match TransFi records.
TRANSACTION_EXPIREDexpiredPayment was not completed within the time limit.

Response

{
  "status": "success",
  "data": {
    "message": "Order status update accepted for processing",
    "code": "ORDER_STATUS_UPDATE_ACCEPTED"
  }
}

For the full API specification, see Simulate Order Status Update.