B2M Asia API

Integrate real-time FX rates, cross-border payments, and multi-currency account management directly into your platform. Our REST API is built for developers who need reliable, secure, and well-documented financial infrastructure.

View Documentation
quick-start.js
// Initiate a cross-border payment
const response = await fetch('https://api.b2masia.com/v1/payments', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${API_KEY}`,
    'Content-Type':  'application/json'
  },
  body: JSON.stringify({
    amount:          50000,
    source_currency: 'CAD',
    target_currency: 'CNY',
    beneficiary_id:  'ben_94f2a1c8',
    reference:      'INV-2026-00142'
  })
});

const payment = await response.json();
// → { payment_id: "pay_8d3f1a2b9c", fx_rate: 5.2341, status: "processing" }
REST
API Architecture
TLS 1.3
Encryption
99.9%
Uptime SLA
<200ms
Avg Response
Sandbox
Free Testing

Everything Your Platform Needs to Move Money Across Asia

The B2M Asia API gives your application direct access to our payments infrastructure — from live FX rates to full payment execution and account management.

/v1/rates

FX Rates

Real-time and historical FX rates for all 40+ supported currency pairs. Retrieve spot rates, indicative rates, and locked rates with timestamps.

GET /v1/rates/{pair}GET /v1/rates/historyPOST /v1/rates/lock
/v1/payments

Payments

Initiate, track, and manage cross-border B2B payments. Support for single payments, batch transfers, and scheduled recurring transfers with webhook notifications.

POST /v1/paymentsGET /v1/payments/{id}POST /v1/payments/batch
/v1/accounts

Accounts

Create and manage multi-currency accounts. Retrieve balances, transaction history, and account statements. Full sub-account architecture supported.

GET /v1/accountsGET /v1/accounts/{id}/balancePOST /v1/accounts/sub
/v1/beneficiaries

Beneficiaries

Create, verify, and manage payment beneficiaries. Store bank account details securely and reuse them across multiple payments.

POST /v1/beneficiariesGET /v1/beneficiariesDELETE /v1/beneficiaries/{id}
/v1/hedging

Hedging

Access B2M Asia's AI hedging engine programmatically. Create forward contracts, set hedging rules, and monitor open positions in real time.

POST /v1/hedging/forwardGET /v1/hedging/positionsPOST /v1/hedging/rules
/v1/webhooks

Webhooks

Receive real-time event notifications for payment status changes, account activity, and FX rate alerts. Reliable delivery with automatic retry logic.

POST /v1/webhooksGET /v1/webhooks/eventsPOST /v1/webhooks/test

API Reference

All requests use HTTPS and return JSON responses. Include your API key in every request.

Base URLs
🟢 Production
https://api.b2masia.com/v1
🟡 Sandbox
https://sandbox.b2masia.com/v1

Sandbox transactions do not move real funds. Use it for all development and testing.

Authentication

Include a valid API key in the Authorization header using Bearer token authentication on every request.

Authorization: Bearer b2m_live_xxxx
Content-Type: application/json
B2M-Version: 2026-01-01

Never expose API keys in client-side code or public repositories.

GET /v1/rates/{pair} Get Live FX Rate

Returns the current mid-market rate, bid, ask, and spread for a given currency pair. Rates are updated every 500ms during market hours.

Parameters
pair Currency pair in format SOURCE-TARGET (e.g. CAD-CNY, USD-JPY)
Response200 OK
{"pair":"CAD-CNY","mid":5.2341,"bid":5.2290,"ask":5.2392,"spread":0.0102,"timestamp":"2026-06-10T09:41:22Z","market_open":true}
POST /v1/payments Create a Payment

Initiates a new cross-border payment. Returns a payment object with the locked FX rate, settlement estimate, and tracking ID.

Parameters
amount Integer. Amount in smallest currency unit (cents)
source_currency String. ISO 4217 code e.g. "CAD"
target_currency String. ISO 4217 code e.g. "CNY"
beneficiary_id String. ID of a previously created beneficiary
reference String. Your internal reference or invoice number (optional)
Response201 Created
{"payment_id":"pay_8d3f1a2b9c","status":"processing","amount":50000,"source_currency":"CAD","target_currency":"CNY","fx_rate":5.2341,"target_amount":261705,"fee":400,"estimated_settlement":"2026-06-11T18:00:00Z"}
GET /v1/accounts/{id}/balance Get Account Balance

Returns the current available and pending balances for a specific account, broken down by currency.

Parameters
id String. Your B2M Asia account ID
Response200 OK
{"account_id":"acc_f7d2e1b3","balances":[{"currency":"CAD","available":1250000,"pending":50000},{"currency":"CNY","available":980000,"pending":0},{"currency":"USD","available":430000,"pending":25000}],"updated_at":"2026-06-10T09:41:22Z"}

HTTP Status Codes

The B2M Asia API uses standard HTTP response codes. All error responses include a machine-readable code and human-readable message.

CodeMeaning
200OK — Request succeeded
201Created — Resource created
400Bad Request — Invalid parameters
401Unauthorized — Invalid API key
403Forbidden — Insufficient permissions
404Not Found — Resource missing
409Conflict — Duplicate request
422Unprocessable — Validation failed
429Too Many Requests — Rate limit hit
500Server Error — Contact support
Error Response Format
{"error":{"code":"INSUFFICIENT_BALANCE","message":"The account does not have sufficient balance in CAD to complete this payment.","field":"amount","docs":"https://docs.b2masia.com/errors/INSUFFICIENT_BALANCE"},"request_id":"req_4f2a9c1d8e"}

Tip: Always log the request_id field. Include it when contacting support to help our team diagnose issues quickly.

Official Libraries & Integrations

Get up and running faster with our official client libraries and pre-built ERP integrations.

Node.js / JavaScript
npm install @b2masia/node-sdk

Supports async/await, TypeScript definitions, and automatic retry logic. Tested on Node 18+.

Python
pip install b2masia

Full type hints, async support via asyncio, and pytest integration for testing.

PHP
composer require b2masia/php

Laravel and Symfony compatible. PSR-7 HTTP client support and full PHPDoc annotations.

Go
go get github.com/b2masia/go

Idiomatic Go client with context support, structured logging, and built-in retry.

Pre-Built ERP & Accounting Integrations
QuickBooks Online ✅ Available
Xero ✅ Available
Sage 50 / 200 ✅ Available
SAP Business One 🔄 Coming Q3 2026
NetSuite 🔄 Coming Q4 2026
Microsoft Dynamics 🔄 Coming Q4 2026

API Rate Limits & Quotas

Rate limits are applied per API key. Contact our team if you need higher limits for production workloads.

Sandbox
Development & Testing
Rate Limit 100 requests / min
Daily Quota 10,000 requests
Payment Volume Simulated only
Support Documentation + Email
Cost Free
Production
Live Business Use
Rate Limit 500 requests / min
Daily Quota Unlimited
Payment Volume Based on tier
Support Priority Email + Chat
Cost Included with account
Enterprise
High Volume & Custom
Rate Limit Up to 5,000 / min
Daily Quota Unlimited
Payment Volume Negotiated
Support Dedicated TAM
Cost Contact for pricing

Rate Limit Headers: Every response includes X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers so your application can monitor usage and throttle gracefully.

API Security Standards

The B2M Asia API is built with financial-grade security at every layer.

TLS 1.3 Encryption

All API traffic is encrypted in transit using TLS 1.3. TLS 1.0 and 1.1 are not supported. Certificate pinning is available for mobile integrations.

API Key Rotation

API keys can be rotated at any time from your dashboard without service interruption. Separate keys for sandbox and production prevent accidental live transactions.

Idempotency Keys

Include an Idempotency-Key header to safely retry requests without creating duplicate payments. Keys are honoured for 24 hours.

Webhook Signatures

All webhook payloads are signed with HMAC-SHA256. Always verify the B2M-Signature header before processing any webhook event.

IP Allowlisting

Restrict API access to specific IP addresses or CIDR ranges from your account security settings. Strongly recommended for production integrations.

Audit Logging

Every API request is logged with timestamp, API key ID, IP address, endpoint, and response code. Logs are available in your dashboard for 90 days.

Start Building with the B2M Asia API

Create a business account to receive your API keys. Sandbox access is available immediately — no KYB required to start testing.

Talk to Our Dev Team