TreasuryPath Postman Collection
This directory contains the complete Postman collection for the TreasuryPath API.
Download Files
📥 Download Postman Collection (Required)
📥 Environment Files (Recommended for auto-authentication):
- Local Environment → http://127.0.0.1:3003/api/v1
- Sandbox Environment → https://api.tpathdemo.com/api/v1
- Production Environment → https://api.treasurypath.com/api/v1
What's Included
API Endpoints:
- Authentication - JWT token generation
- Companies - Create and manage companies
- Entities - Organizational units within companies
- Multi-Currency - Enable multi-currency accounts and manage funding accounts
- Bank Accounts - View bank accounts and payment profiles
- Recipients - Create recipients and add their bank accounts
- Quotes - Get payment quotes for same-currency and cross-currency transactions
- Payments - Create and track payments
- Webhooks - Configure webhook endpoints for real-time events
- Error Scenarios - Test error handling
Available Environments:
- Sandbox →
https://api.tpathdemo.com/api/v1(Default - safe for testing) - Production →
https://api.treasurypath.com/api/v1(Live transactions)
Features:
- Auto-authentication scripts
- Automatic variable extraction and storage
- Easy environment switching
- Pre-configured test scripts
How to Import
Option 1: With Environments (Recommended)
Environments provide easy switching between Local, Sandbox, and Production:
- Import the Collection:
- Click Download Postman Collection
- Save it to your computer
- In Postman, click "Import" button
-
Select
postman_collection.json -
Import the Environments:
- Download environment file(s):
- Local Environment - for local development
- Sandbox Environment - for testing
- Production Environment - for production
- In Postman, click "Import" button again
-
Select the downloaded environment JSON file(s)
-
Select an Environment:
- In Postman, find the environment dropdown (top-right corner)
-
Select "TreasuryPath - Local", "TreasuryPath - Sandbox", or "TreasuryPath - Production"
-
Done! Switch environments anytime from the dropdown
Option 2: Collection Variables Only
If you prefer a single-file setup:
- Import only the
postman_collection.jsonfile - Set variables in the collection's "Variables" tab
- Change
base_urlmanually when switching between Sandbox/Production
✅ Both options support auto-authentication and automatic variable storage!
Configure Your Credentials
If Using Environments (Recommended):
- Click on the eye icon in the top-right (next to environment dropdown)
- Click "Edit" on your selected environment
- Set the Current value for:
api_key- Your TreasuryPath API keyapi_secret- Your TreasuryPath API secret- Click "Save"
If Using Collection Variables Only:
- Click on your collection: "TreasuryPath Payments API"
- Go to the "Variables" tab
- Set the Current value for:
base_url- Environment URL (see URLs above)api_key- Your TreasuryPath API keyapi_secret- Your TreasuryPath API secret
Variable Reference
| Variable | Description | How it's set |
|---|---|---|
base_url |
API endpoint URL | Pre-configured in environments or manually in collection |
api_key |
Your API key | Manual - Set this yourself |
api_secret |
Your API secret | Manual - Set this yourself |
token |
JWT auth token | Auto-set by "Create Session" or pre-request script |
company_id |
Company ID | Auto-set by "Create Company" or manual |
entity_id |
Entity ID | Auto-set by "Create Entity" or manual |
application_id |
Multi-currency application ID | Auto-set by "Enable Feature - Multi-Currency Account" |
feature_jwt_token |
Feature onboarding/pending action token | Auto-set by "Generate Feature Token" requests |
funding_accounts_token |
Funding accounts page token | Auto-set by "Generate Token - Funding Accounts Page" |
recipient_id |
Recipient (counterparty) ID | Auto-set by "Create Recipient" or manual |
recipient_bank_account_token |
Recipient bank account page token | Auto-set by "Generate Add Bank Account Token" |
account_id |
Bank account ID | Manual - Copy from "List Bank Accounts" response |
quote_id |
Payment quote ID | Auto-set by "Create Quote" requests |
payment_id |
Payment instruction ID | Auto-set by "Create Payment" |
idempotency_key |
Payment idempotency key | Auto-set by "Create Payment" or use {{$guid}} |
webhook_endpoint_id |
Webhook endpoint ID | Auto-set by "Create Webhook Endpoint" |
Usage Workflow
1. Set Up Your Credentials
- With Environments: Click eye icon → Edit environment → Set
api_keyandapi_secret - Without Environments: Collection Variables tab → Set
base_url,api_key,api_secret
2. Authentication
- Run "Create Session (Get JWT Token)" request from the Authentication folder
- The
tokenvariable will be automatically set - All subsequent requests will use this token for authentication
💡 Auto-authentication: The collection automatically authenticates before each request if no token exists!
3. Complete Payment Flow
Follow this recommended workflow to test the complete payment flow:
Step 1: Company & Entity Setup
- Create Company - Creates your top-level organization
- Create Entity - Creates a subsidiary/branch
Step 2: Enable Multi-Currency (Optional - US entities only)
- Enable Feature - Multi-Currency Account - Initiates multi-currency account
- Generate Feature Token - Onboarding - Get token for KYC hosted page
- Direct user to hosted page:
{HOSTED_URL}/entity-feature?token={feature_jwt_token}
Step 3: Link Funding Accounts
- Generate Token - Funding Accounts Page - Get token for linking external bank accounts
- Direct user to hosted page:
{HOSTED_URL}/funding-accounts?token={funding_accounts_token} - User links their business bank account via Plaid
Step 4: Add Recipients
- Create Recipient - Create a payee
- Generate Add Bank Account Token - Get token for recipient bank details
- Direct user to hosted page:
{HOSTED_URL}/recipient/add-bank-account?token={recipient_bank_account_token}
Step 5: View Bank Accounts
- List Bank Accounts - See all accounts with payment profiles
- Note the payment profile IDs:
- Funding accounts:
usage_type: "debit"(source) - Recipient accounts:
usage_type: "credit"(destination)
Step 6: Create Payment
- Create Quote - Same Currency or Cross Currency
- Create Payment - Execute payment using the quote
- Get Payment - Check payment status
💡 Important Note on Quotes:
- Payments require a valid
quote_id - Quotes expire after 15 minutes
- If you get a 422 "invalid quote" error, re-run the "Create Quote" request to get a fresh quote
4. Webhook Testing
- Create Webhook Endpoint - Register your webhook URL
- List Webhook Endpoints - View all registered endpoints
- Get Available Webhook Events - See all available event types
- Update Webhook Endpoint - Modify URL or events
- Toggle Webhook Endpoint - Enable/disable without deleting
5. Error Testing
Test error scenarios to understand API error responses:
- Missing Idempotency Key - Returns 422 with validation error
- Invalid Authentication - Returns 401 with auth error
- Invalid Quote - Zero Amount - Returns 422 with validation error
6. Switch Environments
With Environments: Select different environment from the dropdown (top-right)
Without Environments: Edit collection variables → Change base_url → Save
Collection Structure
TreasuryPath Payments API/
├── Authentication/
│ └── Create Session (Get JWT Token)
├── Companies/
│ ├── List Companies
│ ├── Create Company
│ ├── Get Company
│ ├── Update Company
│ └── Delete Company
├── Entities/
│ ├── List Entities
│ ├── Create Entity
│ ├── Get Entity
│ ├── Update Entity
│ └── Delete Entity
├── Multi-Currency/
│ ├── List Enabled Features
│ ├── Enable Feature - Multi-Currency Account
│ ├── Generate Feature Token - Onboarding
│ ├── Generate Feature Token - Pending Action
│ └── Generate Token - Funding Accounts Page
├── Bank Accounts/
│ ├── List Bank Accounts
│ └── Get Bank Account
├── Recipients/
│ ├── Create Recipient
│ ├── List Recipients
│ ├── Get Recipient
│ └── Generate Add Bank Account Token
├── Quotes/
│ ├── Create Quote - Same Currency
│ ├── Create Quote - Cross Currency
│ └── Create Quote - USD 500
├── Payments/
│ ├── Create Payment
│ ├── Create Payment - Same Idempotency Key
│ ├── Get Payment
│ ├── List Payments
│ ├── List Payments - Filtered by Status
│ └── List Payments - Date Range
├── Error Scenarios/
│ ├── Missing Idempotency Key
│ ├── Invalid Authentication
│ ├── Missing Company ID
│ └── Invalid Quote - Zero Amount
└── Webhooks/
├── Create Webhook Endpoint
├── List Webhook Endpoints
├── Get Webhook Endpoint
├── Update Webhook Endpoint
├── Delete Webhook Endpoint
├── Toggle Webhook Endpoint
└── Get Available Webhook Events
Security Notes
- Never commit API secrets to version control
- Use environment variables for sensitive data
- Sandbox environment is safe for testing
- Production environment processes real transactions
Support
For API support: - Check the API Documentation - Contact support at support@treasurypath.com - Join our developer community on Discord