Frontierpay is technical platfeform for routing payment accros africa
# FrontierPay Orchestrator
Payment orchestrator for African cross-border payments.
**Modules:** Routing Engine · Failover Chain · Bulk Async (1 000 recipients) · Idempotency · Outbound Callbacks
## Deploy to Render (3 steps)
1. Push this repo to GitHub
2. Go to dashboard.render.com → **New +** → **Web Service** → connect this repo
3. Add environment variables in Render dashboard → **Environment**:
- `VISA_CB_URL` — your webhook URL
- `VISA_CB_SECRET` — HMAC secret
- `VISA_CB_TOKEN` — Bearer token
Render auto-deploys on every `git push`.
## API Endpoints
| Method | Path | Description |
|--------|------|-------------|
| GET | `/health` | Health check |
| POST | `/payments/initiate` | Single payment |
| POST | `/payments/bulk/validate` | Dry-run batch |
| POST | `/payments/bulk` | Submit batch (async) |
| GET | `/payments/bulk/:ref/status` | Batch status |
| GET | `/rails/status` | Rail availability |
| POST | `/rails/:rail/toggle` | Toggle rail ON/OFF |
| POST | `/routing/evaluate` | Debug routing |
## Headers required on all POST
```
Idempotency-Key:
Content-Type: application/json
```
## Example — single payment
```bash
curl -X POST
your_app.onrender.com \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"amount":25000,"currency":"XAF","operator":"mtn","phone":"+237691234567"}'
```
## Example — bulk payment
```bash
curl -X POST
your_app.onrender.com \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"currency": "XAF",
"payments": [
{"phone":"+237691234567","amount":5000,"operator":"mtn"},
{"phone":"+237670000001","amount":8000,"operator":"orange"}
]
}'
```