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 Unicorn system.

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

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.