> ## Documentation Index
> Fetch the complete documentation index at: https://alguna.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Credit Wallet

Add funds to a wallet. Use this for manual adjustments or promotional credits.

<ParamField path="id" type="string" required>
  The wallet ID.
</ParamField>

<ParamField body="amount" type="string" required>
  Amount to credit as a decimal string (e.g., "100.00").
</ParamField>

<ParamField body="transactionType" type="string" required>
  Type of credit transaction. Common values: `manual_adjustment`, `promotional`, `refund`.
</ParamField>

<ParamField body="referenceId" type="string" required>
  External reference ID for tracking (e.g., your internal transaction ID).
</ParamField>

<ParamField body="description" type="string" required>
  Description of the credit for record-keeping.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.alguna.io/wallets/wal_def456/credit \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "amount": "100.00",
      "transactionType": "promotional",
      "referenceId": "promo_jan2024",
      "description": "January promotional credit"
    }'
  ```

  ```javascript Node.js theme={null}
  const wallet = await alguna.wallets.credit('wal_def456', {
    amount: '100.00',
    transactionType: 'promotional',
    referenceId: 'promo_jan2024',
    description: 'January promotional credit'
  });
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "id": "wal_def456",
    "accountId": "acc_abc123",
    "name": "Prepaid Credits",
    "currency": "USD",
    "currentBalance": "600.00",
    "active": true,
    "productIds": [],
    "createdAt": "2024-01-20T10:00:00Z",
    "updatedAt": "2024-01-21T10:00:00Z"
  }
  ```
</ResponseExample>
