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

# Credit funds

> Credit a deposit in Social Trading after the CRM has confirmed it.

`POST /api/v1/wallet/external/deposit` credits funds directly to the user's social wallet.

> [!WARNING]
>
> This endpoint does not initiate a payment. Call it only after the CRM has validated and confirmed the incoming transaction.

## Request

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST "https://social-api.example.com/api/v1/wallet/external/deposit" \
  -H "Authorization: Bearer YOUR_CRM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "external_reference": "crm-user-127",
    "amount": "100.00",
    "currency": "USD",
    "wallet_code": "PAMM_SOCIAL_USD",
    "idempotency_key": "crm-deposit-985421",
    "external_provider": "CRM",
    "external_transaction_reference": "CRM-DEP-985421",
    "description": "Deposit to Social Trading wallet",
    "metadata_json": {
      "crm_transaction_id": "CRM-DEP-985421",
      "source": "external_crm"
    }
  }'
```

## Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "result": "COMPLETED",
  "user_id": 42,
  "external_reference": "crm-user-127",
  "wallet_account_id": 105,
  "wallet_code": "PAMM_SOCIAL_USD",
  "transaction_id": 7201,
  "ledger_entry_id": 9105,
  "amount": "100.00000000",
  "currency": "USD",
  "balance": "350.00000000",
  "available_balance": "320.00000000",
  "hold_balance": "30.00000000",
  "completed_at": "2026-07-22T18:10:00Z"
}
```

| Result | CRM action |
| - | - |
| `COMPLETED` | Mark the credit as applied. |
| `ALREADY_PROCESSED` | Treat the retry as successful; do not create another deposit. |

Store the `transaction_id`, `idempotency_key`, and immutable transaction reference for reconciliation.

> [card] [Previous: Retrieve the wallet](https://crm-social.exuratech.com/guides/wallet.md)
>
> Review how to obtain the current balance.

> [card] [Next: Debit funds](https://crm-social.exuratech.com/guides/withdrawals.md)
>
> Implement the withdrawal workflow.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.