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.
Simulation Type | Explanation |
---|---|
wire.processing_sent | Simulate a wire being sent by validating, processing and sending the wire immediately. If a wire fails validation or processing, the wire is instead updated to an error status. |
wire.processing_voided | Simulate a wire being voided by validating, processing, sending and then erroring the wire immediately. Similarly to processing_sent, any validation or processing failure will cause the wire status to be updated to error . |
wire.incoming_wire | Simulate an incoming wire. |
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:
Parameter | Type | Required? | Description |
---|---|---|---|
manual | boolean | Required | true should be provided to indicate that this is a simulation request. This field prevents the wire from automatically being processed. |
wire.processing_sent
or a wire.processing_voided
simulation.
Parameter | Type | Required? | Description |
---|---|---|---|
type | string | Required | The wire simulation type. |
simulation | object | Required | The simulation request sub-object. |
Parameter | Type | Required? | Description |
---|---|---|---|
wire_id | string | Required | ID of the wire to use as the source for simulated transactions. |
202 - accepted
.
202
HTTP status indicates a successful simulation.
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.
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.
Parameter | Type | Required? | Description |
---|---|---|---|
account_id | string | Required | The id of the account that this wire should be originated from. |
amount | string | Required | Amount of money in dollars to transfer, as a string with two-decimal precision. |
originator | object | Required | A Wire Bank sub-object containing information about the wire originator (See below for definition). |
originator_to_beneficiary_info | string | Required | Information sent by the wire originator to the receiver. |
Parameter | Type | Required? | Description |
---|---|---|---|
address | object | A Wire Bank Address sub-object (See below for definition). | |
name | string | Name of the intermediary bank (maximum of 35 characters). | |
bank_data | object | Required | Bank details sub-ojbect (See below for definition). |
Parameter | Type | Required? | Description |
---|---|---|---|
street_line_1 | string | Required | Street address (first line; maximum of 35 characters). |
street_line_2 | string | Street address (second line, if applicable; maximum of 35 characters). | |
city | string | Required | City (maximum of 21 characters.) |
state | string | Required | U.S. State (two letter abbreviation). |
postal_code | string | Required | Postal code (5-digit or 5+4 Zip Code for U.S. addresses). |
Parameter | Type | Required? | Description |
---|---|---|---|
account_number | string | Required | Bank Account number. |
account_type | string | Required | Account type. |
address | array | Unparsed bank address data. | |
bank_name | string | Name of the bank. | |
routing_number | string | Required | Valid 9-digit ABA routing transit number associated with this bank. |
202 - Accepted
.
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
.