Order and User 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. Instead of waiting for a user to complete a bank transfer or a KYC provider to return a decision, you can call a simulation endpoint to instantly move an order or a user 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
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.


Simulate User Status Update

Use this endpoint to move an existing user to a target KYC or KYB status. This immediately updates the user's record and fires the corresponding webhook — useful for testing downstream flows that depend on a specific verification outcome.

Request

curl --location 'https://sandbox-api.transfi.com/v3/simulation/user' \
--header 'MID: YOUR_MID' \
--header 'Content-Type: application/json' \
--header 'Authorization: ******' \
--data '{
    "userId": "UX-260108160852530",
    "status": "kyc_success"
}'

Request Parameters

ParameterTypeRequiredDescription
userIdStringYesThe ID of the user to update. Must begin with UX-.
statusStringYesThe target status to simulate. See the tables below for allowed values per user type.

Allowed Statuses — Individual Users

StatusDescription
user_createdUser account has been created in TransFi.
user_approvedUser account has been approved at basic screening level.
user_rejectedUser account has been rejected.
kyc_initiatedKYC process has been initiated for the user.
kyc_pendingKYC submission is pending verification.
kyc_successUser has been successfully verified.
kyc_failedUser was unable to verify their KYC documents.
kyc_manual_reviewKYC is under manual compliance review.
kyc_rejectedKYC has been rejected; user cannot transact.
kyc_blockedKYC has been blocked; user cannot transact.
kyc_expiredUser's KYC document has expired and requires renewal.

Allowed Statuses — Business / Organization Users

StatusDescription
user_createdBusiness user account has been created in TransFi.
user_approvedBusiness user account has been approved at basic screening level.
user_rejectedBusiness user account has been rejected.
kyb_initiatedKYB process has been initiated for the business.
kyb_pendingKYB submission is pending verification.
kyb_successBusiness has been successfully verified.
kyb_failedBusiness was unable to verify their KYB documents.
kyb_manual_reviewKYB is under manual compliance review.
kyb_rejectedKYB has been rejected; business cannot transact.
kyb_blockedKYB has been blocked; business cannot transact.
kyb_expiredBusiness's KYB documents have expired and require renewal.

Response

{
  "status": "success",
  "message": "User status updated successfully"
}

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