Skip to main content
By default, all Wires created in the sandbox environment are moved through the normal Wire workflow, eventually ending with the status sent. Wire simulations allow developers to manually trigger a wire into various states that may arise in the course of production money movement. Developers can better understand the flow of funds by manually updating a wire’s status to sent or error at an accelerated timeline, as defined in the Simulation Types table below. The corresponding impact to an account’s balance, transactions, and holds (if applicable) can also be observed by calling the various respective endpoints. The three wire simulation types are listed below.

Wire Simulation Types

Setting up a Wire Sent or Voided Simulation

A wire must first be created via a POST request to the /wire endpoint with all the required parameters. In addition to this, the optional userdata field must be set and have the following parameters in order to be eligible for wire simulations:

Create a Wire Sent or Voided Simulation

Initiate either a wire.processing_sent or a wire.processing_voided simulation.

Wire Sent or Voided Request Body

Simulation Sub-Object
Example Request
Success Response
There will be no response body. The response code will be a 202 - accepted.
Error Response

Example: How to Simulate a Sent Wire

A common flow for a wire simulation is creating a wire, and then calling the simulation endpoint with the id of the wire. See wire for example wire requests. The following calls outline simulating a wire sent simulation.
Response
No response body is returned. A 202 HTTP status indicates a successful simulation.

Verifying a Successful Simulation

To ensure that the simulation was run successfully, call the GET /wire/:id endpoint to confirm that the status of the wire has been updated to sent or error. The funds should have been moved to/from an account and a corresponding transaction should appear.

Create an Incoming Wire Simulation

Initiating a wire.incoming_wire simulates a wire that was originated outside of the Treasury Prime API from a different bank. This will create a transaction on an account as well as an incoming wire object. You can then use the /incoming wire endpoint to access this object.

Simulation Request Body

Originator Sub-object
Wire Bank Address Sub-object
Wire Bank Data Sub-object
Example Request
The following call outlines simulating an incoming wire.
Success Response
There will be no response body. The response code will be a 202 - Accepted.
Error Response
Verifying a Successful Simulation
To ensure that the simulation was run successfully, call the GET /wire/incoming_wire endpoint to list the incoming wires and fetch the most recently created ID. The funds should have been moved to the corresponding account and a corresponding transaction should appear when running GET /account/:id/transaction.