Appearance
Hosted HTTP API
HTTP service for platforms that prefer API + API key over embedding the Node SDK. Same verification rules as @autlantic/payments.
You can self-host the reference server from the DrProfit monorepo (apps/payments-api) or run it on Railway.
Authentication
Every request except GET /health needs:
X-Autlantic-Api-Key: your_keyor Authorization: Bearer your_key
Production: set AUTLANTIC_API_KEYS=key1,key2 (comma-separated).
Dev fallback (non-production): apk_test_local if no keys are configured.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /health | Liveness (no auth) |
| GET | /v1/scenarios | List sandbox test scenarios |
| POST | /v1/intents | Create payment intent |
| POST | /v1/payments/verify | Verify tx hash |
| POST | /v1/payments/confirm | Verify + payment.confirmed event |
| POST | /v1/payments/poll | Poll incoming USDT |
| POST | /v1/test-events/trigger | Sandbox: emit test event |
Example (sandbox)
bash
curl -s http://localhost:8787/health
curl -s -X POST http://localhost:8787/v1/intents \
-H "Content-Type: application/json" \
-H "X-Autlantic-Api-Key: apk_test_local" \
-d '{
"merchantRef": "order_99",
"amountUsdt": 20,
"payToAddress": "TLyqzVGLV1srkB7dToTAEqgDSfPtXRJZYH",
"matchStrategy": "minimum_amount"
}'
curl -s -X POST http://localhost:8787/v1/payments/verify \
-H "Content-Type: application/json" \
-H "X-Autlantic-Api-Key: apk_test_local" \
-d '{
"merchantRef": "order_99",
"amountUsdt": 20,
"payToAddress": "TLyqzVGLV1srkB7dToTAEqgDSfPtXRJZYH",
"txHash": "sandbox_payment_confirmed"
}'Environment
| Variable | Purpose |
|---|---|
PORT | HTTP port (default 8787) |
AUTLANTIC_API_KEYS | Comma-separated API keys |
AUTLANTIC_PAYMENTS_SANDBOX | Test mode (no TronGrid) |
TRONGRID_API_KEY | Live chain access |
AUTLANTIC_PAYMENTS_WEBHOOK_SECRET | Sign confirm webhooks |
WARNING
Do not set AUTLANTIC_PAYMENTS_SANDBOX in production.
npm SDK alternative
bash
npm install @autlantic/paymentsSee Getting started.