API dan integrasi
JSON API di bawah /api/v1/…. Rute terkini ada di OpenAPI pada deployment Anda. Di contoh, ganti YOUR_HOST dengan host Anda.
Dokumentasi
- Interaktif: /docs (jika diaktifkan).
- Skema:
GET /api/v1/openapi.json. - Status:
GET /health,GET /readiness,GET /api/v1/status.
Konvensi
- HTTPS di produksi.
Content-Type: application/json(kecuali unggahan file sengketa).- Setelah
POST /api/v1/auth/login— cookie dan/atauAuthorization: Bearer …. - Refresh:
POST /api/v1/auth/refresh. - Operasi sensitif dapat memakai
Idempotency-Key— lihat OpenAPI.
Grup utama
- Auth dan sesi: register, login, refresh, logout, MFA.
- Profil dan dompet:
/api/v1/me,/api/v1/wallet/balances,/api/v1/wallet/activity. - Escrow: create, list, fund, release, dispute.
- Helpdesk: tiket.
- Daftar lengkap — di OpenAPI.
Dukungan integrasi
Pertanyaan tentang akses dan skenario: bantuan atau support@evopay.biz. Klien yang masuk dapat membuat tiket melalui POST /api/v1/helpdesk/tickets.
Contoh
json · badan permintaan
{
"email": "user@example.com",
"password": "YourStrongPassw0rd!",
"display_name": "Demo User"
}
bash · daftar
curl -sS -X POST "https://YOUR_HOST/api/v1/auth/register" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "YourStrongPassw0rd!",
"display_name": "Demo User"
}'
bash · masuk
curl -sS -X POST "https://YOUR_HOST/api/v1/auth/login" \
-H "Content-Type: application/json" \
-c cookies.txt \
-d '{
"email": "user@example.com",
"password": "YourStrongPassw0rd!"
}'
bash · profil dan dompet
curl -sS "https://YOUR_HOST/api/v1/me" -b cookies.txt
curl -sS "https://YOUR_HOST/api/v1/wallet/balances" -b cookies.txt
curl -sS "https://YOUR_HOST/api/v1/wallet/activity?limit=20" -b cookies.txt
bash · buat escrow
curl -sS -X POST "https://YOUR_HOST/api/v1/escrow" \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{
"title": "Pengiriman peralatan",
"description": "Peralatan server sesuai spesifikasi",
"amount": "8000.00",
"currency": "USD"
}'
Lalu ganti ESCROW_ID:
bash · siklus hidup escrow
curl -sS "https://YOUR_HOST/api/v1/escrow/contracts/ESCROW_ID" -b cookies.txt
curl -sS -X POST "https://YOUR_HOST/api/v1/escrow/ESCROW_ID/fund" \
-H "Content-Type: application/json" -b cookies.txt -d '{}'
curl -sS -X POST "https://YOUR_HOST/api/v1/escrow/ESCROW_ID/release" \
-H "Content-Type: application/json" -b cookies.txt -d '{}'
bash · status
curl -sS "https://YOUR_HOST/api/v1/status"
curl -sS "https://YOUR_HOST/readiness"