---
title: "Request a direct recharge product — Anis Developers"
description: "Pay from this wallet for Anis staff to deliver the payout. Keep the same operation id if the answer is lost. Billing products (`billing`) are not available yet."
url: https://developers.anis.ly/reference/create-direct-recharge/
language: en
---

> Every page of this documentation: https://developers.anis.ly/llms.txt

[API reference](https://developers.anis.ly/reference.md) · Direct recharge

# Request a direct recharge product

`POST /v1/wallets/{walletId}/direct-recharges`

Pay from this wallet for Anis staff to deliver the payout. Keep the same operation id if the answer is lost. Billing products (`billing`) are not available yet.

- **Permission:** `direct_recharges:create`
- **Authentication:** Signed purchase
- **Anis’s answer:** Signed
- **Staff-set limits it counts toward:** All requests, Purchases (orders limit)
- **.NET SDK:** `anis.DirectRecharges.CreateAsync(walletId, operationId, request)`

- Every processing `202` contains exactly `operationId`, `operationType` and `status: "processing"`; `operationType` is `directRecharge`. Full operation reads use `200`.
- A missing operation read never proves absence. Retry the exact saved body with the same operation id and a fresh signature. A duplicate remains `202` during projection lag. Only a duplicate command on this retry, at or after 60 seconds since original admission, followed by an application-scoped read still not found, closes the operation with `idempotency_conflict` (`409`). A read miss or timeout alone never proves a conflict. That code does not prove nothing was charged: the first request may already have been accepted, so read the operation before any new attempt.
- This purchase counts toward the existing `orders` limit and the same daily application spending cap as card orders and other purchases.

## Parameters

| Name | In | Type | Notes |
| --- | --- | --- | --- |
| `walletId` (required) | `path` | UUID | A UUID, lower-case with hyphens. |

## Request

Signed with your key, with a one-time nonce, a digest of the body and your operation id as `Idempotency-Key`.

Headers: `Signature-Input`, `Signature`, `Content-Digest`, `Nonce`, `Idempotency-Key`, `X-Anis-Date`, `Accept-Language` (optional). The SDKs set all of them for you.

**Body:** [CreateDirectRechargeRequest](#type-createdirectrechargerequest), as JSON.

| Field | Type | Notes |
| --- | --- | --- |
| `productId` (required) | UUID | The selected direct recharge product id. |
| `payoutAmount` (required) | string | The desired payout amount string from the quote. |
| `expectedTotal` (required) | any | The total you confirmed from the package or quote, as LYD Money. The balance check is exact up to 999,999.999 LYD. |
| `recipient` (required) | list of [DirectRechargeRecipientInput](#type-directrechargerecipientinput) | The keyed recipient values validated against this direct recharge product. |
| `note` | string | Your optional note for this direct recharge. |
| `externalReference` | string | Your reference, included when supplied. |

## Responses

| Status | Meaning | Body |
| --- | --- | --- |
| 200 | Success. | [DirectRecharge](#type-directrecharge) |
| 202 | Accepted — no outcome yet. | [DirectRechargeAccepted](#type-directrechargeaccepted) |
| 400 | Refused: the signed request is badly built. | [Problem](#refusals) |
| 401 | Refused: not authenticated. | [Problem](#refusals) |
| 403 | Refused: not allowed. | [Problem](#refusals) |
| 404 | Refused: not found, or not yours. | [Problem](#refusals) |
| 409 | Refused: conflicts with the current state. | [Problem](#refusals) |
| 422 | Refused: the request breaks a rule. | [Problem](#refusals) |
| 429 | Refused: a limit was reached. | [Problem](#refusals) |
| 503 | No decision: a dependency was unavailable. | [Problem](#refusals) |

Every answer of this call is signed by Anis — success and every refusal. Require the signature and verify it before you act on the answer; an answer without one is a failure, never an answer ([how](https://developers.anis.ly/docs/verifying-answers.md)).

## Refusals

Every refusal of this call is a signed problem. Branch on its `code`; each links to what it means and what to do.

| Error | Code | Status |
| --- | --- | --- |
| [Invalid credentials](https://developers.anis.ly/errors/invalid-credentials.md) | `invalid_credentials` | 401 |
| [Malformed signed request](https://developers.anis.ly/errors/malformed-signed-request.md) | `malformed_signed_request` | 400 |
| [Insufficient scope](https://developers.anis.ly/errors/insufficient-scope.md) | `insufficient_scope` | 403 |
| [Source address not allowed](https://developers.anis.ly/errors/source-ip-not-allowed.md) | `source_ip_not_allowed` | 403 |
| [Rate limited](https://developers.anis.ly/errors/rate-limited.md) | `rate_limited` | 429 |
| [Validation failed](https://developers.anis.ly/errors/validation-failed.md) | `validation_failed` | 422 |
| [Service unavailable](https://developers.anis.ly/errors/dependency-unavailable.md) | `dependency_unavailable` | 503 |
| [Request timeout](https://developers.anis.ly/errors/request-timeout.md) | `request_timeout` | 504 |
| [Internal error](https://developers.anis.ly/errors/internal-error.md) | `internal_error` | 500 |
| [Account not authorised](https://developers.anis.ly/errors/binding-not-authorized.md) | `binding_not_authorized` | 403 |
| [Account inactive](https://developers.anis.ly/errors/account-inactive.md) | `account_inactive` | 403 |
| [Wallet not granted](https://developers.anis.ly/errors/wallet-not-granted.md) | `wallet_not_granted` | 404 |
| [Not found](https://developers.anis.ly/errors/resource-not-found.md) | `resource_not_found` | 404 |
| [Currency not supported](https://developers.anis.ly/errors/currency-not-supported.md) | `currency_not_supported` | 422 |
| [Wallet disabled](https://developers.anis.ly/errors/wallet-disabled.md) | `wallet_disabled` | 409 |
| [Wallet expired](https://developers.anis.ly/errors/wallet-expired.md) | `wallet_expired` | 409 |
| [Business subscription required](https://developers.anis.ly/errors/business-subscription-required.md) | `business_subscription_required` | 409 |
| [Replay detected](https://developers.anis.ly/errors/replay-detected.md) | `replay_detected` | 409 |
| [Operation id already used](https://developers.anis.ly/errors/idempotency-conflict.md) | `idempotency_conflict` | 409 |
| [Price changed](https://developers.anis.ly/errors/price-changed.md) | `price_changed` | 409 |
| [Insufficient balance](https://developers.anis.ly/errors/insufficient-balance.md) | `insufficient_balance` | 409 |
| [Spending cap reached](https://developers.anis.ly/errors/spending-limit-exceeded.md) | `spending_limit_exceeded` | 429 |
| [Direct recharge product unavailable](https://developers.anis.ly/errors/direct-recharge-product-unavailable.md) | `direct_recharge_product_unavailable` | 409 |
| [Amount outside limits](https://developers.anis.ly/errors/amount-out-of-range.md) | `amount_out_of_range` | 422 |
| [Purchase not allowed](https://developers.anis.ly/errors/purchase-not-allowed.md) | `purchase_not_allowed` | 403 |

## Types

### CreateDirectRechargeRequest

| Field | Type | Notes |
| --- | --- | --- |
| `productId` (required) | UUID | The selected direct recharge product id. |
| `payoutAmount` (required) | string | The desired payout amount string from the quote. |
| `expectedTotal` (required) | any | The total you confirmed from the package or quote, as LYD Money. The balance check is exact up to 999,999.999 LYD. |
| `recipient` (required) | list of [DirectRechargeRecipientInput](#type-directrechargerecipientinput) | The keyed recipient values validated against this direct recharge product. |
| `note` | string | Your optional note for this direct recharge. |
| `externalReference` | string | Your reference, included when supplied. |

### DirectRechargeRecipientInput

| Field | Type | Notes |
| --- | --- | --- |
| `key` (required) | string | The exact field key supplied by the direct recharge product definition. |
| `value` (required) | string | The submitted field value; a location choice uses its id. |

### DirectRecharge

| Field | Type | Notes |
| --- | --- | --- |
| `operationId` (required) | UUID | The same UUID sent as Idempotency-Key for this purchase. |
| `status` (required) | [DirectRechargeStatus](#type-directrechargestatus) | The merged customer-facing status; partial refunds add amounts rather than a new status. |
| `number` (required) | integer | The recorded direct recharge number. |
| `walletId` (required) | string | The wallet used for this purchase. |
| `product` (required) | [DirectRechargeProductReference](#type-directrechargeproductreference) | The purchased direct recharge product's id and title. |
| `payout` (required) | [DirectRechargePayout](#type-directrechargepayout) | The payout string and named currency; not the LYD Money shape. |
| `exchangeRate` (required) | string | The quoted exchange rate as a decimal string. |
| `price` (required) | [Money](#type-money) | The LYD price including applicable location and holder adjustments. |
| `commission` (required) | [Money](#type-money) | The LYD commission included in total. |
| `total` (required) | [Money](#type-money) | The total wallet cost, as LYD Money. The balance check is exact up to 999,999.999 LYD. |
| `recipient` (required) | list of [DirectRechargeRecipientValue](#type-directrechargerecipientvalue) | The saved recipient values and display labels. |
| `note` | string | Your optional note for this direct recharge. |
| `externalReference` | string | Your reference, included when supplied. |
| `requestedAt` (required) | string (date-time) | When the direct recharge was requested, in UTC. |
| `completedAt` | string (date-time) | The completion time when supplied, in UTC. |
| `proofUrl` | string | The recorded delivery proof URL when supplied; no access or expiry guarantee is stated. |
| `reason` | string | The reason for suspension or either rejected state. |
| `partialRefund` | [DirectRechargePartialRefund](#type-directrechargepartialrefund) | Settled partial-refund and remaining amounts; occurs only if partial refunds are enabled for the product. |

### DirectRechargeStatus

### DirectRechargeProductReference

| Field | Type | Notes |
| --- | --- | --- |
| `id` (required) | UUID | The selected direct recharge product id. |
| `title` (required) | string | The direct recharge product's display text. |

### DirectRechargePayout

| Field | Type | Notes |
| --- | --- | --- |
| `amount` (required) | string | The payout amount as a decimal string. |
| `currency` (required) | [DirectRechargeCurrency](#type-directrechargecurrency) | The payout currency display name object. |

### DirectRechargeCurrency

| Field | Type | Notes |
| --- | --- | --- |
| `name` (required) | string | The display name supplied for this item. |

### Money

| Field | Type | Notes |
| --- | --- | --- |
| `amount` (required) | string | A decimal string, never a JSON number. Wallet balances may be negative while allowed debt is used. Prices and totals follow each route's amount rules. |
| `currency` (required) | string | An uppercase three-letter currency code, such as `LYD`. Read a wallet’s currency from `balance.currency`. |
| `asOf` | string (date-time) | When this price or balance was read. |

### DirectRechargeRecipientValue

| Field | Type | Notes |
| --- | --- | --- |
| `key` (required) | string | The exact field key supplied by the direct recharge product definition. |
| `name` | [LocalizedText](#type-localizedtext) | The Arabic and English display labels, omitting empty languages. |
| `value` (required) | string | The submitted field value; a location choice uses its id. |
| `valueName` | string | The display name of a selected value, when supplied. |

### LocalizedText

| Field | Type | Notes |
| --- | --- | --- |
| `ar` | string | The Arabic text; omitted when empty. |
| `en` | string | The English text; omitted when empty. |

### DirectRechargePartialRefund

| Field | Type | Notes |
| --- | --- | --- |
| `refundedPayout` (required) | string | The refunded or remaining payout as a string in the product currency. |
| `refundedTotal` (required) | [Money](#type-money) | The refunded or remaining LYD wallet amount. |
| `remainingPayout` (required) | string | The refunded or remaining payout as a string in the product currency. |
| `remainingTotal` (required) | [Money](#type-money) | The refunded or remaining LYD wallet amount. |

### DirectRechargeAccepted

| Field | Type | Notes |
| --- | --- | --- |
| `operationId` (required) | UUID | The same UUID sent as Idempotency-Key for this purchase. |
| `operationType` (required) | string | Always directRecharge. Values: `directRecharge` |
| `status` (required) | string | Always processing; the outcome is not final. Values: `processing` |
