API reference · Direct recharge
Get my direct recharges
GET
/v1/wallets/{walletId}/direct-rechargesFind this application's operations in an authorized wallet by status and date.
Permission
direct_recharges:readAuthenticationSigned read
Anis’s answerNot signed
Staff-set limits it counts towardAll requests
.NET SDK
anis.DirectRecharges.GetDirectRechargesAsync(walletId, query)- Only your application's operations in this authorized wallet are returned, newest first. Filters combine:
status(awaitingPayment|paymentFailed|pending|inProgress|suspendedDataError|completed|rejectedAwaitingRefund|rejectedWithRefund),productIdUUID,from/toin UTC,cursor(at most 2048 characters), and optionalpageSize(default 50, range 1–100). Request at most 31 days; absent dates select the last 31 days. PassnextCursorunchanged with the same filters and page size until it is null. Correct filters or the cursor aftervalidation_failed(422); never repeat a purchase to recover a list. - Statuses match the signed detail read;
hasPartialRefundrecords partial refunds without adding a status. Recipient fields and proof remain on the signed detail read. This list never returns a processing202.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
walletIdrequired | path | UUID | A UUID, lower-case with hyphens. |
statusoptional | query | DirectRechargeStatus | Optional merged status: awaitingPayment, paymentFailed, pending, inProgress, suspendedDataError, completed, rejectedAwaitingRefund or rejectedWithRefund. |
productIdoptional | query | UUID | Optional direct recharge product UUID filter. |
fromoptional | query | string | Optional inclusive UTC period bound; request at most 31 days. Absent bounds select the last 31 days. |
tooptional | query | string | Optional inclusive UTC period bound; request at most 31 days. Absent bounds select the last 31 days. |
cursoroptional | query | string | The nextCursor of the previous page, passed back exactly as received. Leave it out for the first page. |
pageSizeoptional | query | integer | Optional page size from 1 to 100; default 50. |
Request
Signed with your key. No body, no nonce.
Headers: Signature-Input, Signature, X-Anis-Date, Accept-Language (optional). The SDKs set all of them for you.
Body: none.
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Success. | DirectRechargeCollection |
| 400 | Refused: the signed request is badly built. | Problem |
| 401 | Refused: not authenticated. | Problem |
| 403 | Refused: not allowed. | Problem |
| 404 | Refused: not found, or not yours. | Problem |
| 422 | Refused: the request breaks a rule. | Problem |
| 429 | Refused: a limit was reached. | Problem |
| 503 | No decision: a dependency was unavailable. | Problem |
The answers of this call are not signed — no Signature or Signature-Input header, success or refusal. There is nothing to verify; TLS protects them. Content-Digest and X-Request-Id are still present.
Refusals
A refusal of this call is a problem without a signature. Branch on its code; each links to what it means and what to do.
| Error | Code | Status |
|---|---|---|
| Invalid credentials | invalid_credentials | 401 |
| Malformed signed request | malformed_signed_request | 400 |
| Insufficient scope | insufficient_scope | 403 |
| Source address not allowed | source_ip_not_allowed | 403 |
| Rate limited | rate_limited | 429 |
| Validation failed | validation_failed | 422 |
| Service unavailable | dependency_unavailable | 503 |
| Request timeout | request_timeout | 504 |
| Internal error | internal_error | 500 |
| Account not authorised | binding_not_authorized | 403 |
| Account inactive | account_inactive | 403 |
| Wallet not granted | wallet_not_granted | 404 |
| Not found | resource_not_found | 404 |
| Currency not supported | currency_not_supported | 422 |
Types
DirectRechargeCollection
| Field | Type | Notes |
|---|---|---|
itemsalways present | list of DirectRechargeSummary | The records on this page. |
nextCursoralways present | string | Pass this opaque value unchanged as cursor; null marks the last page. |
DirectRechargeSummary
| Field | Type | Notes |
|---|---|---|
operationIdalways present | UUID | The same UUID sent as Idempotency-Key for this purchase. |
statusalways present | DirectRechargeStatus | The merged customer-facing status; partial refunds add amounts rather than a new status. |
numberalways present | integer | The recorded direct recharge number. |
productalways present | DirectRechargeProductReference | The purchased direct recharge product's id and title. |
payoutalways present | DirectRechargePayout | The payout string and named currency; not the LYD Money shape. |
totalalways present | Money | The total wallet cost, as LYD Money. The balance check is exact up to 999,999.999 LYD. |
externalReference | string | Your reference, included when supplied. |
requestedAtalways present | string (date-time) | When the direct recharge was requested, in UTC. |
completedAt | string (date-time) | The completion time when supplied, in UTC. |
hasPartialRefundalways present | boolean | Whether a settled partial refund exists, including false; it does not add a new status. |
DirectRechargeStatus
DirectRechargeProductReference
| Field | Type | Notes |
|---|---|---|
idalways present | UUID | The selected direct recharge product id. |
titlealways present | string | The direct recharge product's display text. |
DirectRechargePayout
| Field | Type | Notes |
|---|---|---|
amountalways present | string | The payout amount as a decimal string. |
currencyalways present | DirectRechargeCurrency | The payout currency display name object. |
DirectRechargeCurrency
| Field | Type | Notes |
|---|---|---|
namealways present | string | The display name supplied for this item. |
Money
| Field | Type | Notes |
|---|---|---|
amountalways present | 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. |
currencyalways present | 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. |