Skip to content

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):

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

Environments provide easy switching between Local, Sandbox, and Production:

  1. Import the Collection:
  2. Click Download Postman Collection
  3. Save it to your computer
  4. In Postman, click "Import" button
  5. Select postman_collection.json

  6. Import the Environments:

  7. Download environment file(s):
  8. In Postman, click "Import" button again
  9. Select the downloaded environment JSON file(s)

  10. Select an Environment:

  11. In Postman, find the environment dropdown (top-right corner)
  12. Select "TreasuryPath - Local", "TreasuryPath - Sandbox", or "TreasuryPath - Production"

  13. Done! Switch environments anytime from the dropdown

Option 2: Collection Variables Only

If you prefer a single-file setup:

  1. Import only the postman_collection.json file
  2. Set variables in the collection's "Variables" tab
  3. Change base_url manually when switching between Sandbox/Production

✅ Both options support auto-authentication and automatic variable storage!

Configure Your Credentials

  1. Click on the eye icon in the top-right (next to environment dropdown)
  2. Click "Edit" on your selected environment
  3. Set the Current value for:
  4. api_key - Your TreasuryPath API key
  5. api_secret - Your TreasuryPath API secret
  6. Click "Save"

If Using Collection Variables Only:

  1. Click on your collection: "TreasuryPath Payments API"
  2. Go to the "Variables" tab
  3. Set the Current value for:
  4. base_url - Environment URL (see URLs above)
  5. api_key - Your TreasuryPath API key
  6. api_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_key and api_secret
  • Without Environments: Collection Variables tab → Set base_url, api_key, api_secret

2. Authentication

  1. Run "Create Session (Get JWT Token)" request from the Authentication folder
  2. The token variable will be automatically set
  3. 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

  1. Create Company - Creates your top-level organization
  2. Create Entity - Creates a subsidiary/branch

Step 2: Enable Multi-Currency (Optional - US entities only)

  1. Enable Feature - Multi-Currency Account - Initiates multi-currency account
  2. Generate Feature Token - Onboarding - Get token for KYC hosted page
  3. Direct user to hosted page: {HOSTED_URL}/entity-feature?token={feature_jwt_token}
  1. Generate Token - Funding Accounts Page - Get token for linking external bank accounts
  2. Direct user to hosted page: {HOSTED_URL}/funding-accounts?token={funding_accounts_token}
  3. User links their business bank account via Plaid

Step 4: Add Recipients

  1. Create Recipient - Create a payee
  2. Generate Add Bank Account Token - Get token for recipient bank details
  3. Direct user to hosted page: {HOSTED_URL}/recipient/add-bank-account?token={recipient_bank_account_token}

Step 5: View Bank Accounts

  1. List Bank Accounts - See all accounts with payment profiles
  2. Note the payment profile IDs:
  3. Funding accounts: usage_type: "debit" (source)
  4. Recipient accounts: usage_type: "credit" (destination)

Step 6: Create Payment

  1. Create Quote - Same Currency or Cross Currency
  2. Create Payment - Execute payment using the quote
  3. 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

  1. Create Webhook Endpoint - Register your webhook URL
  2. List Webhook Endpoints - View all registered endpoints
  3. Get Available Webhook Events - See all available event types
  4. Update Webhook Endpoint - Modify URL or events
  5. 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