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
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
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
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
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
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
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 All requests use HTTPS and return JSON responses. Include your API key in every request.
https://api.b2masia.com/v1https://sandbox.b2masia.com/v1Sandbox transactions do not move real funds. Use it for all development and testing.
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.
The B2M Asia API uses standard HTTP response codes. All error responses include a machine-readable code and human-readable message.
| Code | Meaning |
|---|---|
200 | OK — Request succeeded |
201 | Created — Resource created |
400 | Bad Request — Invalid parameters |
401 | Unauthorized — Invalid API key |
403 | Forbidden — Insufficient permissions |
404 | Not Found — Resource missing |
409 | Conflict — Duplicate request |
422 | Unprocessable — Validation failed |
429 | Too Many Requests — Rate limit hit |
500 | Server Error — Contact support |
{"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.
Get up and running faster with our official client libraries and pre-built ERP integrations.
npm install @b2masia/node-sdk
Supports async/await, TypeScript definitions, and automatic retry logic. Tested on Node 18+.
pip install b2masia
Full type hints, async support via asyncio, and pytest integration for testing.
composer require b2masia/php
Laravel and Symfony compatible. PSR-7 HTTP client support and full PHPDoc annotations.
go get github.com/b2masia/go
Idiomatic Go client with context support, structured logging, and built-in retry.
Rate limits are applied per API key. Contact our team if you need higher limits for production workloads.
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.
The B2M Asia API is built with financial-grade security at every layer.
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 keys can be rotated at any time from your dashboard without service interruption. Separate keys for sandbox and production prevent accidental live transactions.
Include an Idempotency-Key header to safely retry requests without creating duplicate payments. Keys are honoured for 24 hours.
All webhook payloads are signed with HMAC-SHA256. Always verify the B2M-Signature header before processing any webhook event.
Restrict API access to specific IP addresses or CIDR ranges from your account security settings. Strongly recommended for production integrations.
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.
Create a business account to receive your API keys. Sandbox access is available immediately — no KYB required to start testing.