๐ Developer Documentation
Complete reference for the ABC-IO M2M Commerce API. Build autonomous machine-to-machine transactions.
๐ Authentication
Include your API key in all requests:
X-M2M-Key: YOUR_API_KEY
Get your API key from the Developer Portal.
Base URL
https://abc-io.net
Rate Limits
| Tier | Requests/Day | Rate |
|---|---|---|
| API Basic | 100 | 10 req/min |
| API Professional | 10,000 | 100 req/min |
| API Enterprise | Unlimited | 1000 req/min |
๐งช Sandbox / Test Mode
Use test_ prefix for API keys in test mode. Test transactions use Stripe test cards and do not process real payments. No deposit required for sandbox testing.
curl https://abc-io.net/api/m2m/health -H "X-M2M-Key: test_your_key"
Endpoints
GET /api/m2m/health
Check API health and product count.
curl https://abc-io.net/api/m2m/health -H "X-M2M-Key: YOUR_KEY"
Response:
{"status": "ok", "products": 36}
GET /api/m2m/catalog
Retrieve full product catalog.
curl https://abc-io.net/api/m2m/catalog -H "X-M2M-Key: YOUR_KEY"
POST /api/m2m/register
Register a new M2M buyer account.
curl -X POST https://abc-io.net/api/m2m/register -H "Content-Type: application/json" -H "X-M2M-Key: YOUR_KEY" -d '{"name":"Machine Buyer","email":"m2m@example.com"}'
Response:
{"buyer_id": 1, "api_key": "ak_..."}
POST /api/m2m/deposit
Deposit funds to a buyer account.
curl -X POST https://abc-io.net/api/m2m/deposit -H "Content-Type: application/json" -H "X-M2M-Key: YOUR_KEY" -d '{"buyer_id":1,"amount":100.00,"payment_ref":"TXN-123"}'
POST /api/m2m/purchase
Purchase a product using deposited funds.
curl -X POST https://abc-io.net/api/m2m/purchase -H "Content-Type: application/json" -H "X-M2M-Key: YOUR_KEY" -d '{"buyer_id":1,"product_id":"api_basic","amount":29.99}'
GET /api/m2m/status?buyer_id=1
Get buyer account status and balance.
curl "https://abc-io.net/api/m2m/status?buyer_id=1" -H "X-M2M-Key: YOUR_KEY"
GET /api/m2m/transactions?buyer_id=1
Get buyer transaction history.
curl "https://abc-io.net/api/m2m/transactions?buyer_id=1" -H "X-M2M-Key: YOUR_KEY"
Webhooks
Receive real-time events for orders, provisioning, and account changes.
| Event | Description |
|---|---|
| order.created | New order placed |
| order.confirmed | Payment confirmed |
| order.provisioned | Service activated |
| order.failed | Provisioning failed |
| buyer.registered | New buyer account created |
Code Samples
Python
import requests
BASE = "https://abc-io.net"
KEY = "YOUR_API_KEY"
# Check health
r = requests.get(f"{BASE}/api/m2m/health", headers={"X-M2M-Key": KEY})
print(r.json())
# Register buyer
r = requests.post(f"{BASE}/api/m2m/register", json={
"name": "Machine Buyer",
"email": "m2m@example.com"
}, headers={"X-M2M-Key": KEY})
print(r.json())
JavaScript
const BASE = "https://abc-io.net";
const KEY = "YOUR_API_KEY";
// Check health
fetch(`${BASE}/api/m2m/health`, {
headers: {"X-M2M-Key": KEY}
}).then(r => r.json()).then(console.log);
// Register buyer
fetch(`${BASE}/api/m2m/register`, {
method: "POST",
headers: {"Content-Type": "application/json", "X-M2M-Key": KEY},
body: JSON.stringify({name: "Machine Buyer", email: "m2m@example.com"})
}).then(r => r.json()).then(console.log);
Usage & Billing
| Resource | Unit | Price |
|---|---|---|
| API Requests | per 1000 | $0.10 |
| AI Inference | per 1000 tokens | $0.002 |
| Compute | per hour | $0.05 |
| Storage | per GB/month | $0.02 |