## Monitoring cancellation status
Treasury Prime's technology processes ACH cancellations immediately upon confirmation. You can monitor the action by:
* Viewing the ACH transaction detail page to confirm the status has changed to "Canceled"
* Checking the transaction history in the originating account to confirm no funds movement occurred
* Reviewing the ACH list to verify the canceled transaction
## Troubleshooting
Common issues and solutions:
* **Cancellation banner or Cancel button not available:** The ACH is no longer in `pending` status, so the banner does not appear. Once an ACH moves to `processing` or beyond, it cannot be canceled. If the ACH has already been sent, see [Return an ACH](/console-docs/return-ach) for return options. Also verify your role has the required permissions. Only users with the Banker Admin or Banker Payment Reviewer role can cancel ACH transactions.
* **Cancellation failed to process:** Contact Treasury Prime support for assistance with failed ACH cancellations.
For additional assistance with ACH cancellations or Console functionality, contact Treasury Prime support through your designated support channels.
# Monitor Negative Balance Coverage
Source: https://docs.treasuryprime.com/console-docs/negative-balance-coverage
Review Negative Balance Coverage status for an FBO, monitor NBC and loss reserve balances, and identify accounts with negative balances.
## Prerequisites
To monitor Negative Balance Coverage (NBC) for an FBO, you need:
* Access to the Treasury Prime Console with any Banker role
* The FBO account number for the program you want to monitor
* NBC must be enabled for the FBO
## About Negative Balance Coverage
Negative Balance Coverage (NBC) automatically reconciles ledger accounts that carry a negative balance within an FBO. Each eligible FBO has two associated on-core accounts:
* **NBC account:** Holds funds that cover negative ledger balances within the FBO. The NBC account is owned by the bank's organization, and the program never has access to it.
* **Loss reserve account:** Funded by the program. At the direction of the Bank, Treasury Prime's software instructs a transfer from the loss reserve to replenish the NBC account when negative balances exceed the current NBC coverage.
Each business night, Treasury Prime's software totals the negative ledger balances within every eligible FBO and reconciles the difference between the NBC and loss reserve accounts. At the direction of the Bank, the software instructs a transfer from the loss reserve to the NBC account when negative balances exceed the NBC balance, and a transfer of any excess back to the loss reserve when the NBC balance is more than sufficient.
For a detailed walkthrough of the underlying flow of funds, see the [Negative Balance Coverage API guide](/docs/negative-balance-coverage).
## How to monitor Negative Balance Coverage
### 1. Navigate to the FBO
1. Log into the Treasury Prime Console
2. Click **Accounts** in the left navigation menu
3. Select **FBOs** from the accounts submenu
4. Click the FBO for the program you want to review
### 2. Open the Negative Balance Coverage tab
1. From the FBO detail screen, click the **Negative Balance Coverage** tab
2. The tab displays the FBO's current NBC status, historical balances, and recent NBC activity
### 3. Review the summary metrics
The top of the tab displays four NBC summary metrics for the FBO:
* **Current NBC Balance:** The current balance in the FBO's NBC account. This is the buffer available to cover negative ledger balances.
* **Loss Reserve Balance:** The current balance in the associated loss reserve account. The program funds this account. At the direction of the Bank, Treasury Prime's software instructs a transfer from this account to replenish the NBC account when needed.
* **Coverage Ratio Used (today):** The NBC account balance as a percentage of the FBO's total coverage funds (the NBC account balance plus the loss reserve balance). For example, an NBC balance of $6,513.62 against $105,765.15 in total coverage funds equals 6.16%.
* **Peak NBC Balance (30d):** The highest NBC account balance observed during the past 30 days. Use this metric to gauge the maximum coverage required during the period.
### 4. Review the Coverage & Loss Reserve Balance chart
The Coverage & Loss Reserve Balance chart plots daily NBC and loss reserve balances over time. Click and drag across the chart to filter the view by date range. Use the chart to identify trends, spikes in NBC consumption, or sustained periods of high coverage.
### 5. Review the Top Negative Balances section
The Top Negative Balances section lists the five most severe negative balance accounts over the past 30 days. Each row shows the account number, account name, account ID, negative balance amount, and date.
* Click any account row to open the account detail screen.
* Click **View all** to open the **Negative Balances** tab for the full list.
### 6. Review the NBC ↔ Loss Reserve Book Entries section
The NBC ↔ Loss Reserve Book Entries section lists the most recent automated transfers between the NBC and loss reserve accounts. Each row shows the originating account, amount, recipient account, and the date the entry was created. Use this section to confirm that nightly reconciliation completed and to investigate any unexpected activity.
## Review all negative balances
The Negative Balances tab lists every account with a negative balance for the FBO. Unlike the Top Negative Balances summary on the Negative Balance Coverage tab, which shows only the five most severe accounts, this tab lists the full set of negative balance accounts and lets you filter the results by date.
### 1. Open the Negative Balances tab
1. From the FBO detail screen, click the **Negative Balances** tab
2. The tab displays all accounts with a negative balance for the FBO
### 2. Filter by date
1. Click the **Any Date** filter at the top of the list
2. Select a date or date range to narrow the results to negative balances observed during that window
### 3. Open an account
1. Click any row in the list
2. The Console opens the account detail screen, where you can review transaction history, balances, and account status
## Troubleshooting
Common issues and solutions:
* **Negative Balance Coverage tab not visible:** NBC is enabled by Treasury Prime on a per-FBO basis. If the tab does not appear for an FBO, contact Treasury Prime support to confirm whether NBC is enabled for it.
* **Coverage Ratio Used is approaching 100%:** The program may need to add funds to the loss reserve account. Contact the program to request replenishment.
* **Missing or unexpected book entries:** Treasury Prime's software runs the reconciliation each business night. If an expected entry is missing or an entry appears unexpected, contact Treasury Prime support.
For additional assistance with Negative Balance Coverage or Console functionality, contact Treasury Prime support through your designated support channels.
# Overview
Source: https://docs.treasuryprime.com/console-docs/overview
Sign in to the Treasury Prime Console, find the right guide for your role, and learn how your bank manages day-to-day Console operations.
The Treasury Prime Console is the web application your bank uses to manage payment operations, review account applications, and oversee the programs running on Treasury Prime.
These pages are the operational reference for the Treasury Prime Console. Each guide covers a specific Console task or concept.
## Sign in
Sign in to the Treasury Prime Console at [app.treasuryprime.com](https://app.treasuryprime.com).
**Note:** A Banker Admin in your organization invites new users and assigns their role. Contact your Treasury Prime account manager if no Banker Admin exists in your organization yet.
## Roles and permissions
Each user has a single Banker role that controls which areas, actions, and data they can access in the Treasury Prime Console.
| Role | What it does | Best for |
| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------- |
| **Banker Admin** | Full access to every area of the Treasury Prime Console, including user management, program configuration, account operations, and every payment rail. | Bank operations leads, team managers, and compliance officers who take action in the Treasury Prime Console. |
| **Banker Payment Reviewer** | Acts on payments in the **Payments** area — typically **ACH**, **Book**, and **Wire**. | Payment operations and transaction reviewers. |
| **Banker Account Reviewer** | Reviews account applications in the **Applications** area and account activity in the **Accounts** area, including locking and unlocking accounts. | Onboarding and KYC reviewers, account operations. |
| **Banker Viewer** | Read-only access across the Treasury Prime Console to browse program details, accounts, and payments. | Auditors, leadership, new hires, and compliance reviewers who only observe. |
**Note:** Most banks limit the Banker Admin role to a small number of trusted users to minimize operational risk and exposure. Assign a more limited role when it covers the user's responsibilities.
## Console areas
The Treasury Prime Console organizes operations into the following areas, accessible from the left navigation menu:
| Area | What it's for |
| :--------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Programs** | View and configure the programs running on Treasury Prime, including program limits, features, API permissions, and linked bank accounts. |
| **Accounts** | Manage bank accounts. View account details, lock or close accounts, and set interest. |
| **Applications** | Review and act on account and business applications submitted by programs. Filter applications by source, status, and ownership type, and work the submitted and manual review queues during onboarding. |
| **Payments** | Review and act on payment activity across rails such as **ACH**, **Book**, **Wire**, **Cards**, **Check Issuing**, and **FedNow**. |
| **Reporting** | Access **Prime Analytics** for prebuilt and custom reports on banking activity. Available only to banks that have enabled Prime Analytics. |
| **Settings** | Manage users, organizational settings, payment configurations, and features. Reset MFA for users in your organization. |
| **Files** | View incoming and outgoing bank files for payment rails such as **ACH** and **Wire**. |
For additional assistance with the Treasury Prime Console or these guides, contact Treasury Prime support through your designated support channels.
# Return an ACH
Source: https://docs.treasuryprime.com/console-docs/return-ach
Return incoming ACH transactions or mark outgoing ACH transactions as returned in the Treasury Prime Console to process payment returns and reject transactions.
## Prerequisites
To return an ACH transaction, you need:
* Access to the Treasury Prime Console
* Permissions for ACH operations
* Role must be Banker Admin or Banker Payment Reviewer
* Valid ACH transaction ID
* The ACH must be in a returnable status (see below)
* Return code information
* Know the appropriate ACH return code that matches the reason for the return
## What makes an incoming ACH returnable
Return an incoming ACH in the Treasury Prime Console when **all** of the following conditions are met:
* **Status is Done:** The incoming ACH has completed processing and is in a `done` status in the Treasury Prime Console
* **Within the return window:** The Receiving Depository Financial Institution (RDFI) has 1 business day from the effective date to issue a return for incoming ACH transfers
* **Feature is enabled:** Incoming ACH returns must be enabled for your organization. Contact your relationship manager if this feature is not yet available
* **Account is eligible:** The receiving account must be in an open status (business or consumer)
Once an incoming ACH moves past the return window or has already been returned, it is no longer eligible for return.
## How to return an incoming ACH
Return an incoming ACH when you need to send funds back to the originator.
### 1. Navigate to the incoming ACH transaction
1. Log into the Treasury Prime Console
2. Click **Payments** in the left navigation menu
3. Select **ACH** from the payments submenu
4. Find and click the incoming ACH transaction you want to return
**Note:** You can also navigate directly to an incoming ACH transaction by clicking the **Search** icon (magnifying glass) in the top right corner of the screen. Paste the ACH ID (e.g., inach\_1234567890abcde) into the search bar, then select the matching result to open the incoming ACH transaction detail page.
### 2. Open the return dialog
1. On the incoming ACH transaction detail page, locate the **Done** button in the top right corner
2. Click the dropdown arrow next to the **Done** button
3. Select **Return Incoming ACH** from the dropdown menu
4. The return dialog appears
### 3. Select return code
Complete the following required field:
* **Return Code:** Select the appropriate ACH return code from the dropdown that matches the reason for returning the transaction (e.g., R01 - Insufficient Funds, R02 - Account Closed, R03 - No Account)
**Note:** The return code determines how the return is processed and may affect fees or customer notifications. Select the code that accurately reflects the reason for the return.
### 4. Confirm the return
1. Review the selected return code to ensure it's correct
2. Click **Continue** to proceed with returning the incoming ACH
3. Treasury Prime's technology processes the ACH return immediately
Return Incoming ACH Walkthrough
## How to mark an outgoing ACH as returned
Mark an outgoing ACH as returned when the recipient's bank has returned the ACH to you.
### 1. Navigate to the outgoing ACH transaction
1. Log into the Treasury Prime Console
2. Click **Payments** in the left navigation menu
3. Select **ACH** from the payments submenu
4. Find and click the outgoing ACH transaction that was returned
**Note:** You can also navigate directly to an ACH transaction by clicking the **Search** icon (magnifying glass) in the top right corner of the screen. Paste the ACH ID (e.g., ach\_1234567890abcde) into the search bar, then select the matching result to open the ACH transaction detail page.
### 2. Open the return dialog
1. On the ACH transaction detail page, locate the status button in the top right corner (e.g., **Sent**)
2. Click the dropdown arrow next to the status button
3. Select **Mark ACH as Returned** from the dropdown menu
4. The "Mark ACH as Returned" modal dialog appears
### 3. Select return code
Complete the following required field:
* **Return Code:** Select the appropriate ACH return code from the dropdown that matches the reason the recipient returned the transaction (e.g., R01 - Insufficient Funds, R02 - Account Closed, R03 - No Account)
**Note:** The return code determines how the return is processed and may affect fees or customer notifications. Select the code that accurately reflects the reason for the return.
### 4. Confirm the return
1. Review the selected return code to ensure it's correct
2. Click **Continue** to proceed with marking the ACH as returned
3. Treasury Prime's technology processes the ACH return immediately
## Monitoring ACH return status
Treasury Prime's technology processes ACH returns immediately upon confirmation. You can monitor the action by:
* Viewing the ACH transaction detail page to confirm the status has changed to "Returned"
* Checking the transaction history in the originating or receiving account
* Reviewing the ACH details section for the return code
## Troubleshooting
Common issues and solutions:
* **"Return Incoming ACH" option not available:** The incoming ACH may not be in a returnable state. Verify the ACH is in `done` status and the effective date is within the return window (1 business day for standard returns). Also verify your role has the required permissions. Only users with the Banker Admin or Banker Payment Reviewer role can return ACH transactions.
* **"Mark ACH as Returned" option not available:** The outgoing ACH may not be in a returnable state. Verify the ACH status is eligible for returns (e.g., `sent`). Some ACH transactions cannot be returned after certain processing stages. Also verify your role has the required permissions. Only users with the Banker Admin or Banker Payment Reviewer role can mark ACH transactions as returned.
* **Return code dropdown is empty:** Contact Treasury Prime support for assistance with return code configuration or if return codes are not loading properly.
* **Return failed to process:** Contact Treasury Prime support for assistance with failed ACH returns.
For additional assistance with ACH returns or Console functionality, contact Treasury Prime support through your designated support channels.
# Team and User Management
Source: https://docs.treasuryprime.com/console-docs/team-user-management
Invite users to the Treasury Prime Console, assign and update Banker roles, and reset multi-factor authentication (MFA) so your bank can manage its team and access.
A bank manages its own team in the Treasury Prime Console. A Banker Admin sets up and maintains the organization's users so the right people have the right level of access before your bank begins day-to-day Console operations.
## Prerequisites
To manage your team as a bank, you need:
* Access to the Treasury Prime Console
* Permissions for user management
* Role must be Banker Admin
* Only a Banker Admin can invite users, assign roles, reset MFA, and delete users
If there are currently no Banker Admin users in your organization, contact your Treasury Prime account manager.
## Banker roles
Each user has a single Banker role that controls which areas, actions, and data they can access in the Treasury Prime Console. Review the role definitions before you invite users or change an assignment.
| Role | What it does |
| :-------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Banker Admin** | Full access to every area of the Treasury Prime Console, including user management, program configuration, account operations, and the payment rails enabled for your bank. |
| **Banker Payment Reviewer** | Acts on payments in the **Payments** area, typically **ACH**, **Book**, and **Wire**. |
| **Banker Account Reviewer** | Reviews account applications in the **Applications** area and account activity in the **Accounts** area. |
| **Banker Viewer** | Read-only access across the Treasury Prime Console to browse program details, accounts, and payments. |
A bank is responsible for deciding which role each user is assigned. Treasury Prime does not determine or advise on individual role assignments. Assign roles according to your bank's own compliance, risk, and separation-of-duties policies.
As a general security best practice, limit the Banker Admin role to a small number of trusted users. Because the Banker Admin role grants full access to the Treasury Prime Console, including user management and the payment rails enabled for your bank, assign a more restricted role whenever it covers the user's responsibilities.
## How to invite a user
### 1. Open the Team page
1. Log into the Treasury Prime Console
2. Click **Settings** in the left navigation menu
3. Select **Team** from the settings submenu
### 2. Send the invitation
1. Click **Invite User** in the top right corner
2. Enter the user's **Name** and **Email**, then select the **Role** to assign. All three fields are required.
3. Click **Yes, invite user** to send the invitation
4. The user receives an email invitation to create their account
**Note:** The invited user appears in the **Team** list with an **Invited** status until they accept the invitation and finish creating their account.
## How to resend or cancel a pending invitation
A user with an **Invited** status has not yet accepted their invitation. For these users, the **View actions** menu offers only **Resend invite** and **Delete user**. Role changes and MFA resets become available only after the user accepts the invitation and registers.
1. Click **Settings** in the left navigation menu
2. Select **Team** from the settings submenu
3. Find the invited user in the **Team** list
4. Click the **View actions** menu (the **...** icon) at the end of the user's row
5. Select **Resend invite** to send the invitation email again, or **Delete user** to cancel the invitation
## How to change a user's role
Change a user's role after they have accepted their invitation and registered. Role changes are not available for users with an **Invited** status.
### 1. Open the user's actions menu
1. Click **Settings** in the left navigation menu
2. Select **Team** from the settings submenu
3. Find the user whose role you want to change in the **Team** list
4. Click the **View actions** menu (the **...** icon) at the end of the user's row
5. Select **Edit user profile**
### 2. Update the role
1. Select the new **Role** for the user
2. Click **Yes, edit user** to confirm
3. The user's access updates to match the new role
**Note:** Each user has a single role. Assigning a new role replaces the user's previous role.
## How to reset a user's MFA
Reset MFA when a user loses access to their authenticator app or device and can no longer complete sign-in. MFA reset is available only for users who have accepted their invitation and registered, not for users with an **Invited** status.
1. Click **Settings** in the left navigation menu
2. Select **Team** from the settings submenu
3. Find the user who needs an MFA reset in the **Team** list
4. Click the **View actions** menu (the **...** icon) at the end of the user's row
5. Select **Reset multi-factor**
6. Confirm the reset
The user is prompted to set up MFA again the next time they sign in.
## How to delete a user
Delete a user when they leave your team or no longer need access to the Treasury Prime Console.
1. Click **Settings** in the left navigation menu
2. Select **Team** from the settings submenu
3. Find the user you want to delete in the **Team** list
4. Click the **View actions** menu (the **...** icon) at the end of the user's row
5. Select **Delete user**
6. Confirm the deletion
**Note:** Deleting a user revokes their access to the Treasury Prime Console immediately.
## Troubleshooting
Common issues and solutions:
* **Settings or Team option not visible:** Only a Banker Admin can manage users. If you do not see the **Settings** menu or the **Team** page, your role does not include user management. Contact a Banker Admin in your organization.
* **Edit user profile or Reset multi-factor not available:** These actions appear only for users who have accepted their invitation and registered. For a user with an **Invited** status, only **Resend invite** and **Delete user** are available.
* **Invited user did not receive the email:** Ask the user to check their spam folder and confirm the email address is correct, then select **Resend invite** from the user's **View actions** menu. Invitations may take a few minutes to arrive.
* **User cannot sign in after losing their device:** Reset the user's MFA so they can set it up again on their new device.
* **No Banker Admin in your organization:** Contact your Treasury Prime account manager to establish the first Banker Admin.
For additional assistance with team and user management or Console functionality, contact Treasury Prime support through your designated support channels.
# Overview
Source: https://docs.treasuryprime.com/reference/account
The Account API allows you to view and manage your users' bank accounts, including balances, transactions, and owners or authorized users.
Note that you cannot create or open new bank accounts using this interface. See the [Apply section](/reference/apply-overview) for creating new accounts.
Only information about your own accounts is available via this interface; for interactions with accounts owned by others, see the [Counterparties section](/reference/get_counterparty).
# Overview
Source: https://docs.treasuryprime.com/reference/account-application
The Account Application is used to make the final submission when applying to open a new account.
Each Account Application that you create requires the inclusion of the IDs of the relevant [Account Product](/reference/account-product), [Business Application](/reference/business-application), [Person Application(s)](/reference/person-application), and [Deposit objects](/reference/deposit).
Both consumer and commercial account applications are submitted via this endpoint. The shape of each varies slightly.
The `person_applications` parameter is only required for consumer accounts; a similar parameter is available on the [Business Application object](/reference/business-application) for commercial accounts.
**Example Consumer Account Application Request**
```bash bash theme={null}
curl -u $API_KEY_ID:$API_SECRET_KEY https://api.treasuryprime.com/apply/account_application \
-H 'Content-Type: application/json' \
-d '{
"deposit_id": "adpt_01d5w6xx0tvs",
"person_applications": [
{
"id": "apsn_01d5w6yaa6vt",
"roles": ["owner", "signer"]
}
],
"primary_person_application_id": "apsn_01d5w6yaa6vt",
"account_product_id": "apt_11gqk87qmrax"
}'
```
**Example Commercial Account Application Request**
```bash bash theme={null}
curl -u $API_KEY_ID:$API_SECRET_KEY https://api.treasuryprime.com/apply/account_application \
-H 'Content-Type: application/json' \
-d '{
"deposit_id": "adpt_01d5wgg8js",
"business_application_id": "abus_01dcrqkr3yhw",
"primary_person_application_id": "apsn_01d5w6yaa6vt",
"account_product_id": "apt_11gqk87qmrax"
}'
```
# Account Application Testing
Source: https://docs.treasuryprime.com/reference/account-application-testing
# Account Application Testing
In the Sandbox environment, you can use the following details to simulate application statuses that may occur in the course of Production use.
## Business Application Testing
To manually trigger a status for business account applications, the first digit of the `tin` field of **each** [Person Application object](/reference/person-application) **and** the `tin` property of the [Business Application object](/reference/business-application) submitted with the application must be set to one of the following values **before** submitting the [Account Application](/reference/account-application). Note that all of the `tin` properties must be set to the same value.
An `x` indicates any digit.
| Status | Test TIN |
| ------------- | ------------ |
| Approved | `1x-xxxxxxx` |
| Manual Review | `2x-xxxxxxx` |
| Processing | `3x-xxxxxxx` |
| Rejected | `4x-xxxxxxx` |
| Submitted | `5x-xxxxxxx` |
## Personal Application Testing
To manually trigger a status for a personal account application, the first digit of the `tin` property of **each** [Person Application object](/reference/person-application) submitted with the application must be set to one of the following values **before** submitting the [Account Application](/reference/account-application). Note that all of the `tin` properties must be set to the same value.
An `x` indicates any digit.
| Status | Test TIN |
| ------------- | ------------- |
| Approved | `1xx-xx-xxxx` |
| Manual Review | `2xx-xx-xxxx` |
| Processing | `3xx-xx-xxxx` |
| Rejected | `4xx-xx-xxxx` |
| Submitted | `5xx-xx-xxxx` |
# Overview
Source: https://docs.treasuryprime.com/reference/account-product
The Account Product represents the type of account that will be opened by an approved account application. Account Products may be uniquely configured for your organization depending on your bank partner and account opening needs.
Each account application that you create requires the inclusion of a Account Product ID. See the [account opening guide](/docs/opening-an-account) for more details.
# Overview
Source: https://docs.treasuryprime.com/reference/ach-simulations
By default, all ACHs created in the sandbox environment are moved through the normal [ACH workflow](/reference/ach), eventually ending up with the status, `sent`. This accelerated processing happens at the top of every hour.
ACH simulations allow developers to manually trigger an ACH into various states that may arise in the course of production money movement. Developers can better understand the flow of funds by manually updating an ACH's status to `sent` or `returned` at an accelerated timeline, as defined in the "Simulation Types" table below. The corresponding impact to an account's balance, transaction(s), and [hold(s) (if applicable)](/reference/ach) can also be observed by calling the various respective endpoints.
Note that when using ACH simulations in Sandbox, the `service` field on the ACH object will be ignored and will not impact the simulation.
The three ACH simulation types are listed below.
ACH Simulations are representative of ACH behavior on Treasury Prime ledger accounts. They may not exactly reflect on-core activity at every bank.
## ACH Simulation Types
| Simulation type | Explanation |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ach.processing\_sent | Simulate an ACH being sent by validating, processing and sending the ACH immediately. If an ACH fails validation or processing, the ACH is instead updated to an error status. |
| ach.processing\_returned | Simulate an ACH being returned by validating, processing, sending, and then returning the ACH immediately. Similarly to processing\_sent, any validation or processing failure will cause the ACH status to be updated to error. |
| ach.incoming\_ach | Simulate an incoming credit or debit (externally originated) ACH. |
## Preparing for an ACH Simulation
To simulate a sent or returned ACH, an ACH object must be first be created via a `POST` request to the `/ach` endpoint with the following parameters included in the `userdata` field:
| Parameter | Type | Required? | Description |
| --------------------- | ------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| manual | boolean | Required | `true` should be provided to indicate that this is a simulation request. This field prevents the ACH from automatically being processed at the top of the next hour. |
| scheduled\_settlement | integer | | Only applicable to `debit` ACHs. The number of minutes to wait after the simulation is submitted to capture the ACH request. Defaults to `15` minutes if unset. |
##### Example Request
```bash bash theme={null}
$ curl -u $API_KEY_ID:$API_SECRET_KEY https://api.sandbox.treasuryprime.com/ach \
-H 'Content-Type: application/json' \
-d '{
"account_id": "acct_1234567890",
"amount": "100.00",
"counterparty_id": "cp_0987654321",
"direction": "debit",
"sec_code": "ccd",
"userdata": {
"manual": true,
"scheduled_settlement": 0
}
}'
```
## Create a Sent or Returned ACH Simulation
Initiate either an `ach.processing_sent` or an `ach.processing_returned` simulation.
```bash bash theme={null}
POST https://api.sandbox.treasuryprime.com/simulation
```
### Sent or Returned ACH Simulation Request Body
| Parameter | Type | Required? | Description |
| ---------- | ------ | --------- | --------------------------------- |
| type | string | Required | The ACH simulation type. |
| simulation | object | Required | The simulation request subobject. |
#### Simulation Sub-Object
| Parameter | Type | Required? | Description |
| --------- | ------ | --------- | -------------------------------------------------------------- |
| ach\_id | string | Required | ID of the ACH to use as the source for simulated transactions. |
##### Example Request
```bash bash theme={null}
$ curl -u $API_KEY_ID:$API_SECRET_KEY https://api.sandbox.treasuryprime.com/simulation \
-H 'Content-Type: application/json' \
-d '{
"type": "ach.processing_sent",
"simulation": {
"ach_id": "ach_123456"
}
}'
```
##### Success Response
There will be no response body. The response code will be a `202 - accepted`.
##### Error Response
```bash bash theme={null}
{
"error": "Invalid simulation request or simulation not implemented"
}
```
## Example: How to Simulate a Sent ACH
A common flow for an ACH simulation is creating an ACH, and then calling the simulation endpoint with the `id` of the ACH. See [ACH](/reference/ach) for example ACH requests. The following calls outline simulating an ACH sent simulation with a debit ACH.
##### Create ACH Request
```bash bash theme={null}
$ curl -u $API_KEY_ID:$API_SECRET_KEY https://api.sandbox.treasuryprime.com/ach \
-H 'Content-Type: application/json' \
-d '{
"account_id": "acct_1234567890",
"amount": "100.00",
"counterparty_id": "cp_0987654321",
"direction": "debit",
"sec_code": "ccd",
"userdata": {
"manual": true,
"scheduled_settlement": 0
}
}'
```
##### Simulation Request
```bash bash theme={null}
$ curl -u $API_KEY_ID:$API_SECRET_KEY https://api.sandbox.treasuryprime.com/simulation \
-H 'Content-Type: application/json' \
-d '{
"type": "ach.processing_sent",
"simulation": {
"ach_id": "ach_104"
}
}'
```
##### 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 /ach/:id` endpoint to confirm that the status of the ACH has been updated to `sent` or `returned`. The funds should have been moved to/from an account and a corresponding transaction should appear.
## Create an Incoming ACH Simulation
Initiate an `ach.incoming_ach` simulation. Simulates an ACH that was originated externally from a different bank by creating a transaction on an account.
```bash bash theme={null}
POST https://api.sandbox.treasuryprime.com/simulation
```
### Simulation Request Body
| Parameter | Type | Required? | Description |
| -------------------- | ------ | --------- | ----------------------------------------------------------------------------------------------- |
| amount | string | Required | Amount of money in dollars to transfer, as a string with two-decimal precision. |
| account\_type | string | Required | The type of the account to send money to, as a string. Should be either `checking` or `savings` |
| direction | string | Required | Either `credit` or `debit`. |
| sec\_code | string | Required | One of `ccd`, `cie`, `ppd`, `tel`, or `web`. |
| account\_number | string | Required | Bank account number for ACH use (maximum of 17 characters). |
| company\_name | string | | The name of the company that originated this ACH. |
| company\_description | string | | Description of the company that originated this ACH. |
| company\_id | string | | 10 digit unique identifier used to identify the originator collecting payments for a debit ACH. |
##### Example Request
The following call outlines simulating an incoming credit ACH.
```bash bash theme={null}
$ curl -u $API_KEY_ID:$API_SECRET_KEY https://api.sandbox.treasuryprime.com/simulation \
-H 'Content-Type: application/json' \
-d '{
"type": "ach.incoming_ach",
"simulation": {
"account_number": "123456789",
"account_type": "checking",
"amount": "100.00",
"direction": "credit",
"sec_code": "ccd",
"company_name": "Prime of Treasury Inc.",
"company_desc": "To infinity, and beyond!",
"company_id": "9876543210"
}
}'
```
##### Success Response
There will be no response body. The response code will be a `202 - Accepted`.
##### Error Response
```bash bash theme={null}
{
"error": "Invalid simulation request or simulation not implemented"
}
```
# Overview
Source: https://docs.treasuryprime.com/reference/additional-person
This flow provides the ability to add additional people to an account that has already been opened by associating a `person_application_id` with an `account_id`. See [Person Application](/reference/person-application) and [Account](/reference/account).
When an application is submitted it will begin in the `pending` status and move through `processing` to either the `rejected` or `approved` status. Once approved, a new `Person` object is created and attached to the `Account` object. The ID of the new `Person` object is added to the `person_ids` list on the `Account` object.
# Overview
Source: https://docs.treasuryprime.com/reference/apply-overview
The Apply API allows you to apply to open a new bank account, or apply to add additional authorized users to an existing account. Note that this is the only way to create new accounts or authorized users.
It consists of multiple related resources that represent both the person making the application and the product for which she is applying. Treasury Prime and its partner banks will use the information provided to conduct due diligence and customer onboarding.
## Resources
Performing customer due diligence requires collecting comprehensive information about the potential customer, whether it's a person or a business. The Apply API encodes this information in a hierarchy of resources. To submit an application, you'll build up a complete hierarchy through a series of API calls.
### Resource Hierarchy
##### Personal Accounts
```
Account Application
└── Deposit
└── Person Application(s)
```
##### Business Accounts
```
Account Application
└── Deposit
└── Business Application
└── Person Applications
```
## Submitting an Application
Final submission of an application for a new account happens when the [Account Application](/reference/account-application) resource is successfully created. You should organize your code so that you make this call last in the series of API calls.
When testing your integration, it may be useful to coerce an [Account Application](/reference/account-application) into a particular `status`. By passing certain sentinel values, you can control whether the application gets approved, rejected, or put into manual review. See the [testing guide](/reference/account-application-testing) for instructions.
# Overview
Source: https://docs.treasuryprime.com/reference/business
The Business resource represents an organization that holds an Account.
# Overview
Source: https://docs.treasuryprime.com/reference/card-simulations
There are currently seven simulation types for cards as described below.
| Simulation type | Card event message type | Explanation |
| -------------------------------------------------- | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| card\_event.auth\_capture | auth-capture | Notification that a previous authorization has been captured (related holds are released and funds moved as a result of this request). |
| card\_event.auth\_clear\_request | auth-clear-request | Request to authorize and capture funds in one message (funds are moved immediately). |
| card\_event.auth\_request | auth-request | Request to authorize spending with card (if approved, this places a hold on funds). Note that this simulation will have any applicable [card controls](/reference/card-controls) run against the auth request. |
| card\_event.auth\_reversal | auth-reversal | Notification that a previous authorization has been reversed. |
| card\_event.force\_capture | force-capture | Notification that funds have been captured. |
| card\_event.original\_credit\_auth\_clear\_request | original-credit-auth-clear-request | Request to credit funds for OCT. |
| card\_event.refund | refund | Refunds a previously completed transaction. |
| card\_event.refund\_auth | refund-auth-request | Request to authorize a refund to a card. Note that this simulation will not create a transaction object. |
Each of these simulations ties to a `message type` from the [card events](/reference/card-event) endpoint.
## Create a Card Simulation
Initiate a card simulation
```bash bash theme={null}
POST https://api.sandbox.treasuryprime.com/simulation
```
### Card Simulation Request Body
#### Auth Request, Force Capture, Original Credit Auth and Clear, and Refund Auth
| Parameter | Type | Required? | Description |
| --------- | ------ | --------- | -------------------------------------------------------------------------------------------------------------- |
| card\_id | string | Required | ID of the card to use as the source for simulated transactions. |
| amount | string | Required | Amount of money related to the event, with two decimal precision. For example, "10.00" would indicate \$10.00. |
| merchant | object | Required | Object representing the merchant where the card event occurred. |
#### Auth Clear Request
| Parameter | Type | Required? | Description |
| --------- | ------ | --------- | -------------------------------------------------------------------------------------------------------------- |
| card\_id | string | Required | ID of the card to use as the source for simulated transactions. |
| amount | string | Required | Amount of money related to the event, with two decimal precision. For example, "10.00" would indicate \$10.00. |
| atm | object | Optional | Object representing ATM data for the card event. |
| merchant | object | Required | Object representing the merchant where the card event occurred. |
#### Auth Capture, Auth Reversal, and Refund
| Parameter | Type | Required? | Description |
| ------------ | ------ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| card\_id | string | Required | ID of the card to use as the source for simulated transactions. |
| amount | string | Required | Amount of money related to the event, with two decimal precision. For example, "10.00" would indicate \$10.00. For ATM transaction simulations, the ATM fee will be added to this number. |
| merchant | object | Required | Object representing the merchant where the card event occurred. |
| external\_id | string | Required | The trace\_id for the auth request simulation you want to clear, reverse, or refund. \{% br /%}This can also be found under the [transaction](/reference/get_transaction) endpoint as the `trace_id` for the `hold` transaction related to the auth request or as the trace\_id on the [card event](/reference/card-event) for the auth request. |
#### ATM Sub-Object
| Parameter | Type | Description |
| ------------ | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| network | string | Network ATM transaction took place on. |
| network\_fee | string | ATM fee related to the event, with two decimal precision. For example, "2.00" would indicate \$2.00. This fee will be added to the `amount` indicated for a simulation. |
Note that the `merchant` and `address` sub-objects are the same across all card simulations.
#### Merchant Sub-Object
| Parameter | Type | Description |
| --------- | ------ | --------------------------------------------------------------------------- |
| name | string | Name of the merchant. |
| mid | string | Merchant ID. |
| mcc | string | Merchant category code. |
| address | object | Object containing `city`, `state`, `postal_code`, and `country` as strings. |
#### Address Sub-Object
| Parameter | Type | Description |
| ------------ | ------ | ------------------------------------- |
| city | string | Merchant city. |
| state | string | Two-character state abbreviation. |
| postal\_code | string | Five-digit postal code. |
| country | string | Three-character country abbreviation. |
### Example Request
```bash bash theme={null}
$ curl -u $API_KEY_ID:$API_SECRET_KEY https://api.sandbox.treasuryprime.com/simulation \
-H 'Content-Type: application/json' \
-d '{
"type": "card_event.auth_request",
"simulation": {
"card_id": "card_104",
"amount": "25.10",
"merchant": {
"mcc": "5411",
"mid": "4445025949032",
"name": "KROGER #10626",
"address": {
"city": "LAS VEGAS",
"state": "NV",
"country": "USA",
"postal_code": "88901"
}
}
}
}'
```
### Example Response
#### Success
There will be no response body. The response code will be a `202 - accepted`
#### Error
```bash bash theme={null}
{
"error": "Simulation not implemented for issuer: marqeta, event: card_event.not_implemented_event"
}
```
## Example Usage
A common flow for a card simulation is creating a mock swipe for an issued card at a specific merchant. The following calls outline simulating a purchase at a grocery store.
Create an auth request simulating the initial swipe of the card at the point of sale system. This auth request will be routed through the mocked card network and verified against any [card controls](/reference/card-controls) that have been setup.
```bash bash theme={null}
$ curl -u $API_KEY_ID:$API_SECRET_KEY https://api.sandbox.treasuryprime.com/simulation \
-H 'Content-Type: application/json' \
-d '{
"type": "card_event.auth_request",
"simulation": {
"card_id": "card_104",
"amount": "25.10",
"merchant": {
"mcc": "5411",
"mid": "4445025949032",
"name": "KROGER #10626",
"address": {
"city": "LAS VEGAS",
"state": "NV",
"country": "USA",
"postal_code": "88901"
}
}
}
}'
```
A hold will have been created for the amount of the requested purchase.
To capture and approve this auth request the `trace_id` for the `auth_request` is required. This can be retrieved from either the [card\_event](/reference/card-event) generated upon receipt of the auth request or the [transaction](/reference/get_transaction) endpoint.
Here it is located via the account transaction endpoint via this request.
```bash bash theme={null}
$ curl https://api.sandbox.treasuryprime.com/account/acct_1029384756/transaction \
-u "$API_KEY_ID:$API_SECRET_KEY"
```
Here's the response we would expect where the `hold` generated in response to the auth request is the most recent transaction.
```bash bash theme={null}
{
"data": [
{
"check_id": null,
"billpay_payment_id": null,
"ach_id": null,
"amount": "25.10",
"balance": "256147.27",
"book_id": null,
"check_id": null,
"check_number": null,
"date": "2021-10-26",
"extended_timestamp": "2021-10-26T12:02:03Z",
"extended_timestamp_precise": "2021-10-26T12:02:03.329Z",
"desc": "KROGER #10626 4445025949032 - AUTHORIZATION REQUEST",
"fingerprint": "ttx_11gqg7am69g1s9",
"id": "ttx_11gqg7am69g1s9",
"summary": null,
"type": "hold",
"trace_id": "23f2b0e82c684638a5993f53e920cdab",
"wire": null,
"wire_id": null,
"related_transfer_ids": []
},
...
]
}
```
Now that the `trace_id` has been found, an auth capture request can be created simulating the verification of the auth request. The `trace_id` is supplied as the `external_id` for our simulation call. The auth capture will release the hold and debit the funds from the account.
```bash bash theme={null}
$ curl -u $API_KEY_ID:$API_SECRET_KEY https://api.sandbox.treasuryprime.com/simulation \
-H 'Content-Type: application/json' \
-d '{
"type": "card_event.auth_capture",
"simulation": {
"external_id": "23f2b0e82c684638a5993f53e920cdab",
"card_id": "card_104",
"amount": "25.10",
"merchant": {
"mcc": "5411",
"mid": "4445025949032",
"name": "KROGER #10626",
"address": {
"city": "LAS VEGAS",
"state": "NV",
"country": "USA",
"postal_code": "88901"
}
}
}
}'
```
# Overview
Source: https://docs.treasuryprime.com/reference/check-deposit-testing
In the Sandbox environment, you can use the following details to simulate image errors and statuses that may occur in the course of Production use of the a [`/check_deposit`](/reference/check-deposit) endpoint.
**Sandbox Limitations**:
* The check deposit simulation does **not** create transactions or update account balances. While check deposits will successfully process and transition through status changes (e.g., reaching "sent" status), no funds will be added to the account.
* Our sandbox simulation is connected to our vendor's sandbox. You must upload valid check images (front and back) for successful testing.
## Simulate Image Errors
To simulate an `error` status during the image verification process, set the `amount` property to any value that starts with the number 9 (e.g. `950.10`, `0.97`, or `0.09`). The response to create the Check Deposit will initially show `status` as "pending", but will later be updated to return "canceled\_OCR".
##### Example request to force a check deposit image error
```bash bash theme={null}
curl -u $API_KEY_ID:$API_SECRET_KEY https://api.treasuryprime.com/check_deposit \
-H 'Content-Type: application/json' \
-d '{
"account_id": "acct_1234567890",
"amount": "900.00",
"back_image_file_id": "file_0987654321",
"front_image_file_id": "file_1234567890",
"device": {"os_name": "ios",
"os_version": "12"},
"person_id": "owner_1234567890"
}'
```
## Simulate Statuses
By default, all [Check Deposits](/reference/check-deposit) created in the sandbox environment will initially have their statuses set to "pending". To trigger a specific status for a Check Deposit object, pass one of the following values in the `amount` property.
| Status | Test Amount |
| ------------- | --------------------------- |
| canceled\_OCR | Any value starting with `9` |
| error | Any value starting with `8` |
| returned | Any value starting with `7` |
Note: Status changes are processed approximately every 10 minutes in Sandbox. After processing, the status will not change again.
# Overview
Source: https://docs.treasuryprime.com/reference/check-issuing-testing
# Check Issuing Testing
By default, all checks created in the sandbox environment will follow the normal check issuing workflow until they reach a `sent` status. Checks created in sandbox that are in the `sent` status will remain in this status until they expire and are subsequently moved to the `expired` status 180 days after they are created, or until a `stop_payment` request is made on the check which moves it to the `stop_payment_pending` status.
Any sandbox webhooks configured for check create or check updates will automatically work.
## Issuing A Check
##### Example Request to Issue a Check
When a check is issued, it will be in a status of `pending`.
```bash bash theme={null}
curl -u $API_KEY_ID:$API_SECRET_KEY https://api.sandbox.treasuryprime.com/check \
-H 'Content-Type: application/json' \
-d '{
"account_id": "acct_1234567890",
"amount": "900.00",
"message": "This is a test message.",
"memo": "This is a test memo",
"recipient": {
"name": "George Washington",
"address": {
"city": "Washington",
"postal_code": "20003",
"state": "DC",
"street_line_1": "1600 Pennsylvania Ave.",
"street_line_2": ""
}
}'
```
## Updating A Check's Status
Checks in sandbox can only be updated to one of two statuses via the API: `canceled` or `stop_payment_pending`.
### Cancel A Check
Checks can only be `canceled` within 1 hour of it being created while it is in a `pending` status. After this 1-hour window passes, a check is updated from the `pending` status to the `sent` status.
##### Example Request Cancel a Check
```bash bash theme={null}
curl -u $API_KEY_ID:$API_SECRET_KEY https://api.sandbox.treasuryprime.com/check/ch_1234567890 \
-X PATCH \
-H 'Content-Type: application/json' \
-d '{
"status": "canceled"
}'
```
### Request Stop Payment
A `stop_payment` request can be made to checks that are no longer in a `pending` status and have transitioned into the `sent` status. In sandbox, when a check is moved to the `stop_payment_pending` status it will remain in that status until it is moved to the `expired` status 180 days after the date it was created.
##### Example Request to Request stop\_payment
```bash bash theme={null}
curl -u $API_KEY_ID:$API_SECRET_KEY https://api.sandbox.treasuryprime.com/check/ch_1234567890 \
-X PATCH \
-H 'Content-Type: application/json' \
-d '{
"status": "stop_payment"
}'
```
# Delete a Webhoook
Source: https://docs.treasuryprime.com/reference/delete_webhook-id
api-reference/openapi-utilities.json DELETE /webhook/{id}
# Overview
Source: https://docs.treasuryprime.com/reference/digital-wallet-token-simulations
# Digital Wallet Token Simulations
Digital Wallet Token simulations are intended to mock the usage of provisioning a card to a digital wallet. A successful simulation call will return a 202 status. An object id will not be returned, but you will receive a `digital_wallet_token.create` webhook with the object id. This object id can be used on the [/digital\_wallet\_token/`{id}`](/reference/digital-wallet-token) endpoint. There is currently one simulation below.
| Simulation type | Token message type | Explanation |
| ----------------------------------- | ------------------ | ------------------------------------------------- |
| digital\_wallet\_token.provisioning | provisioning | Simulate a card getting added to a digital wallet |
## Create a Digital Wallet Token Simulation
Initiate a Digital Wallet Token simulation.
```bash bash theme={null}
POST https://api.sandbox.treasuryprime.com/simulation
```
### Digital Wallet Token Request Body
#### Provisioning
| Parameter | Type | Required? | Description |
| ------------------------ | ------ | --------- | ---------------------------------------------------------------------- |
| card\_id | string | Required | ID of the card to use as the source for simulated tokens. |
| fulfillment | object | | An object that defines additional fields for fulfillment of the token. |
| token\_service\_provider | object | | An object that defines additional fields for requestor of the token. |
#### Fulfillment Sub-Object
| Parameter | Type | Description |
| --------- | ------ | --------------------------------------------------------------------------------------------------------------------------- |
| status | string | Provisioning status of the token. One of `decision_green`, `decision_red`, `decision_yellow`, `rejected`, or `provisioned`. |
#### Token Service Provider Sub-Object
| Parameter | Type | Description |
| ---------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| token\_requestor\_name | string | Name of the token requestor within the card network. One of `APPLE_PAY` or `ANDROID_PAY`. |
| token\_requestor\_id | string | Unique numerical identifier of the digital wallet token requestor within the card network. These IDs map to a token\_requestor\_name. `50110030273` for Apple Pay, `50120834693` for Google Pay, and `50139059239` for Samsung Pay. |
### Example Request
```bash bash theme={null}
$ curl -u $API_KEY_ID:$API_SECRET_KEY https://api.sandbox.treasuryprime.com/simulation \
-H 'Content-Type: application/json' \
-d '{
"type": "digital_wallet_token.provisioning",
"simulation": {
"card_id": "card_104",
"fulfillment": {
"status": "provisioned"
},
"token_service_provider": {
"token_requestor_name": "APPLE_PAY",
"token_requestor_id": "50110030273"
}
}
}'
```
### Example Response
#### Success
There will be no response body. The response code will be a `202 - accepted`
#### Error
```bash bash theme={null}
{
"error": "Simulation not implemented for digital_wallet_token.not_implemented_event"
}
```
# Overview
Source: https://docs.treasuryprime.com/reference/fednow-simulations
FedNow simulations allow developers to simulate specific events with FedNow payments. It is possible to simulate both
the sending and receiving of funds via this channel. The `failed` and `succeed` simulations represent outcomes for a
FedNow Send payment, where funds attempt to move from your ledger to a third party. The `received` simulation represents
an outcome for a FedNow Receive payment, where funds from a third party are being received on your ledger.
## FedNow Simulation Types
| Simulation Type | Explanation |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `fednow.failed` | Simulate the failure of a FedNow payment. This failure is not simulating a specific reason, just that the payment did not succeed. Payment must be in a `pending` status. |
| `fednow.succeed` | Simulate the success of an originated FedNow payment. The payment must be in a `pending` status. Will move funds on the account and affect account balances. |
| `fednow.received` | Simulate an incoming FedNow payment, will affect the destination account's balances as well as create a FedNow object representing the incoming payment. |
## Simulate a successful or failed FedNow payment
Initiate a `fednow.failed` or `fednow.succeed` simulation event.
```bash bash theme={null}
POST https://api.sandbox.treasuryprime.com/simulation
```
### FedNow successful or failed simulation request body
| Parameter | Type | Required? | Description |
| ------------ | ------ | --------- | ----------------------------------- |
| `type` | string | Required | `fednow.failed` or `fednow.succeed` |
| `simulation` | object | Required | The simulation request sub-object. |
##### Simulation Sub-Object
| Parameter | Type | Required? | Description |
| ----------- | ------ | --------- | ----------------------------------------------------------------------------------------- |
| `fednow_id` | string | Required | ID of the FedNow object the developer has already created, must be in a `pending` status. |
##### 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 /fednow/:id` endpoint to confirm that the status of
the status of the payment has been updated accordingly. If you simulated a successful payment then you should also see
transactions on the associated account as well as balance changes.
## Simulate an incoming FedNow payment
Initiate a `fednow.received` simulation event.
```bash bash theme={null}
POST https://api.sandbox.treasuryprime.com/simulation
```
### FedNow Received simulation request body
| Parameter | Type | Required? | Description |
| ------------ | ------ | --------- | ---------------------------------- |
| `type` | string | Required | `fednow.received` |
| `simulation` | object | Required | The simulation request sub-object. |
##### Simulation Sub-Object
| Parameter | Type | Required? | Description |
| -------------- | ------ | --------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `amount` | string | Required | Amount of the FedNow payment to receive, must be a positive amount. `payment_type` will determine the direction of the payment. |
| `account_id` | string | Required | Destination account ID for the payment to affect. |
| `payment_type` | string | Required | Must be either `credit` or `debit`. Will determine whether funds are deposited or withdrawn from the destination account. |
##### 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 /fednow` endpoint to retrieve FedNow payments. There
will be a new FedNow payment record there for the amount/account/direction specified in the simulation. The destination
account specified will also have new transactions as well as it's balance updated accordingly.
# List Accounts
Source: https://docs.treasuryprime.com/reference/get_account
api-reference/openapi-account.json GET /account
# Fetch an Account
Source: https://docs.treasuryprime.com/reference/get_account-id
api-reference/openapi-account.json GET /account/{id}
# List Average Balances
Source: https://docs.treasuryprime.com/reference/get_account_average_balance
api-reference/openapi-account.json GET /account/{id}/average_balance
# List Daily Balances
Source: https://docs.treasuryprime.com/reference/get_account_daily_balance
api-reference/openapi-account.json GET /account/{id}/daily_balance
# List Account Locks
Source: https://docs.treasuryprime.com/reference/get_account_lock
api-reference/openapi-account.json GET /account_lock
# Fetch an Account Lock
Source: https://docs.treasuryprime.com/reference/get_account_lock-id
api-reference/openapi-account.json GET /account_lock/{id}
# List Pending Transactions
Source: https://docs.treasuryprime.com/reference/get_account_pending_transaction
api-reference/openapi-account.json GET /account/{account_id}/pending_transaction
# List Account Products
Source: https://docs.treasuryprime.com/reference/get_account_product
api-reference/openapi-apply.json GET /account_product
# Fetch an Account Product
Source: https://docs.treasuryprime.com/reference/get_account_product-id
api-reference/openapi-apply.json GET /account_product/{id}
# Fetch a Statement
Source: https://docs.treasuryprime.com/reference/get_account_statement
api-reference/openapi-account.json GET /account/{id}/statement
# List Tax Documents
Source: https://docs.treasuryprime.com/reference/get_account_tax_document
api-reference/openapi-account.json GET /account/{id}/tax_document
# Fetch a Tax Document
Source: https://docs.treasuryprime.com/reference/get_account_tax_document-id
api-reference/openapi-account.json GET /account/{account_id}/tax_document/{id}
# List Transactions
Source: https://docs.treasuryprime.com/reference/get_account_transaction
api-reference/openapi-account.json GET /account/{id}/transaction
# List Account Applications
Source: https://docs.treasuryprime.com/reference/get_apply_account_application
api-reference/openapi-apply.json GET /apply/account_application
# Fetch an Account Application
Source: https://docs.treasuryprime.com/reference/get_apply_account_application-id
api-reference/openapi-apply.json GET /apply/account_application/{id}
# List Additional Person Applications
Source: https://docs.treasuryprime.com/reference/get_apply_additional_person_application
api-reference/openapi-apply.json GET /apply/additional_person_application
# List Businesses
Source: https://docs.treasuryprime.com/reference/get_business
api-reference/openapi-account.json GET /business
# Fetch a Business
Source: https://docs.treasuryprime.com/reference/get_business-id
api-reference/openapi-account.json GET /business/{id}
# List Documents
Source: https://docs.treasuryprime.com/reference/get_document
api-reference/openapi-utilities.json GET /document
# Fetch a Document
Source: https://docs.treasuryprime.com/reference/get_document-id
api-reference/openapi-utilities.json GET /document/{id}
# Fetch a File
Source: https://docs.treasuryprime.com/reference/get_file-id
api-reference/openapi-utilities.json GET /file/{id}
# Download a File
Source: https://docs.treasuryprime.com/reference/get_file-id-content
api-reference/openapi-utilities.json GET /file/{id}/content
# Get Green Dot Cash Load
Source: https://docs.treasuryprime.com/reference/get_greendot-id
api-reference/openapi-payments.json GET /greendot/{id}
# Get Green Dot Locations
Source: https://docs.treasuryprime.com/reference/get_greendot_location
api-reference/openapi-payments.json GET /greendot/location
# List Incoming ACHs
Source: https://docs.treasuryprime.com/reference/get_incoming_ach
api-reference/openapi-payments.json GET /incoming_ach
# Fetch an Incoming ACH
Source: https://docs.treasuryprime.com/reference/get_incoming_ach-id
api-reference/openapi-payments.json GET /incoming_ach/{id}
# List Incoming Wires
Source: https://docs.treasuryprime.com/reference/get_incoming_wire
api-reference/openapi-payments.json GET /incoming_wire
# Fetch an Incoming Wire
Source: https://docs.treasuryprime.com/reference/get_incoming_wire-id
api-reference/openapi-payments.json GET /incoming_wire/{id}
# List Account Numbers
Source: https://docs.treasuryprime.com/reference/get_invoice_account_number
api-reference/openapi-payments.json GET /invoice_account_number
# Fetch an Account Number
Source: https://docs.treasuryprime.com/reference/get_invoice_account_number-id
api-reference/openapi-payments.json GET /invoice_account_number/{id}
# List Manual Holds
Source: https://docs.treasuryprime.com/reference/get_manual_hold
api-reference/openapi-payments.json GET /hold
# Fetch a Manual Hold
Source: https://docs.treasuryprime.com/reference/get_manual_hold-id
api-reference/openapi-payments.json GET /hold/{id}
# List Network Transfers
Source: https://docs.treasuryprime.com/reference/get_network_transfer
api-reference/openapi-payments.json GET /network_transfer
# Fetch a Network Transfer
Source: https://docs.treasuryprime.com/reference/get_network_transfer-id
api-reference/openapi-payments.json GET /network_transfer/{id}
# Fetch a Person
Source: https://docs.treasuryprime.com/reference/get_person-id
api-reference/openapi-account.json GET /person/{id}
# Fetch a Routing Number
Source: https://docs.treasuryprime.com/reference/get_routing-number-routing-number
api-reference/openapi-utilities.json GET /routing_number/{routing_number}
# List Webhooks
Source: https://docs.treasuryprime.com/reference/get_webhook
api-reference/openapi-utilities.json GET /webhook
# Fetch a Webhook
Source: https://docs.treasuryprime.com/reference/get_webhook-id
api-reference/openapi-utilities.json GET /webhook/{id}
# List Webhooks Sent
Source: https://docs.treasuryprime.com/reference/get_webhook_send
api-reference/openapi-utilities.json GET /webhook_send
# List Wire Transfers
Source: https://docs.treasuryprime.com/reference/get_wire
api-reference/openapi-payments.json GET /wire
# Fetch a Wire Transfer
Source: https://docs.treasuryprime.com/reference/get_wire-id
api-reference/openapi-payments.json GET /wire/{id}
# Overview
Source: https://docs.treasuryprime.com/reference/greendot-simulations
Green Dot Cash Load simulations allow developers to simulate the flow of events that would happen when an end user
attempts to deposit cash through the Green Dot network.
The flow of these deposits follows the following steps:
1. The deposit is created, this results in a "barcode number" that the end user would provide to a cashier to scan in
production. In Sandbox though, this barcode number is randomized.
2. The developer simulates an "authorization", this authorizes the deposit for an arbitrary amount of money. Simulating
the end user giving the cashier cash to deposit into their account. When this event is simulated the user's account
is credited and a hold is placed on the credit until the authorization is finalized.
3. The developer can then simulate a "commit" which finalizes the authorization and releases the hold on the funds and
makes those funds available to the end user. Or the developer can simulate a "void" which will reverse the hold and
the credit transactions and mark the deposit as voided.
## Green Dot Simulation Types
| Simulation Type | Explanation |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| greendot.authorize | Simulate a cash load being authorized for an arbitrary amount of money. |
| greendot.void | Simulate a cash load being voided, this can be done when a cash load is in the `pending` or `authorized` status. It will have no affect on deposits in other statuses. |
| greendot.commit | Simulate finalizing a deposit, this will release funds to the end user to be used. The status of the deposit will transition to `available` and then the following business day will be marked as `complete`. |
## Create a Green Dot Authorization simulation
Initiate a `greendot.authorize` simulation event.
```bash bash theme={null}
POST https://api.sandbox.treasuryprime.com/simulation
```
### Green Dot Authorization Request Body
| Parameter | Type | Required? | Description |
| ---------- | ------ | --------- | ---------------------------------- |
| type | string | Required | `greendot.authorize` |
| simulation | object | Required | The simulation request sub-object. |
##### Simulation Sub-Object
| Parameter | Type | Required? | Description |
| ------------ | ------ | --------- | ------------------------------------------------------------------ |
| greendot\_id | string | Required | ID of the cash load object created, must be in a `pending` status. |
| amount | string | Required | Amount of cash to authorize for the cash load. |
##### 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 /greendot/:id` endpoint to confirm that the status of
the cash load has been updated to `authorized`. You should also see transactions for that account and the current
balance of the acount having been increased the amount that you authorized in your simulation.
## Create a Green Dot Void or Commit simulation
Initiate a `greendot.void` or `greendot.commit` simulation event.
```bash bash theme={null}
POST https://api.sandbox.treasuryprime.com/simulation
```
### Green Dot Authorization Request Body
| Parameter | Type | Required? | Description |
| ---------- | ------ | --------- | ------------------------------------ |
| type | string | Required | `greendot.void` or `greendot.commit` |
| simulation | object | Required | The simulation request sub-object. |
##### Simulation Sub-Object
| Parameter | Type | Required? | Description |
| ------------ | ------ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| greendot\_id | string | Required | ID of the cash load object you created. For voiding, the object must be in a `pending` or `authorized` status. For commit, the object must be in an `authorized` status. |
##### Response
No response body is returned. A `202` HTTP status indicates a successful simulation.
# Overview
Source: https://docs.treasuryprime.com/reference/incoming-ach
[ACH](https://en.wikipedia.org/wiki/Automated_Clearing_House) is the predominant network for electronic funds transfer in the United States. Transferring money over ACH is generally cheaper, but slower, compared to other networks. ACH supports both credits (sending money) and debits (receiving money).
Incoming ACH payment instructions do not include the account and routing numbers of the originating account at the external financial institution. This limitation exists because account and routing numbers are not sent to receiving banks in the incoming NACHA files sent through the Federal Reserve.
The `nacha_body` field contains all available details from the incoming ACH instructions.
# Overview
Source: https://docs.treasuryprime.com/reference/incoming-wire
Wires are electronic funds transfers between two accounts at different financial institutions. In contrast to ACH, wires are much faster, but they are also more expensive. Wires are executed immediately and usually settle within a matter of hours. Unlike ACH, wires cannot be reversed once sent.
The Incoming Wire object represents a wire which was sent to a Treasury Prime account.
# Overview
Source: https://docs.treasuryprime.com/reference/invoice-account-number
Treasury Prime can now allow customers to allocate an account number and assign it to an existing ledger account via our /invoice\_account\_number endpoint. Treasury Prime will generate an account number using the prefix of the FBO connected to the provided ledger account ID.
Incoming ACHs and wires received for the invoice account number will be posted to the associated ledger account. These payments will be posted to the ledger account just as if they were a payment to the account number on the ledger account.
The account number for the ACH/wire will continue to be surfaced on the /incoming\_ach and /incoming\_wire endpoints which will allow customers to make the connection to the invoice account number.
Transaction descriptions behave the same regardless of whether an incoming payment posts to the primary account number or an invoice account number.
Additional Key Points about Invoice Account Numbers
* Dashboard Display: Additional account numbers appear in an “Additional Account Numbers” field on the account detail page
* Payment Types: Supports both incoming ACHs (debit/credit) and incoming wires
* Transaction Appearance: Transactions appear like normal payments, with the account number matching the invoice account number in incoming ACH/wire objects
* Account Nature: These are not separate accounts, but rather additional account numbers linked to an existing ledger account
* Bank Controls: Banks can only control whether organizations can create invoice accounts using the invoice\_account\_allowed flag. There are no limits on payment size or number of account numbers
* Lifecycle: Can remain active indefinitely and can be disabled/re-enabled as needed
Invoice Account Number availability varies by bank partner and requires bank approval. Contact your relationship manager to discuss availability and any associated costs.
# Overview
Source: https://docs.treasuryprime.com/reference/manual-hold
Treasury Prime allows fintech clients to place manual holds on accounts, affecting the available balance without impacting the posted balance. Clients can create, release, or expire holds through specific API calls, with expiration rules and notifications for hold expirations included.
Manual Hold availability varies by bank partner and requires bank approval. Contact your relationship manager to discuss availability and any associated costs.
# Overview
Source: https://docs.treasuryprime.com/reference/network-transfer
The following endpoint is currently only available for clients utilizing Treasury Prime's OneKey Banking.
Network transfers facilitate the transfer of funds between two accounts, where the accounts can sit at the same or different banks when you are utilizing Treasury Prime’s OneKey Banking. You must be authorized to access both the source account and the destination account in order for the transfer to be successful.
Network transfers are most similar to book transfers. The main difference between a network transfer and a [book transfer](/reference/book-transfer) is that network transfers allow you to move funds in mostly real time between two accounts at the same or separate banks within your banking network, whereas the accounts in a book transfer must be at the same bank.
To set up network transfers, you may be required to work with Treasury Prime and your bank partners to help configure the necessary reserve and settlement accounts at each partner bank. You may be required to enable additional payment rails to be eligible to activate network transfers. The funds in these reserve accounts are used to support the network transfers system.
# Update an Account
Source: https://docs.treasuryprime.com/reference/patch_account-id
api-reference/openapi-account.json PATCH /account/{id}
# Update a Business
Source: https://docs.treasuryprime.com/reference/patch_business-id
api-reference/openapi-account.json PATCH /business/{id}
# Update a Document
Source: https://docs.treasuryprime.com/reference/patch_document-id
api-reference/openapi-utilities.json PATCH /document/{id}
# Update an Incoming ACH
Source: https://docs.treasuryprime.com/reference/patch_incoming_ach-id
api-reference/openapi-payments.json PATCH /incoming_ach/{id}
# Update an Account Number
Source: https://docs.treasuryprime.com/reference/patch_invoice_account_number-id
api-reference/openapi-payments.json PATCH /invoice_account_number/{id}
# Update a Manual Hold
Source: https://docs.treasuryprime.com/reference/patch_manual_hold-id
api-reference/openapi-payments.json PATCH /hold/{id}
# Update a Network Transfer
Source: https://docs.treasuryprime.com/reference/patch_network_transfer-id
api-reference/openapi-payments.json PATCH /network_transfer/{id}
# Update a Person
Source: https://docs.treasuryprime.com/reference/patch_person-id
api-reference/openapi-account.json PATCH /person/{id}
# Update a Webhoook
Source: https://docs.treasuryprime.com/reference/patch_webhook-id
api-reference/openapi-utilities.json PATCH /webhook/{id}
# Update a Wire Transfer
Source: https://docs.treasuryprime.com/reference/patch_wire-id
api-reference/openapi-payments.json PATCH /wire/{id}
# Overview
Source: https://docs.treasuryprime.com/reference/person
The Person resource represents the individuals associated with the account. These may be beneficial owners of the account or they may be *authorized users* (in the case of card issuance, these people are cardholders who are authorized to use the account but aren't responsible for it).
The beneficial owners of an account are specified when the account is first applied for and opened. Once an account is open, additional authorized users may apply to be added to the account. For more on this, see the [Apply](/reference/apply-overview) API.
# Create an Account Application
Source: https://docs.treasuryprime.com/reference/post_apply_account_application
api-reference/openapi-apply.json POST /apply/account_application
# Create a Document
Source: https://docs.treasuryprime.com/reference/post_document
api-reference/openapi-utilities.json POST /document
# Upload a File
Source: https://docs.treasuryprime.com/reference/post_file
api-reference/openapi-file-upload.json POST /file
# Create Green Dot Cash Load
Source: https://docs.treasuryprime.com/reference/post_greendot
api-reference/openapi-payments.json POST /greendot
# Create an Account Number
Source: https://docs.treasuryprime.com/reference/post_invoice_account_number
api-reference/openapi-payments.json POST /invoice_account_number
# Create a Manual Hold
Source: https://docs.treasuryprime.com/reference/post_manual_hold
api-reference/openapi-payments.json POST /hold
# Create a Network Transfer
Source: https://docs.treasuryprime.com/reference/post_network_transfer
api-reference/openapi-payments.json POST /network_transfer
# Create a v2 Network Transfer
Source: https://docs.treasuryprime.com/reference/post_network_transfer_v2
api-reference/openapi-payments.json POST /v2/network_transfer
# Create a Simulation
Source: https://docs.treasuryprime.com/reference/post_testing-create-a-simulation
api-reference/openapi-testing.json POST /simulation
# Create a Webhook
Source: https://docs.treasuryprime.com/reference/post_webhook
api-reference/openapi-utilities.json POST /webhook
# Create a Wire Transfer
Source: https://docs.treasuryprime.com/reference/post_wire
api-reference/openapi-payments.json POST /wire
# Overview
Source: https://docs.treasuryprime.com/reference/simulation-endpoint
The sandbox provides simulations and special test numbers that will trigger specific responses or resource statuses. You can use these unique sandbox features to test how your integration handles different workflows and webhook notifications. Requests made to the sandbox environment will never hit banking networks, meaning they can't affect your account balances and will never incur costs.
Make sure to use our sandbox URL endpoint to do your testing:
```
Sandbox: https://api.sandbox.treasuryprime.com
Production: https://api.treasuryprime.com
```
When you’re ready to go live with your application, switch the URL endpoint and API keys to the production environment.
## Testing in Sandbox
When testing in sandbox you can simulate typical workflows and edge case scenarios for the following products:
* [ACH Simulations](/reference/ach-simulations)
* [Apply Testing](/reference/account-application-testing)
* [Card Simulations](/reference/card-simulations)
* [FedNow Simulations](/reference/fednow-simulations)
* [Green Dot Cash Load Simulations](/reference/greendot-simulations)
* [Statement Testing](/reference/statement-testing)
* [Wire Simulations](/reference/wire-simulations)
You can do your API testing in command line or using our Postman Collection as described below. Additionally, you can review account and transaction activities directly from the [Console](https://app.treasuryprime.com).
Be sure to check for internal firewalls that could reject simulated inbound requests from Treasury Prime, such as card simulations. Treasury Prime can supply a list of IPs to whitelist if needed.
## Funds Settlement in Sandbox
Not all types of payments will settle funds when testing the API in Sandbox. Endpoints including [`/ach`](/reference/ach), [`/wire`](/reference/wire), and [`/apply/deposit`](/reference/deposit) may flow through to a final status as though it settled funds in Production, but it is expected that account balances in Sandbox will remain unaltered.
An exception to this rule are [Book Transfers](/reference/book-transfer). Payments made using the [`/book`](/reference/post_book) endpoint will transfer funds in Sandbox.
## Postman Collection
Test our API in Sandbox immediately, using [Treasury Prime Postman Collection](https://www.postman.com/treasuryprime/workspace/treasury-prime-public-workspace/collection/16971508-7785a4b3-8e10-4c85-ba87-18c979afa06c?action=share\&creator=15738085). Postman is a visual editing tool for building and testing API requests without configuring a full development environment.
To get started, open the [Treasury Prime API Collection](https://www.postman.com/treasuryprime/workspace/treasury-prime-public-workspace/collection/16971508-7785a4b3-8e10-4c85-ba87-18c979afa06c?action=share\&creator=15738085) in Postman. Then you set your Postman environment settings with your `API_KEY_ID` and `API_SECRET_KEY` before you can test the different endpoints available in the Treasury Prime Postman Collection.
# Overview
Source: https://docs.treasuryprime.com/reference/statement-testing
The [`/statement`](/reference/post_account_statement) endpoint can be used to generate test statements. Before any statements can be generated, you'll need to configure one or more [Statement Configs](/reference/get_statement_config).
When testing in the Sandbox environment, the transactions in the test statements will be examples only, and not correspond to sandbox activity for that account.
## Retrieve a Test Statement URL
To simulate retrieving a monthly account [Statement](/reference/get_account_statement) URL, pass a valid `account_id` along with any current or past date as the `date` value. The response will contain a URL to a test statement PDF.
##### Example request to retrieve statement URL
```bash bash theme={null}
curl -X GET -u $API_KEY_ID:$API_SECRET_KEY 'https://api.sandbox.treasuryprime.com/account/acct_1029384755/statement?date=2022-07'
```
##### Example response containing statement URL
```bash bash theme={null}
{
"id": "acct_1029384755",
"type": "monthly",
"date": "2022-07",
"url": "https://api.sandbox.treasuryprime.com/account/acct_1029384755/statement/file_abc1234567890"
}
```
## Simulate an Account Statement Error
To trigger an "error" status, pass an invalid `account_id` or a `date` in the future.
##### Example request returning error status
```bash bash theme={null}
curl -X GET -u $API_KEY_ID:$API_SECRET_KEY 'https://api.sandbox.treasuryprime.com/account/acct_1029384755/statement?date=2322-01'
```
##### Example error response
```bash bash theme={null}
{
"error":"Statement with date 2322-01 not found."
}
```
# Overview
Source: https://docs.treasuryprime.com/reference/webhook
To receive webhook notifications, you must first register the URL where the webhook should be sent and the triggering event. When the event occurs, the API will send an HTTP request containing the notification to the specified URL. If a valid HTTP response is not received, the API will retry up to 15 times on an exponential backoff schedule. A `200` or `202` response code is expected. A webhook response should only be determined by your servers ability to receive the incoming notification. Any backend processing or handling of the actual event should not factor into the returned HTTP response.
All changes to API resources will generate webhooks. Your application may choose to react to the subset of events it finds relevant. For example, if your application creates ACH transfers, it may choose to react to webhook events notifying that the status of an ACH transfer was changed.
Webhook objects have a `status`: if they are `enabled`, then a notification will be issued to the URL. Any other status (`error`, `disabled`) will not issue a notification. To re-enable a webhook that is in `error` or `disabled` status, update the `status` field to `enabled`.
## Webhook Ordering
We cannot guarantee that webhooks will be received in order. In practice, events that have a significant time gap between them will be received in order. However, when two events are only a few milliseconds apart, the one sent first may arrive second.
In a production environment, you should encounter this less frequently, but it is still possible to receive an out-of-order webhook. If you query the API using the object ID provided in the webhook payload, you will always receive the latest information.
## Webhook Payloads
```bash bash theme={null}
POST https://example.application.com/notify
{
"event": "ach.update",
"op": "update",
"id": "ach_01123456789",
"url": "https://api.treasuryprime.com/ach/ach_01123456789"
}
```
## Validating Webhooks
Validating that webhooks originate from Treasury Prime ensures that a webhook notification is authentic. If a webhook object has been created with the `basic_user` and `basic_secret` fields, notifications from Treasury Prime will include an additional `Authorization` header that is the base64-encoded value of `{basic_user}:{basic_secret}`. When the base64 header matches the value your application expects, the request is authentic.
## Webhooks in `error` status
If there are too many bad responses when sending notifications to a webhook's URL within a short time, the webhook will be put into status `error`. No new webhooks will be issued on webhooks in `error` status. This happens only for a high volume of failed responses, and is done to prevent other webhook notifications from slowing down.
A webhook can be changed back to `enabled` status by updating the `status` field to `enabled`. This will reset the webhook and new webhooks will now be issued.
## Smart Webhook Retries
Organizations can enable an automatic retry logic for webhook messages that receive non-200 HTTP responses. If a webhook message fails (receives a non-200 response), our system will automatically retry sending the message.
* Benefits
* This ensures that any missed notifications are automatically retried
* How to Enable
* For this to be enabled at a Fintech, your corresponding Bank will need to provide approval. Please reach out to your Relationship Manager or Treasury Prime Support
## Webhook Webhooks
You can register a webhook to receive notifications about updates to other webhooks. To do so, subscribe to the `webhook.update` event:
```json theme={null}
{
"event": "webhook.update",
"url": "https://example.application.com/notify"
}
```
Once registered, your endpoint will receive notifications in the following format:
```json theme={null}
{
"event": "webhook.update",
"op": "update",
"id": "webhook_01123456789",
"url": "https://example.application.com/notify"
}
```
This is particularly useful for monitoring when a webhook enters an `error` or `disabled` status.
## Webhook Send History
You can inspect the history of individual webhook send attempts using the [List Webhooks Sent](/reference/get_webhook_send) endpoint. Each `webhook_send` record represents a single attempt to deliver a notification to the URL registered on a webhook, and captures whether that attempt was `sent`, `skipped`, or resulted in an `error`.
Use this endpoint to:
* Confirm that a notification was delivered for a specific object (for example, an ACH transfer or card).
* Investigate why a webhook is in `error` status by reviewing the error message and attempt number on recent send attempts.
* Determine whether a failed attempt will be retried (`will_retry`) under [Smart Webhook Retries](#smart-webhook-retries).
Send attempts can be filtered by `object_id` (the resource that triggered the notification), `webhook_id` (the registered webhook), `status`, and a `from_date`/`to_date` range. Results are paginated using `page_cursor` and `page_size` (default `100`).
```bash bash theme={null}
# List the most recent send attempts for a specific webhook
curl "https://api.treasuryprime.com/webhook_send?webhook_id=webhook_01123456789&status=error" \
-u "$API_KEY_ID:$API_KEY_SECRET"
```
Each returned record includes:
* `id` — unique identifier for the send attempt.
* `webhook_id` — the webhook that produced this attempt.
* `object_id` — the resource whose change triggered the notification.
* `operation` — the database operation (for example, `update`) that produced the event.
* `status` — one of `sent`, `skipped`, or `error`.
* `attempt_number` — how many prior attempts were made for this event.
* `will_retry` — whether another retry is scheduled.
* `error` — the failure reason when `status` is `error`.
# Event Types
Source: https://docs.treasuryprime.com/reference/webhook-events
Create a [Webhook](/reference/webhook) by subscribing to these event types.
### Account Opening Webhooks
| Endpoint | Events |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| [Account Application](/reference/account-application) | `apply.account-application.create` `apply.account-application.update` |
| [Additional Person Application](/reference/additional-person) | `apply.additional-person-application.create` `apply.additional-person-application.update` |
| Additional Authorized User Application | `apply.authorized-user-application.create` `apply.authorized-user-application.update` |
| [Business Application](/reference/business-application) | `apply.business-application.create` `apply.business-application.update` |
| [Initial Deposit](/reference/deposit) | `apply.deposit.create` |
| [KYC Product](/reference/kyc-product) | `apply.kyc-product.create` `apply.kyc-product.update` |
| [KYC](/reference/kyc) | `apply.kyc.create` `apply.kyc.update` |
| [Person Application](/reference/person-application) | `apply.person-application.create` `apply.person-application.update` |
### Account Webhooks
| Endpoint | Events |
| ---------------------------------------------------------- | ------------------------------------------------------------------ |
| [Account](/reference/account) | `account.create` `account.update` |
| [Business](/reference/business) | `business.update` |
| [Person](/reference/person) | `person.update` |
| [Reserve Account](/reference/reserve-account) | `reserve.create` `reserve.update` `reserve.delete` |
| [Statement Configuration](/reference/get_statement_config) | `statement_config.create` `statement_config.update` |
| [Transaction](/reference/get_transaction) | `hold_expiration.create` `transaction.create` `transaction.update` |
### Card Webhooks
| Endpoint | Events |
| ------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| [Card](/reference/card) | `card.create` `card.update` |
| [Card Auth Loop](/reference/card-auth-loop-endpoint) | `card_auth_loop_endpoint.create` `card_auth_loop_endpoint.update` `card_auth_loop_endpoint.delete` |
| [Card Event](/reference/card-event) | `card_event.create` `card_event.update` |
| [Card Product](/reference/card-product) | `cardproduct.create` `cardproduct.update` |
| [Digital Wallet Token](/reference/digital-wallet-token) | `digital_wallet_token.create` `digital_wallet_token.update` |
### Payment Webhooks
| Endpoint | Events |
| ----------------------------------------------------------- | --------------------------------------------------------------- |
| [ACH](/reference/ach) | `ach.create` `ach.update` |
| [Book](/reference/book-transfer) | `book.create` `book.update` |
| [Check Deposit](/reference/check-deposit) | `check_deposit.create` `check_deposit.update` |
| [Counterparty](/reference/get_counterparty) | `counterparty.create` `counterparty.update` |
| [FedNow](/reference/fednow) | `fednow.create` `fednow.update` |
| [Incoming ACH](/reference/incoming-ach) | `incoming_ach.create` `incoming_ach.update` |
| [Incoming Wire](/reference/incoming-wire) | `incoming_wire.create` `incoming_wire.update` |
| [Invoice Account Number](/reference/invoice-account-number) | `invoice_account_number.create` `invoice_account_number.update` |
| [Issued Check](/reference/check-issuing) | `check.create` `check.update` |
| [Manual Hold](/reference/manual-hold) | `manual_hold.create` `manual_hold.update` |
| [Network Transfer](/reference/network-transfer) | `network_transfer.create` `network_transfer.update` |
| [Prime Cash](/reference/greendot) | `greendot.create` `greendot.update` |
| [Wire](/reference/wire) | `wire.create` `wire.update` |
### Utility Webhooks
| Endpoint | Events |
| ----------------------------------- | -------------------------------------------------- |
| [Document](/reference/get_document) | `document.create` `document.update` |
| [File](/reference/get_file-id) | `file.create` |
| [Webhook](/reference/webhook) | `webhook.create` `webhook.update` `webhook.delete` |
# Overview
Source: https://docs.treasuryprime.com/reference/wire
Wires are electronic funds transfers between two accounts at different financial institutions. In contrast to ACH, wires are much faster, but they are also more expensive. Wires are executed immediately and usually settle within a matter of hours. Unlike ACH, wires cannot be reversed once sent.
## Workflow
Once you successfully submit a new wire transfer, the sending account will be queried for available balance. If there are sufficient funds, the wire will be sent to the bank for settlement. You can track the progress of a wire by checking the `status` attribute on the Wire Transfer object.
You must have authorized access to the source account for the transfer to be successful.
The possible `status` values are:
* `pending`
Initial status after object creation.
* `canceled`
The transfer was canceled and was never executed.
* `processing`
The transfer is being processed in preparation to be sent. You may no longer cancel a transfer once it has entered this state.
* `sent`
The transfer has been executed and sent to the bank for settlement.
* `void`
The wire was marked as void by the bank.
* `error`
An error occurred that prevented the wire from being sent.
Depending on your bank, the parameters returned may vary. Namely, IMAD and OMAD may not be present.
# Overview
Source: https://docs.treasuryprime.com/reference/wire-simulations
By default, all Wires created in the sandbox environment are moved through the normal [Wire workflow](/reference/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](#wire-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
| 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. |
## 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:
| 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. |
## Create a Wire Sent or Voided Simulation
Initiate either a `wire.processing_sent` or a `wire.processing_voided` simulation.
```bash bash theme={null}
POST https://api.sandbox.treasuryprime.com/simulation
```
### Wire Sent or Voided Request Body
| Parameter | Type | Required? | Description |
| ---------- | ------ | --------- | ---------------------------------- |
| type | string | Required | The wire simulation type. |
| simulation | object | Required | The simulation request sub-object. |
##### Simulation Sub-Object
| Parameter | Type | Required? | Description |
| --------- | ------ | --------- | --------------------------------------------------------------- |
| wire\_id | string | Required | ID of the wire to use as the source for simulated transactions. |
##### Example Request
```bash bash theme={null}
$ curl -u $API_KEY_ID:$API_SECRET_KEY https://api.sandbox.treasuryprime.com/simulation \
-H 'Content-Type: application/json' \
-d '{
"type": "wire.processing_sent",
"simulation": {
"wire_id": "wire_123456",
}
}'
```
##### Success Response
There will be no response body. The response code will be a `202 - accepted`.
##### Error Response
```bash bash theme={null}
{
"error": "Invalid simulation request or simulation not implemented"
}
```
### 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](/reference/wire) for example wire requests. The following calls outline simulating a wire sent simulation.
```bash bash theme={null}
$ curl -u $API_KEY_ID:$API_SECRET_KEY https://api.sandbox.treasuryprime.com/wire \
-H 'Content-Type: application/json' \
-d '{
"account_id": "acct_1234567890",
"amount": "10300.00",
"counterparty_id": "cp_0987654321",
"userdata": {
"manual": true
}
}'
```
```bash bash theme={null}
$ curl -u $API_KEY_ID:$API_SECRET_KEY https://api.sandbox.treasuryprime.com/simulation \
-H 'Content-Type: application/json' \
-d '{
"type": "wire.processing_sent",
"simulation": {
"wire_id": "wire_104",
}
}'
```
##### 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](/reference/incoming-wire#the-incoming-wire-transfer-object). You can then use the [/incoming wire](/reference/incoming-wire) endpoint to access this object.
```bash bash theme={null}
POST https://api.sandbox.treasuryprime.com/simulation
```
### Simulation Request Body
| 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. |
##### Originator Sub-object
| 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). |
##### Wire Bank Address Sub-object
| 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). |
##### Wire Bank Data Sub-object
| 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](https://en.wikipedia.org/wiki/Routing_transit_number) associated with this bank. |
##### Example Request
The following call outlines simulating an incoming wire.
```bash bash theme={null}
$ curl -u $API_KEY_ID:$API_SECRET_KEY https://api.sandbox.treasuryprime.com/simulation \
-H 'Content-Type: application/json' \
-d '{
"type": "wire.incoming_wire",
"simulation": {
"account_id": "acct_123456",
"originator_to_beneficiary_info": "DEPOSIT",
"amount": "100.00",
"originator": {
"name": "ORIGINATOR LLC",
"address": [
"22 Main St",
"Town GA 012345-7500"
],
"bank_data": {
"account_number": "123456789",
"account_type": "checking",
"address": [],
"bank_name": "",
"routing_number": "123456789"
}
}
}
}'
```
##### Success Response
There will be no response body. The response code will be a `202 - Accepted`.
##### Error Response
```bash bash theme={null}
{
"error": "Invalid simulation request or simulation not implemented"
}
```
##### Verifying a Successful Simulation
To ensure that the simulation was run successfully, call the [`GET /wire/incoming_wire`](/reference/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`.
# Wire Testing
Source: https://docs.treasuryprime.com/reference/wire-testing
The [`/wire`](/reference/wire) can be used in the Sandbox environment to send test transactions. [Wire transfers](/reference/wire) submitted for amounts up to \$50,000 will move through the normal [wire workflow](/reference/wire#workflow), eventually ending with status `sent`. You can simulate other statuses that may arise in Production use cases by manipulating the `account_number` used in the API call.
## Trigger an Error Status
To trigger an `error` status for a [Wire](/reference/wire) object, create a wire with a counterparty whose `account_number` begins with a 9. These wires will be in state `pending` when you submit them, but later they will be assigned an `error` status and the `error` field will be set.
##### Example Counterparty Object that will result in a simulated wire error
```bash bash theme={null}
curl -u $API_KEY_ID:$API_SECRET_KEY https://api.sandbox.treasuryprime.com/counterparty \
-H 'Content-Type: application/json' \
-d '{
"name_on_account": "Paul Bunyun",
"wire": {
"account_number": "91234567",
"account_type": "checking",
"routing_number": "021001208",
"address_on_account": {
"street_line_1": "888 Rainy Lane",
"street_line_2": null,
"city": "Seattle",
"state": "WA",
"postal_code": "98102"
},
"bank_address": {
"street_line_1": "123 Cherry Street",
"street_line_2": null,
"city": "Duluth",
"state": "MN",
"postal_code": "55812"
},
"bank_name": "Bank of the Lakes"
}
}'
```
# Account Application Testing
Source: https://docs.treasuryprime.com/reference/account-application-testing
# Account Application Testing
In the Sandbox environment, you can use the following details to simulate application statuses that may occur in the course of Production use.
## Business Application Testing
To manually trigger a status for business account applications, the first digit of the `tin` field of **each** [Person Application object](/reference/person-application) **and** the `tin` property of the [Business Application object](/reference/business-application) submitted with the application must be set to one of the following values **before** submitting the [Account Application](/reference/account-application). Note that all of the `tin` properties must be set to the same value.
An `x` indicates any digit.
| Status | Test TIN |
| ------------- | ------------ |
| Approved | `1x-xxxxxxx` |
| Manual Review | `2x-xxxxxxx` |
| Processing | `3x-xxxxxxx` |
| Rejected | `4x-xxxxxxx` |
| Submitted | `5x-xxxxxxx` |
## Personal Application Testing
To manually trigger a status for a personal account application, the first digit of the `tin` property of **each** [Person Application object](/reference/person-application) submitted with the application must be set to one of the following values **before** submitting the [Account Application](/reference/account-application). Note that all of the `tin` properties must be set to the same value.
An `x` indicates any digit.
| Status | Test TIN |
| ------------- | ------------- |
| Approved | `1xx-xx-xxxx` |
| Manual Review | `2xx-xx-xxxx` |
| Processing | `3xx-xx-xxxx` |
| Rejected | `4xx-xx-xxxx` |
| Submitted | `5xx-xx-xxxx` |
# Overview
Source: https://docs.treasuryprime.com/reference/ach
[ACH](https://en.wikipedia.org/wiki/Automated_Clearing_House) is the predominant network for electronic funds transfer in the United States. Transferring money over ACH is generally cheaper, but slower, compared to other networks. ACH supports both credits (sending money) and debits (receiving money).
## Workflow
The protocol that underlies the ACH network is batch-oriented and does not provide *success* responses (only *error* responses). As a result, ACH transfers follow a particular workflow as they are processed by the network. You can track a transfer's progress by checking the `status` attribute on the ACH object.
The possible `status` values are:
* `pending`
Initial status after object creation. Pending transfers are queued for processing, which happens periodically throughout the day. As long as the transfer is `pending` you may still cancel it.
* `canceled`
The transfer was canceled and was never processed.
* `processing`
The transfer is being processed in preparation to be sent. You may no longer cancel a transfer once it has entered this state.
* `error`
The transfer encountered an error during processing. The reasons a transfer might be set to error include non-sufficient funds, suspected fraud, or failed validation.
* `sent`
The transfer was processed and sent out to the ACH network for clearing and settlement. Because the ACH protocol does not provide for a *success* response, successful transfers will remain in the `sent` state in perpetuity.
* `returned`
The transfer was processed and sent, but the network or receiving bank could not complete the transfer successfully. See the [ACH Returns guide](/docs/ach-returns) for more details.
## SEC Codes
The ACH network adheres to different processing rules depending on the type of transfer you're sending. For processing purposes, a transfer's type is determined by its `sec_code`.
This API supports the following values of `sec_code`:
* `ccd`
Used for commercial payments. If the transfer is between two corporate entities, usually you'll use `ccd`.
* `cie`
Used for transferring funds from one commercial entity to another at a consumer's request. Typically used for bill pay.
* `ppd`
Used for consumer payments. If one of the parties involved in the transfer is a personal bank account, usually the transfer will be `ppd`.
* `tel`
Used for consumer payments to a commercial entity when the consumer’s authorization for a transfer of funds is received orally via the telephone.
* `web`
If you're initiating a consumer payment, and you obtain authorization to make the payment via the Internet, then you'd likely use `web`.
It is necessary to use the correct SEC codes for your particular ACH payment use cases. Using improper codes can cause financial and regulatory consequences. When in doubt, talk with your bank partner(s) to determine the appropriate SEC code to use. Your Treasury Prime Customer Success Manager can help ensure that you are technically able to initiate ACH payments using the necessary SEC codes for your business.
## Virtual Ledger ACH Holds
### Credit ACH Holds
When enabled this setting ensures that a new credit ACH can never be created when said credit may lead to insufficient funds in the account to fulfill the payment.
ACH credit holds alter the ACH processing flow to create a `hold` transaction whenever a credit ACH is created. These `hold` transactions operate in the same manner as a card hold, lowering the current available balance on the corresponding account. A `hold_release` transaction is generated once the credit ACH has completed processing. The `hold`, `hold_release` and `withdrawal` transactions are tied together by a common `trace_id`. For ACH credit holds the value of the `trace_id` is the `ach_id` of the corresponding ACH.
### Debit ACH Settlement Holds
When enabled this setting adjusts the debit ACH processing flow to credit the ledger account as soon as the ACH is moved to a `sent` status. A hold is then immediately created against the account for the value of the ACH. These funds will be released and the ACH will be considered settled at the `scheduled_settlement` time as provided in the ACH response.
# Notices of Change (NOCs)
A Notice of Change (NOC) is a notification from the receiving bank indicating that information on an originated ACH needs to be corrected. The original transaction still processes — the NOC is a signal to update your records for future transactions.
When Treasury Prime receives a NOC for an originated ACH, the following fields are populated on the ACH object:
| Field | Type | Description |
| :------------------- | :----- | :---------------------------------------------------------------------------------------------------------------- |
| `noc_change_code` | string | If a notice of change has been received for this ACH, this will contain the latest change code for this entry. |
| `noc_corrected_data` | string | If a notice of change has been received for this ACH, this will contain the latest corrected data for this entry. |
## Important: Only the Latest NOC is displayed
If an ACH receives more than one NOC, the `noc_change_code` and `noc_corrected_data` fields are **overwritten** with the most recent values. Previous NOC data is not retained on the ACH object.
## Common Change Codes
| Code | Description |
| :--- | :---------------------------------------------------------- |
| C01 | Incorrect Account Number |
| C02 | Incorrect Routing Number |
| C03 | Incorrect Routing Number & Account Number |
| C04 | Incorrect Account Name |
| C05 | Incorrect Transaction Code (e.g., checking vs. savings) |
| C06 | Incorrect Account Number & Transaction Code |
| C07 | Incorrect Routing Number, Account Number & Transaction Code |
## Webhooks
When a NOC is received, the `ach.update` webhook fires. Subscribe to this event to be notified of changes and take corrective action.
## Recommended Handling
1. Subscribe to the `ach.update` webhook.
2. When an update is received, check `noc_change_code` and `noc_corrected_data`.
3. Update the corresponding counterparty record with the corrected information.
4. Per NACHA rules, corrections must be applied within **6 banking days** of receipt or before initiating another ACH to the same account — whichever is later.
> **Note:** Do not re-send the original transaction. A NOC means the payment was already processed successfully.
# Overview
Source: https://docs.treasuryprime.com/reference/book-transfer
A book transfer is an electronic funds transfer between two accounts at the same bank. You must be authorized to access both the source account and the destination account for the transfer to be successful. Book transfers are both the fastest and cheapest type of transfer but are restricted only to accounts held at the same bank.
# Overview
Source: https://docs.treasuryprime.com/reference/business-application
This represents a business or organization making an application for a bank account.
## International/Foreign Entities
For International/Foreign Entities there are two optional fields, `identification_number` & `identification_number_type` that can be used to reflect EINS or other Tax IDs. Where an international EIN or any other ID is leveraged, it can be populated here. To the extent an account holder has a valid SSN, use the tin field. To the extent a foreign ID is leveraged, use the fields referenced above.
If you are partnered with Alloy on Unit 21, the data in these fields will be submitted to those partners. Please note that while Treasury Prime will submit this data to these third-parties, we will **NOT** validate the information in this field.
Please note that there may be tax implications for creating foreign entities without a US TIN. Treasury Prime is not responsible for assessing or identifying any such tax treatment.
# Overview
Source: https://docs.treasuryprime.com/reference/deposit
This represents the initial funding deposit for the new account. After an account application is approved by the bank and the new account is opened, then the payment instructions encoded in this object will be executed and the proceeds will be deposited into the new account. Deposits attached to rejected account applications will simply be ignored. We currently support funding the initial deposit via ACH.
# Overview
Source: https://docs.treasuryprime.com/reference/fednow
FedNow is the Federal Reserve's instant payment service that enables financial institutions to provide safe and efficient instant payment services.
We support sending and receiving instant payments through the Federal Reserve's FedNow Service at select banks, which enables 24/7/365 real-time gross settlement.
Refer to our [FedNow Guide](/docs/fednow) for detailed instructions on integrating with the FedNow endpoint.
FedNow availability varies by bank partner and requires bank approval. Contact your relationship manager to discuss availability and any associated costs.
# List ACHs
Source: https://docs.treasuryprime.com/reference/get_ach
api-reference/openapi-payments.json GET /ach
# Fetch an ACH
Source: https://docs.treasuryprime.com/reference/get_ach-id
api-reference/openapi-payments.json GET /ach/{id}
# Fetch an Additional Person Application
Source: https://docs.treasuryprime.com/reference/get_apply_additional_person_application-id
api-reference/openapi-apply.json GET /apply/additional_person_application/{id}
# List Business Applications
Source: https://docs.treasuryprime.com/reference/get_apply_business_application
api-reference/openapi-apply.json GET /apply/business_application
# Fetch a Business Application
Source: https://docs.treasuryprime.com/reference/get_apply_business_application-id
api-reference/openapi-apply.json GET /apply/business_application/{id}
# List Deposits
Source: https://docs.treasuryprime.com/reference/get_apply_deposit
api-reference/openapi-apply.json GET /apply/deposit
# Fetch a Deposit
Source: https://docs.treasuryprime.com/reference/get_apply_deposit-id
api-reference/openapi-apply.json GET /apply/deposit/{id}
# List KYC Evaluations
Source: https://docs.treasuryprime.com/reference/get_apply_kyc
api-reference/openapi-apply.json GET /apply/kyc
# Fetch a KYC Evaluation
Source: https://docs.treasuryprime.com/reference/get_apply_kyc-id
api-reference/openapi-apply.json GET /apply/kyc/{id}
# List KYC Products
Source: https://docs.treasuryprime.com/reference/get_apply_kyc_product
api-reference/openapi-apply.json GET /apply/kyc_product
# Fetch a KYC Product
Source: https://docs.treasuryprime.com/reference/get_apply_kyc_product-id
api-reference/openapi-apply.json GET /apply/kyc_product/{id}
# List Person Applications
Source: https://docs.treasuryprime.com/reference/get_apply_person_application
api-reference/openapi-apply.json GET /apply/person_application
# Fetch a Person Application
Source: https://docs.treasuryprime.com/reference/get_apply_person_application-id
api-reference/openapi-apply.json GET /apply/person_application/{id}
# List Book Transfers
Source: https://docs.treasuryprime.com/reference/get_book
api-reference/openapi-payments.json GET /book
# Fetch a Book Transfer
Source: https://docs.treasuryprime.com/reference/get_book-id
api-reference/openapi-payments.json GET /book/{id}
# List Counterparties
Source: https://docs.treasuryprime.com/reference/get_counterparty
api-reference/openapi-payments.json GET /counterparty
# Fetch a Counterparty
Source: https://docs.treasuryprime.com/reference/get_counterparty-id
api-reference/openapi-payments.json GET /counterparty/{id}
# List Documents
Source: https://docs.treasuryprime.com/reference/get_document
api-reference/openapi-utilities.json GET /document
# Fetch a Document
Source: https://docs.treasuryprime.com/reference/get_document-id
api-reference/openapi-utilities.json GET /document/{id}
# List FedNow Payments
Source: https://docs.treasuryprime.com/reference/get_fednow
api-reference/openapi-payments.json GET /fednow
# Fetch a FedNow Payment
Source: https://docs.treasuryprime.com/reference/get_fednow-id
api-reference/openapi-payments.json GET /fednow/{id}
# Check External FI FedNow Status
Source: https://docs.treasuryprime.com/reference/get_fednow_routing_number
api-reference/openapi-payments.json GET /fednow/routing_number/{routing_number}
# Fetch a File
Source: https://docs.treasuryprime.com/reference/get_file-id
api-reference/openapi-utilities.json GET /file/{id}
# Download a File
Source: https://docs.treasuryprime.com/reference/get_file-id-content
api-reference/openapi-utilities.json GET /file/{id}/content
# Fetch a Routing Number
Source: https://docs.treasuryprime.com/reference/get_routing-number-routing-number
api-reference/openapi-utilities.json GET /routing_number/{routing_number}
# List Webhooks
Source: https://docs.treasuryprime.com/reference/get_webhook
api-reference/openapi-utilities.json GET /webhook
# Fetch a Webhook
Source: https://docs.treasuryprime.com/reference/get_webhook-id
api-reference/openapi-utilities.json GET /webhook/{id}
# List Wire Transfers
Source: https://docs.treasuryprime.com/reference/get_wire
api-reference/openapi-payments.json GET /wire
# Fetch a Wire Transfer
Source: https://docs.treasuryprime.com/reference/get_wire-id
api-reference/openapi-payments.json GET /wire/{id}
# Overview
Source: https://docs.treasuryprime.com/reference/kyc
This endpoint can be used to run KYC on an entity outside of the standard [account opening](/reference/apply-overview) workflow and retrieve the details for any existing KYC evaluations. This is useful when an individual or business requires a KYC evaluation for a purpose other than opening a new account.
This KYC endpoint is currently only available to partnerships at select banks. Contact your account manager to confirm its availability to your organization.
## Submit a Third-Party KYC Provider's Evaluation
This allows submitting a KYC evaluation from a third-party KYC provider that Treasury Prime does not have a direct integration with for a person or business application.
In order to leverage the third-party KYC feature, you need to obtain approval from your KYC provider to share results with Treasury Prime. Treasury Prime assumes that all fintechs leveraging this feature have obtained approval from their KYC provider.
To the extent you are leveraging data from an external KYC provider, the responsibility is between you, the fintech customer, and your bank partner to ensure all relevant KYC workflows, data sources, and overall validation framework have been approved by the bank partner.
**For BYO KYC Users:** When submitting third-party KYC results, use the generic `provider`, `provider_full`, and `provider_result` fields in your request. While the response schema includes provider-specific fields (such as `alloy`, `middesk`, etc.) for Treasury Prime's direct integrations, these will be `null` for third-party providers. Your KYC data will be stored in the generic `provider_*` fields.
Third-party KYC evaluation submission is currently only available to certain organizations, conditional on approval of their bank partner. Contact your account manager learn more.
# Overview
Source: https://docs.treasuryprime.com/reference/kyc-product
KYC products determine the specific type of KYC process to be conducted, including the KYC partner, required credentials, and whether it pertains to an individual or a business. A unique KYC product must be configured for each different KYC evaluation workflow.
# Update an ACH
Source: https://docs.treasuryprime.com/reference/patch_ach-id
api-reference/openapi-payments.json PATCH /ach/{id}
# Update a Business Application
Source: https://docs.treasuryprime.com/reference/patch_apply_business_application-id
api-reference/openapi-apply.json PATCH /apply/business_application/{id}
# Update a Book Transfer
Source: https://docs.treasuryprime.com/reference/patch_book-id
api-reference/openapi-payments.json PATCH /book/{id}
# Update a Counterparty
Source: https://docs.treasuryprime.com/reference/patch_counterparty-id
api-reference/openapi-payments.json PATCH /counterparty/{id}
# Update a Document
Source: https://docs.treasuryprime.com/reference/patch_document-id
api-reference/openapi-utilities.json PATCH /document/{id}
# Update a Webhoook
Source: https://docs.treasuryprime.com/reference/patch_webhook-id
api-reference/openapi-utilities.json PATCH /webhook/{id}
# Update a Wire Transfer
Source: https://docs.treasuryprime.com/reference/patch_wire-id
api-reference/openapi-payments.json PATCH /wire/{id}
# Overview
Source: https://docs.treasuryprime.com/reference/person-application
This represents a (natural) person associated with an application for a bank account. For security, we do not return the `tin` field for Person Application responses.
If you intend to open an account with joint account holders, please make sure to create a separate Person Application for each person before creating an [account application](/reference/account-application)
### Minimum age requirements
Treasury Prime validates the `date_of_birth` field to ensure applicants meet the minimum age requirement. The minimum age is configurable per organization through the `apply_account_min_age` setting. If the date of birth indicates the person is younger than the configured minimum age, the Person Application will be rejected with an error message indicating the required minimum age.
Contact [Treasury Prime support](mailto:help@treasuryprime.com) if you need to adjust the minimum age requirement for your organization.
### Device Fingerprints
In order to collect a device profile, implement [Iovation](https://help.alloy.com/hc/en-us/articles/4405646102043-iovation-Integration-Device-Data-Aggregation) into your application. This SDK returns a “blackbox token” based on the customer's device. Pass the token via “[bankdata](https://docs.treasuryprime.com/reference/post_apply-person-application)” to our apply endpoint in the `iovation_token` key for this information to propagate to Alloy.
Example:
```
{"bankdata": {"iovation_token": "asdfasdfasdf"}}
```
### International/Foreign Entities
For International/Foreign Entities there are two optional fields, `identification_number` & `identification_number_type` that can be used to reflect EINS or other Tax IDs. Where an international EIN or any other ID is leveraged, it can be populated here. To the extent an account holder has a valid SSN, use the tin field. To the extent a foreign ID is leveraged, use the fields referenced above.
If you are partnered with Alloy on Unit 21, the data in these fields will be submitted to those partners. Please note that while Treasury Prime will submit this data to these third parties, we will **NOT** validate the information in this field.
Please note that there may be tax implications for creating foreign entities without a US TIN. Treasury Prime is not responsible for assessing or identifying any such tax treatment.
# Create an ACH
Source: https://docs.treasuryprime.com/reference/post_ach
api-reference/openapi-payments.json POST /ach
# Create an Additional Person Application
Source: https://docs.treasuryprime.com/reference/post_apply_additional_person_application
api-reference/openapi-apply.json POST /apply/additional_person_application
# Create a Business Application
Source: https://docs.treasuryprime.com/reference/post_apply_business_application
api-reference/openapi-apply.json POST /apply/business_application
# Create a Deposit
Source: https://docs.treasuryprime.com/reference/post_apply_deposit
api-reference/openapi-apply.json POST /apply/deposit
# Create a KYC Evaluation
Source: https://docs.treasuryprime.com/reference/post_apply_kyc
api-reference/openapi-apply.json POST /apply/kyc
# Create a Person Application
Source: https://docs.treasuryprime.com/reference/post_apply_person_application
api-reference/openapi-apply.json POST /apply/person_application
# Create a Book Transfer
Source: https://docs.treasuryprime.com/reference/post_book
api-reference/openapi-payments.json POST /book
# Create a Counterparty
Source: https://docs.treasuryprime.com/reference/post_counterparty
api-reference/openapi-payments.json POST /counterparty
# Create a Document
Source: https://docs.treasuryprime.com/reference/post_document
api-reference/openapi-utilities.json POST /document
# Create a FedNow Payment
Source: https://docs.treasuryprime.com/reference/post_fednow
api-reference/openapi-payments.json POST /fednow
# Create a Webhook
Source: https://docs.treasuryprime.com/reference/post_webhook
api-reference/openapi-utilities.json POST /webhook
# Create a Wire Transfer
Source: https://docs.treasuryprime.com/reference/post_wire
api-reference/openapi-payments.json POST /wire
# Overview
Source: https://docs.treasuryprime.com/reference/webhook
To receive webhook notifications, you must first register the URL where the webhook should be sent and the triggering event. When the event occurs, the API will send an HTTP request containing the notification to the specified URL. If a valid HTTP response is not received, the API will retry up to 15 times on an exponential backoff schedule. A `200` or `202` response code is expected. A webhook response should only be determined by your servers ability to receive the incoming notification. Any backend processing or handling of the actual event should not factor into the returned HTTP response.
All changes to API resources will generate webhooks. Your application may choose to react to the subset of events it finds relevant. For example, if your application creates ACH transfers, it may choose to react to webhook events notifying that the status of an ACH transfer was changed.
Webhook objects have a `status`: if they are `enabled`, then a notification will be issued to the URL. Any other status (`error`, `disabled`) will not issue a notification. To re-enable a webhook that is in `error` or `disabled` status, update the `status` field to `enabled`.
## Webhook Ordering
We cannot guarantee that webhooks will be received in order. In practice, events that have a significant time gap between them will be received in order. However, when two events are only a few milliseconds apart, the one sent first may arrive second.
In a production environment, you should encounter this less frequently, but it is still possible to receive an out-of-order webhook. If you query the API using the object ID provided in the webhook payload, you will always receive the latest information.
## Webhook Payloads
```bash bash theme={null}
POST https://example.application.com/notify
{
"event": "ach.update",
"op": "update",
"id": "ach_01123456789",
"url": "https://api.treasuryprime.com/ach/ach_01123456789"
}
```
## Validating Webhooks
Validating that webhooks originate from Treasury Prime ensures that a webhook notification is authentic. If a webhook object has been created with the `basic_user` and `basic_secret` fields, notifications from Treasury Prime will include an additional `Authorization` header that is the base64-encoded value of `{basic_user}:{basic_secret}`. When the base64 header matches the value your application expects, the request is authentic.
## Webhooks in `error` status
If there are too many bad responses when sending notifications to a webhook's URL within a short time, the webhook will be put into status `error`. No new webhooks will be issued on webhooks in `error` status. This happens only for a high volume of failed responses, and is done to prevent other webhook notifications from slowing down.
A webhook can be changed back to `enabled` status by updating the `status` field to `enabled`. This will reset the webhook and new webhooks will now be issued.
## Smart Webhook Retries
Organizations can enable an automatic retry logic for webhook messages that receive non-200 HTTP responses. If a webhook message fails (receives a non-200 response), our system will automatically retry sending the message.
* Benefits
* This ensures that any missed notifications are automatically retried
* How to Enable
* For this to be enabled at a Fintech, your corresponding Bank will need to provide approval. Please reach out to your Relationship Manager or Treasury Prime Support
## Webhook Webhooks
You can register a webhook to receive notifications about updates to other webhooks. To do so, subscribe to the `webhook.update` event:
```json theme={null}
{
"event": "webhook.update",
"url": "https://example.application.com/notify"
}
```
Once registered, your endpoint will receive notifications in the following format:
```json theme={null}
{
"event": "webhook.update",
"op": "update",
"id": "webhook_01123456789",
"url": "https://example.application.com/notify"
}
```
This is particularly useful for monitoring when a webhook enters an `error` or `disabled` status.
## Webhook Send History
You can inspect the history of individual webhook send attempts using the [List Webhooks Sent](/reference/get_webhook_send) endpoint. Each `webhook_send` record represents a single attempt to deliver a notification to the URL registered on a webhook, and captures whether that attempt was `sent`, `skipped`, or resulted in an `error`.
Use this endpoint to:
* Confirm that a notification was delivered for a specific object (for example, an ACH transfer or card).
* Investigate why a webhook is in `error` status by reviewing the error message and attempt number on recent send attempts.
* Determine whether a failed attempt will be retried (`will_retry`) under [Smart Webhook Retries](#smart-webhook-retries).
Send attempts can be filtered by `object_id` (the resource that triggered the notification), `webhook_id` (the registered webhook), `status`, and a `from_date`/`to_date` range. Results are paginated using `page_cursor` and `page_size` (default `100`).
```bash bash theme={null}
# List the most recent send attempts for a specific webhook
curl "https://api.treasuryprime.com/webhook_send?webhook_id=webhook_01123456789&status=error" \
-u "$API_KEY_ID:$API_KEY_SECRET"
```
Each returned record includes:
* `id` — unique identifier for the send attempt.
* `webhook_id` — the webhook that produced this attempt.
* `object_id` — the resource whose change triggered the notification.
* `operation` — the database operation (for example, `update`) that produced the event.
* `status` — one of `sent`, `skipped`, or `error`.
* `attempt_number` — how many prior attempts were made for this event.
* `will_retry` — whether another retry is scheduled.
* `error` — the failure reason when `status` is `error`.
# Event Types
Source: https://docs.treasuryprime.com/reference/webhook-events
Create a [Webhook](/reference/webhook) by subscribing to these event types.
### Account Opening Webhooks
| Endpoint | Events |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| [Account Application](/reference/account-application) | `apply.account-application.create` `apply.account-application.update` |
| [Additional Person Application](/reference/additional-person) | `apply.additional-person-application.create` `apply.additional-person-application.update` |
| Additional Authorized User Application | `apply.authorized-user-application.create` `apply.authorized-user-application.update` |
| [Business Application](/reference/business-application) | `apply.business-application.create` `apply.business-application.update` |
| [Initial Deposit](/reference/deposit) | `apply.deposit.create` |
| [KYC Product](/reference/kyc-product) | `apply.kyc-product.create` `apply.kyc-product.update` |
| [KYC](/reference/kyc) | `apply.kyc.create` `apply.kyc.update` |
| [Person Application](/reference/person-application) | `apply.person-application.create` `apply.person-application.update` |
### Account Webhooks
| Endpoint | Events |
| ---------------------------------------------------------- | ------------------------------------------------------------------ |
| [Account](/reference/account) | `account.create` `account.update` |
| [Business](/reference/business) | `business.update` |
| [Person](/reference/person) | `person.update` |
| [Reserve Account](/reference/reserve-account) | `reserve.create` `reserve.update` `reserve.delete` |
| [Statement Configuration](/reference/get_statement_config) | `statement_config.create` `statement_config.update` |
| [Transaction](/reference/get_transaction) | `hold_expiration.create` `transaction.create` `transaction.update` |
### Card Webhooks
| Endpoint | Events |
| ------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| [Card](/reference/card) | `card.create` `card.update` |
| [Card Auth Loop](/reference/card-auth-loop-endpoint) | `card_auth_loop_endpoint.create` `card_auth_loop_endpoint.update` `card_auth_loop_endpoint.delete` |
| [Card Event](/reference/card-event) | `card_event.create` `card_event.update` |
| [Card Product](/reference/card-product) | `cardproduct.create` `cardproduct.update` |
| [Digital Wallet Token](/reference/digital-wallet-token) | `digital_wallet_token.create` `digital_wallet_token.update` |
### Payment Webhooks
| Endpoint | Events |
| ----------------------------------------------------------- | --------------------------------------------------------------- |
| [ACH](/reference/ach) | `ach.create` `ach.update` |
| [Book](/reference/book-transfer) | `book.create` `book.update` |
| [Check Deposit](/reference/check-deposit) | `check_deposit.create` `check_deposit.update` |
| [Counterparty](/reference/get_counterparty) | `counterparty.create` `counterparty.update` |
| [FedNow](/reference/fednow) | `fednow.create` `fednow.update` |
| [Incoming ACH](/reference/incoming-ach) | `incoming_ach.create` `incoming_ach.update` |
| [Incoming Wire](/reference/incoming-wire) | `incoming_wire.create` `incoming_wire.update` |
| [Invoice Account Number](/reference/invoice-account-number) | `invoice_account_number.create` `invoice_account_number.update` |
| [Issued Check](/reference/check-issuing) | `check.create` `check.update` |
| [Manual Hold](/reference/manual-hold) | `manual_hold.create` `manual_hold.update` |
| [Network Transfer](/reference/network-transfer) | `network_transfer.create` `network_transfer.update` |
| [Prime Cash](/reference/greendot) | `greendot.create` `greendot.update` |
| [Wire](/reference/wire) | `wire.create` `wire.update` |
### Utility Webhooks
| Endpoint | Events |
| ----------------------------------- | -------------------------------------------------- |
| [Document](/reference/get_document) | `document.create` `document.update` |
| [File](/reference/get_file-id) | `file.create` |
| [Webhook](/reference/webhook) | `webhook.create` `webhook.update` `webhook.delete` |
# Overview
Source: https://docs.treasuryprime.com/reference/wire
Wires are electronic funds transfers between two accounts at different financial institutions. In contrast to ACH, wires are much faster, but they are also more expensive. Wires are executed immediately and usually settle within a matter of hours. Unlike ACH, wires cannot be reversed once sent.
## Workflow
Once you successfully submit a new wire transfer, the sending account will be queried for available balance. If there are sufficient funds, the wire will be sent to the bank for settlement. You can track the progress of a wire by checking the `status` attribute on the Wire Transfer object.
You must have authorized access to the source account for the transfer to be successful.
The possible `status` values are:
* `pending`
Initial status after object creation.
* `canceled`
The transfer was canceled and was never executed.
* `processing`
The transfer is being processed in preparation to be sent. You may no longer cancel a transfer once it has entered this state.
* `sent`
The transfer has been executed and sent to the bank for settlement.
* `void`
The wire was marked as void by the bank.
* `error`
An error occurred that prevented the wire from being sent.
Depending on your bank, the parameters returned may vary. Namely, IMAD and OMAD may not be present.
# Wire Testing
Source: https://docs.treasuryprime.com/reference/wire-testing
The [`/wire`](/reference/wire) can be used in the Sandbox environment to send test transactions. [Wire transfers](/reference/wire) submitted for amounts up to \$50,000 will move through the normal [wire workflow](/reference/wire#workflow), eventually ending with status `sent`. You can simulate other statuses that may arise in Production use cases by manipulating the `account_number` used in the API call.
## Trigger an Error Status
To trigger an `error` status for a [Wire](/reference/wire) object, create a wire with a counterparty whose `account_number` begins with a 9. These wires will be in state `pending` when you submit them, but later they will be assigned an `error` status and the `error` field will be set.
##### Example Counterparty Object that will result in a simulated wire error
```bash bash theme={null}
curl -u $API_KEY_ID:$API_SECRET_KEY https://api.sandbox.treasuryprime.com/counterparty \
-H 'Content-Type: application/json' \
-d '{
"name_on_account": "Paul Bunyun",
"wire": {
"account_number": "91234567",
"account_type": "checking",
"routing_number": "021001208",
"address_on_account": {
"street_line_1": "888 Rainy Lane",
"street_line_2": null,
"city": "Seattle",
"state": "WA",
"postal_code": "98102"
},
"bank_address": {
"street_line_1": "123 Cherry Street",
"street_line_2": null,
"city": "Duluth",
"state": "MN",
"postal_code": "55812"
},
"bank_name": "Bank of the Lakes"
}
}'
```