API Documentation
Integrasikan EquiPay Payment Gateway ke dalam aplikasi Anda dengan mudah.
Introductions
Selamat datang di EquiPay API. API ini memungkinkan Anda untuk mengintegrasikan sistem pembayaran digital secara langsung ke dalam aplikasi Anda — membuat invoice, memproses withdrawal, memantau saldo, dan mengelola profil merchant.
Base URL
Format Response
Semua response API menggunakan format JSON dengan struktur:
{
"status": true,
"message": "Pesan keterangan",
"data": { ... }
}
ℹ️ Info: Semua endpoint memerlukan autentikasi header X-Equipay-ID dan X-Equipay-Key.
Error Codes
| Status Code | Deskripsi |
|---|---|
200 | Request berhasil |
201 | Resource berhasil dibuat |
400 | Parameter tidak valid |
401 | API credentials tidak valid |
403 | IP tidak diizinkan atau project belum approved |
404 | Resource tidak ditemukan |
500 | Server error |
Authentication
Setiap request wajib menyertakan dua header autentikasi. Kredensial ini bisa Anda dapatkan di dashboard EquiPay pada menu API Credentials.
Required Headers
| Header | Deskripsi |
|---|---|
X-Equipay-ID |
API ID unik milik project Anda. |
X-Equipay-Key |
API Key rahasia (jangan pernah dibagikan). |
⚠️ Penting: IP address server Anda harus terdaftar di whitelist dashboard EquiPay. Request dari IP yang tidak terdaftar akan ditolak dengan status 403.
Contoh Autentikasi
curl -X GET "https://api.equipay.web.id/api/v1/profile" \ -H "X-Equipay-ID: your_api_id" \ -H "X-Equipay-Key: your_api_key"
import requests headers = { "X-Equipay-ID": "your_api_id", "X-Equipay-Key": "your_api_key" } response = requests.get( "https://api.equipay.web.id/api/v1/profile", headers=headers ) print(response.json())
const headers = { "X-Equipay-ID": "your_api_id", "X-Equipay-Key": "your_api_key" }; const response = await fetch( "https://api.equipay.web.id/api/v1/profile", { headers } ); const data = await response.json(); console.log(data);
Invoice
Endpoint untuk membuat, mengambil detail, dan membatalkan invoice pembayaran. Mendukung provider gopay dan shopee.
ℹ️ Info: Setiap invoice dikenakan biaya layanan (fee) otomatis yang ditambahkan ke total pembayaran. Nominal invoice yang Anda tentukan adalah jumlah bersih yang akan diterima, sedangkan QRIS menagihkan amount + fee. Nominal minimal Rp 1.000 dan maksimal Rp 1.000.000.
1. Create Invoice
Query Parameters:
| Parameter | Tipe | Wajib | Deskripsi |
|---|---|---|---|
amount |
integer | YES | Nominal bersih invoice (min Rp 1.000, max Rp 1.000.000) |
provider |
string | NO | Provider pembayaran: gopay (default) atau shopee |
curl -X POST "https://api.equipay.web.id/api/v1/invoice/create?amount=50000&provider=gopay" \ -H "X-Equipay-ID: your_api_id" \ -H "X-Equipay-Key: your_api_key"
import requests headers = { "X-Equipay-ID": "your_api_id", "X-Equipay-Key": "your_api_key" } params = { "amount": 50000, "provider": "gopay" } response = requests.post( "https://api.equipay.web.id/api/v1/invoice/create", headers=headers, params=params ) print(response.json())
const headers = { "X-Equipay-ID": "your_api_id", "X-Equipay-Key": "your_api_key" }; const params = new URLSearchParams({ amount: "50000", provider: "gopay" }); const response = await fetch( `https://api.equipay.web.id/api/v1/invoice/create?${params}`, { method: "POST", headers } ); const data = await response.json(); console.log(data);
{
"status": true,
"message": "Invoice berhasil dibuat.",
"data": {
"id": "a1b2c3d4-5678-90ef-ghij-klmnopqrstuv",
"reference": "EQ-123456",
"amount": 50000,
"fee": 250,
"total_amount": 50250,
"provider": "gopay",
"payment_url": "https://qris.example.com/xxx",
"qris_string": "00020101021226...",
"status": "pending",
"expires_at": "2024-01-01T12:15:00.000Z",
"created_at": "2024-01-01T12:00:00.000Z"
}
}
2. Get Invoice Detail
curl -X GET "https://api.equipay.web.id/api/v1/invoice/a1b2c3d4-5678" \ -H "X-Equipay-ID: your_api_id" \ -H "X-Equipay-Key: your_api_key"
import requests headers = { "X-Equipay-ID": "your_api_id", "X-Equipay-Key": "your_api_key" } invoice_id = "a1b2c3d4-5678" response = requests.get( f"https://api.equipay.web.id/api/v1/invoice/{invoice_id}", headers=headers ) print(response.json())
const headers = { "X-Equipay-ID": "your_api_id", "X-Equipay-Key": "your_api_key" }; const invoiceId = "a1b2c3d4-5678"; const response = await fetch( `https://api.equipay.web.id/api/v1/invoice/${invoiceId}`, { headers } ); const data = await response.json(); console.log(data);
{
"status": true,
"data": {
"id": "a1b2c3d4-5678-90ef-ghij-klmnopqrstuv",
"reference": "EQ-123456",
"amount": 50000,
"fee": 250,
"total_amount": 50250,
"status": "paid",
"provider": "gopay",
"payment_url": "https://qris.example.com/xxx",
"expires_at": "2024-01-01T12:15:00.000Z",
"created_at": "2024-01-01T12:00:00.000Z",
"updated_at": "2024-01-01T12:05:00.000Z"
}
}
3. Cancel Invoice
curl -X POST "https://api.equipay.web.id/api/v1/invoice/a1b2c3d4-5678/cancel" \ -H "X-Equipay-ID: your_api_id" \ -H "X-Equipay-Key: your_api_key"
import requests headers = { "X-Equipay-ID": "your_api_id", "X-Equipay-Key": "your_api_key" } invoice_id = "a1b2c3d4-5678" response = requests.post( f"https://api.equipay.web.id/api/v1/invoice/{invoice_id}/cancel", headers=headers ) print(response.json())
const headers = { "X-Equipay-ID": "your_api_id", "X-Equipay-Key": "your_api_key" }; const invoiceId = "a1b2c3d4-5678"; const response = await fetch( `https://api.equipay.web.id/api/v1/invoice/${invoiceId}/cancel`, { method: "POST", headers } ); const data = await response.json(); console.log(data);
{
"status": true,
"message": "Invoice berhasil dibatalkan.",
"data": {
"id": "a1b2c3d4-5678-90ef-ghij-klmnopqrstuv",
"reference": "EQ-123456",
"amount": 50000,
"fee": 250,
"total_amount": 50250,
"status": "cancelled",
"updated_at": "2024-01-01T12:10:00.000Z"
}
}
Withdrawal
Endpoint untuk mengajukan penarikan dana (withdrawal) dari saldo merchant ke rekening bank.
1. Create Withdrawal
Query Parameters:
| Parameter | Tipe | Wajib | Deskripsi |
|---|---|---|---|
amount |
integer | YES | Nominal withdrawal (max Rp 1.000.000) |
reference |
string | YES | Reference unik (maks 100 karakter) |
bank_code |
string | YES | Kode bank (contoh: bca, bni, bri) |
account_number |
string | YES | Nomor rekening tujuan |
account_name |
string | YES | Nama pemilik rekening |
curl -X POST "https://api.equipay.web.id/api/v1/withdrawal/create?amount=100000&reference=WD-001&bank_code=bca&account_number=1234567890&account_name=John%20Doe" \ -H "X-Equipay-ID: your_api_id" \ -H "X-Equipay-Key: your_api_key"
import requests headers = { "X-Equipay-ID": "your_api_id", "X-Equipay-Key": "your_api_key" } params = { "amount": 100000, "reference": "WD-001", "bank_code": "bca", "account_number": "1234567890", "account_name": "John Doe" } response = requests.post( "https://api.equipay.web.id/api/v1/withdrawal/create", headers=headers, params=params ) print(response.json())
const headers = { "X-Equipay-ID": "your_api_id", "X-Equipay-Key": "your_api_key" }; const params = new URLSearchParams({ amount: "100000", reference: "WD-001", bank_code: "bca", account_number: "1234567890", account_name: "John Doe" }); const response = await fetch( `https://api.equipay.web.id/api/v1/withdrawal/create?${params}`, { method: "POST", headers } ); const data = await response.json(); console.log(data);
{
"status": true,
"message": "Permintaan withdrawal berhasil diajukan.",
"data": {
"id": "wd-uuid-12345",
"reference": "WD-001",
"provider": "bca",
"nomor_rekening": "1234567890",
"nama_penerima": "John Doe",
"nominal": 100000,
"fee": 0,
"total_diterima": 100000,
"status": "pending",
"created_at": "2024-01-01T12:00:00.000Z"
}
}
2. Get Withdrawal Status
curl -X GET "https://api.equipay.web.id/api/v1/withdrawal/wd-uuid-12345" \ -H "X-Equipay-ID: your_api_id" \ -H "X-Equipay-Key: your_api_key"
import requests headers = { "X-Equipay-ID": "your_api_id", "X-Equipay-Key": "your_api_key" } withdrawal_id = "wd-uuid-12345" response = requests.get( f"https://api.equipay.web.id/api/v1/withdrawal/{withdrawal_id}", headers=headers ) print(response.json())
const headers = { "X-Equipay-ID": "your_api_id", "X-Equipay-Key": "your_api_key" }; const withdrawalId = "wd-uuid-12345"; const response = await fetch( `https://api.equipay.web.id/api/v1/withdrawal/${withdrawalId}`, { headers } ); const data = await response.json(); console.log(data);
{
"status": true,
"data": {
"id": "wd-uuid-12345",
"reference": "WD-001",
"nominal": 100000,
"fee": 0,
"total_diterima": 100000,
"status": "success",
"created_at": "2024-01-01T12:00:00.000Z",
"updated_at": "2024-01-01T12:05:00.000Z"
}
}
Balance
Endpoint untuk mengecek saldo merchant yang tersedia.
curl -X GET "https://api.equipay.web.id/api/v1/balance" \ -H "X-Equipay-ID: your_api_id" \ -H "X-Equipay-Key: your_api_key"
import requests headers = { "X-Equipay-ID": "your_api_id", "X-Equipay-Key": "your_api_key" } response = requests.get( "https://api.equipay.web.id/api/v1/balance", headers=headers ) print(response.json())
const headers = { "X-Equipay-ID": "your_api_id", "X-Equipay-Key": "your_api_key" }; const response = await fetch( "https://api.equipay.web.id/api/v1/balance", { headers } ); const data = await response.json(); console.log(data);
{
"status": true,
"data": {
"available_balance": 250000,
"currency": "IDR"
}
}
Profile
Endpoint untuk mengambil data profil merchant.
curl -X GET "https://api.equipay.web.id/api/v1/profile" \ -H "X-Equipay-ID: your_api_id" \ -H "X-Equipay-Key: your_api_key"
import requests headers = { "X-Equipay-ID": "your_api_id", "X-Equipay-Key": "your_api_key" } response = requests.get( "https://api.equipay.web.id/api/v1/profile", headers=headers ) print(response.json())
const headers = { "X-Equipay-ID": "your_api_id", "X-Equipay-Key": "your_api_key" }; const response = await fetch( "https://api.equipay.web.id/api/v1/profile", { headers } ); const data = await response.json(); console.log(data);
{
"status": true,
"data": {
"id": "user-uuid",
"username": "johndoe",
"full_name": "John Doe",
"email": "john@example.com",
"is_verified": true,
"created_at": "2024-01-01T12:00:00.000Z"
}
}