Collection: wallet_transactions
Menyimpan semua transaksi wallet — deposit, withdraw, fee, refund.
Struktur Dokumen
{
"_id": "uuid-string",
"wallet_id": "uuid-string",
"type": "withdraw",
"amount": 100000,
"status": "SUCCESS",
"fees": {
"service_fee": 5000,
"doku_fee": 3000
},
"bank_account": {
"bank_code": "BCA",
"account_number": "1234567890",
"account_name": "John Doe"
},
"doku_payout_invoice": "INV-20260625-abc123",
"service_fee_transfer": {
"invoice": "TRF-20260625-def456",
"amount": 5000,
"destination": "SAC-xxxx-xxxxxxxxxxxxx",
"status": "SUCCESS",
"transferred_at": "2026-06-25T14:30:00.000000Z"
},
"balance_check_info": {
"doku_balance": 200000,
"required_amount": 100000,
"shortfall": 0
},
"processed_by": "admin@dazo.id",
"processing_started_at": "2026-06-25T14:29:00.000000Z",
"completed_at": "2026-06-25T14:30:00.000000Z",
"rejected_by": null,
"rejection_reason": null,
"created_at": "2026-06-25T14:00:00.000000Z",
"updated_at": "2026-06-25T14:30:00.000000Z"
}Field
| Field | Type | Deskripsi |
|---|---|---|
_id | string (UUID) | Primary key |
wallet_id | string (UUID) | Foreign key ke wallets._id |
type | string | Tipe transaksi: deposit, withdraw, fee, refund |
amount | int | Jumlah transaksi |
status | string | Status: PENDING, PROCESSING, SUCCESS, REJECTED, FAILED |
fees | object | Fee breakdown |
fees.service_fee | int | Service fee Dazo |
fees.doku_fee | int | Fee DOKU |
bank_account | object | Rekening tujuan (untuk withdraw) |
doku_payout_invoice | string | Invoice DOKU payout |
service_fee_transfer | object | Info transfer service fee |
balance_check_info | object | Info balance check (jika gagal) |
processed_by | string | Email admin yang proses |
processing_started_at | DateTime | Waktu mulai diproses |
completed_at | DateTime | Waktu selesai |
rejected_by | string | Email admin yang reject |
rejection_reason | string | Alasan reject |
Status Flow
PENDING → PROCESSING → SUCCESS
│ │
│ └→ FAILED (DOKU error)
│
└→ REJECTED (admin reject)Query Umum
// Withdraw pending
db.wallet_transactions.find({ type: "withdraw", status: "PENDING" })
// Withdraw processing (stuck >1 jam)
db.wallet_transactions.find({
status: "PROCESSING",
processing_started_at: { $lt: ISODate("2026-06-25T13:00:00Z") }
})
// Failed service fee transfer
db.wallet_transactions.find({
"service_fee_transfer.status": "FAILED"
})