Build Treasury
Automation

Integrate Unicorn Currencies into your ERP, TMS, or custom treasury system.
REST API • Webhooks • Real-time FX rates • 2.3s settlement

Quick Start

// Install SDK
// npm install @unicorn-currencies/node-sdk

const Unicorn = require('@unicorn-currencies/node-sdk');

const client = new Unicorn({
  apiKey: process.env.UNICORN_API_KEY,
  environment: 'production'
});

// Create a payment
const payment = await client.payments.create({
  amount: 50000,
  currency: 'GBP',
  beneficiary: {
    name: 'Acme Suppliers Ltd',
    accountNumber: '12345678',
    sortCode: '12-34-56',
    reference: 'INV-2024-001'
  },
  destinationCurrency: 'EUR',
  lockRate: true, // 15-second rate lock
  lockDuration: 15
});

console.log(`Payment created: ${payment.id}`);
console.log(`Locked rate: ${payment.rate}`);
console.log(`Expires: ${payment.rateExpiry}`);

// Confirm payment within 15 seconds
await client.payments.confirm(payment.id);

Key API Endpoints

POST

/v1/payments

Create international payments with 15-second rate locks. Settle in 2.3 seconds within our network.

Parameters: amount, currency, beneficiary, destinationCurrency, lockRate
GET

/v1/rates

Get real-time FX rates for 200+ currency pairs. Updated every 30 seconds. 0.5% spread.

Parameters: from, to, amount (optional)
GET

/v1/wallets

List all multi-currency wallet balances. Hold 20+ currencies simultaneously.

Returns: Array of wallets with currency, balance, available balance
POST

/v1/bills/upload

Upload supplier bills (PDF). AI OCR extracts amount, currency, due date. Track real-time FX P/L.

Parameters: file (multipart/form-data), supplier_name
GET

/v1/containers/:id

Track container location, ETA, detention status. Get 48-72h demurrage alerts. FREE.

Returns: status, location, ETA, detention_hours, demurrage_cost
POST

/v1/invoices

Create professional invoices with automatic banking details. FX-protected pricing.

Parameters: customer, items[], currency, lock_rate

Webhook Events

Subscribe to real-time events for automated reconciliation and notifications

payment.completed
Fired when a payment settles successfully. Use for automated reconciliation in your ERP.
rate.locked
Fired when an FX rate is locked for 15 seconds. Includes rate, expiry time, and payment ID.
container.alert
Fired 48-72 hours before container enters detention. Includes container ID, ETA, and projected demurrage cost.
bill.fx_alert
Fired when FX P/L on a bill crosses threshold (e.g., -2%). Trigger notifications or auto-hedge.
wallet.low_balance
Fired when a wallet balance falls below configured threshold. Automate treasury top-ups.
compliance.cleared
Fired when a payment passes compliance screening (0.14s average). Includes screening results.

Pre-Built Integrations

Xero

Sync payments, bills, and invoices. Auto-reconcile FX transactions.

QuickBooks

Import bills, create payments, auto-post to ledger. Two-way sync.

Sage

Integrate with Sage 50, 200, and Intacct. Automated payment runs.

TMS Platforms

Connect to CargoWise, Descartes, Magaya. Container tracking + payments.

Shopify / WooCommerce

Multi-currency checkout. Settle in customer's local currency.

Custom ERP

REST API. Integrate into SAP, Oracle, NetSuite, or custom systems.

Authentication & Security

API Keys

Use API keys for authentication. Generate production and sandbox keys from your dashboard. Never commit keys to version control.

Authorization: Bearer YOUR_API_KEY

Webhook Security

All webhooks include HMAC-SHA256 signatures. Verify signatures to ensure requests come from Unicorn Currencies.

X-Unicorn-Signature: sha256=abc123...

Developer Support

Full Documentation

Complete API reference, guides, and code examples

View Docs

Developer Slack

Join our community of developers building on Unicorn

Join Slack

Technical Support

Direct support from our engineering team

Contact Support

Frequently Asked Questions

What API capabilities does Unicorn Currencies offer?

Unicorn Currencies provides a comprehensive REST API for international payments, real-time FX rates for 200+ currency pairs, multi-currency account balances, and complete transaction history. We also offer webhooks for real-time updates on payment status, rate locks, container alerts, and more—enabling seamless integration with your ERP, TMS, or custom treasury systems.

How do I get API access?

To get API access, first apply for a Unicorn Currencies account. Once approved, you can request API credentials directly from your dashboard under the Developer section, or contact your dedicated treasury desk representative. API access is available to businesses with $1M+ annual FX volume.

Is there a sandbox or test environment?

Yes, we provide a full sandbox environment for development and testing. The sandbox mirrors our production API with simulated FX rates, test payment flows, and mock webhook events. You can generate sandbox API keys from your dashboard and develop your integration risk-free before going live.

What authentication method is used?

We use API key authentication as the primary method—simply include your API key in the Authorization header as a Bearer token. For enhanced security, we also support optional OAuth 2.0 authentication, which is recommended for applications requiring delegated access or more granular permission controls.

What is the API rate limit?

Standard API access includes a rate limit of 100 requests per minute, which is sufficient for most integration use cases. Enterprise customers with higher volume requirements can request increased limits—contact your treasury desk or our developer support team to discuss custom rate limit packages tailored to your operational needs.

Enterprise API for $1M+ FX Operations

Build treasury automation for import/export businesses. Not consumer fintech—B2B trade finance infrastructure.

API access requires $1M+ annual FX volume. Built for enterprise treasury operations.