<!-- ZenPays documentation · https://docs.zenpayz.com/docs/reference/objects/wallet-transaction -->

# The WalletTransaction object

Represents a transaction in the merchant's wallet. Wallet transactions track all movements of funds including credits from payments, debits from payouts, and adjustments.

## Fields

<ParamTable
  label="Field"
  rows={[
    { name: "id", type: "string", required: true, desc: "Unique identifier for the wallet transaction" },
    { name: "merchantId", type: "string", required: true, desc: "ID of the merchant whose wallet was affected" },
    { name: "type", type: "'credit' | 'debit' | 'adjustment' | 'settlement' | 'fee' | 'refund'", required: true, desc: "Type of wallet transaction" },
    { name: "amount", type: "number", required: true, desc: "Transaction amount in the smallest currency unit" },
    { name: "currency", type: "string", required: true, desc: "Three-letter ISO currency code" },
    { name: "balance", type: "number", required: true, desc: "Wallet balance after this transaction" },
    { name: "description", type: "string", required: true, desc: "Human-readable description of the transaction" },
    { name: "referenceId", type: "string", required: false, desc: "ID of the related resource (payment, refund, etc.)" },
    { name: "referenceType", type: "'payment' | 'refund' | 'payout' | 'settlement' | 'adjustment'", required: false, desc: "Type of the related resource" },
    { name: "metadata", type: "Record<string, unknown>", required: false, desc: "Custom key-value data attached to the transaction" },
    { name: "createdAt", type: "string", required: true, desc: "ISO 8601 timestamp when the transaction occurred" },
  ]}
/>

## Example

```json
{
  "id": "obj_1a2b3c",
  "merchantId": "merchant_1a2b3c",
  "type": "credit",
  "amount": 5000,
  "currency": "USD",
  "balance": 1,
  "description": "string",
  "referenceId": "reference_1a2b3c",
  "createdAt": "2026-01-15T09:30:00Z"
}
```
