API reference · Direct recharge

Read a direct recharge

GET/v1/direct-recharges/{operationId}

Follow payment, delivery, recipient corrections and settled refunds for a direct recharge your application requested.

Permissiondirect_recharges:read
AuthenticationSigned read
Anis’s answerSigned
Staff-set limits it counts towardAll requests
.NET SDKanis.DirectRecharges.GetAsync(operationId)
  • Every processing 202 contains exactly operationId, operationType and status: "processing"; operationType is directRecharge. Full operation reads use 200.
  • A create that was refused and recorded as refused never produced a direct recharge: the read answers that recorded refusal (409 or 422) with Idempotency-Replayed: true, and nothing was charged. On a read, idempotency_conflict means no direct recharge of this application exists under the id.

Parameters

NameInTypeNotes
operationIdrequiredpathUUIDA UUID, lower-case with hyphens.

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

StatusMeaningBody
200Success.DirectRecharge
202Accepted — no outcome yet.DirectRechargeAccepted
400Refused: the signed request is badly built.Problem
401Refused: not authenticated.Problem
403Refused: not allowed.Problem
404Refused: not found, or not yours.Problem
409Refused: conflicts with the current state.Problem
422Refused: the request breaks a rule.Problem
429Refused: a limit was reached.Problem
503No decision: a dependency was unavailable.Problem

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).

Refusals

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

ErrorCodeStatus
Invalid credentialsinvalid_credentials401
Malformed signed requestmalformed_signed_request400
Insufficient scopeinsufficient_scope403
Source address not allowedsource_ip_not_allowed403
Rate limitedrate_limited429
Validation failedvalidation_failed422
Service unavailabledependency_unavailable503
Request timeoutrequest_timeout504
Internal errorinternal_error500
Not foundresource_not_found404
Insufficient balanceinsufficient_balance409
Price changedprice_changed409
Direct recharge product unavailabledirect_recharge_product_unavailable409
Amount outside limitsamount_out_of_range422
Operation id already usedidempotency_conflict409

Types

DirectRecharge

FieldTypeNotes
operationIdalways presentUUIDThe same UUID sent as Idempotency-Key for this purchase.
statusalways presentDirectRechargeStatusThe merged customer-facing status; partial refunds add amounts rather than a new status.
numberalways presentintegerThe recorded direct recharge number.
walletIdalways presentstringThe wallet used for this purchase.
productalways presentDirectRechargeProductReferenceThe purchased direct recharge product's id and title.
payoutalways presentDirectRechargePayoutThe payout string and named currency; not the LYD Money shape.
exchangeRatealways presentstringThe quoted exchange rate as a decimal string.
pricealways presentMoneyThe LYD price including applicable location and holder adjustments.
commissionalways presentMoneyThe LYD commission included in total.
totalalways presentMoneyThe total wallet cost, as LYD Money. The balance check is exact up to 999,999.999 LYD.
recipientalways presentlist of DirectRechargeRecipientValueThe saved recipient values and display labels.
notestringYour optional note for this direct recharge.
externalReferencestringYour reference, included when supplied.
requestedAtalways presentstring (date-time)When the direct recharge was requested, in UTC.
completedAtstring (date-time)The completion time when supplied, in UTC.
proofUrlstringThe recorded delivery proof URL when supplied; no access or expiry guarantee is stated.
reasonstringThe reason for suspension or either rejected state.
partialRefundDirectRechargePartialRefundSettled partial-refund and remaining amounts; occurs only if partial refunds are enabled for the product.

DirectRechargeStatus

DirectRechargeProductReference

FieldTypeNotes
idalways presentUUIDThe selected direct recharge product id.
titlealways presentstringThe direct recharge product's display text.

DirectRechargePayout

FieldTypeNotes
amountalways presentstringThe payout amount as a decimal string.
currencyalways presentDirectRechargeCurrencyThe payout currency display name object.

DirectRechargeCurrency

FieldTypeNotes
namealways presentstringThe display name supplied for this item.

Money

FieldTypeNotes
amountalways presentstringA 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 presentstringAn uppercase three-letter currency code, such as LYD. Read a wallet’s currency from balance.currency.
asOfstring (date-time)When this price or balance was read.

DirectRechargeRecipientValue

FieldTypeNotes
keyalways presentstringThe exact field key supplied by the direct recharge product definition.
nameLocalizedTextThe Arabic and English display labels, omitting empty languages.
valuealways presentstringThe submitted field value; a location choice uses its id.
valueNamestringThe display name of a selected value, when supplied.

LocalizedText

FieldTypeNotes
arstringThe Arabic text; omitted when empty.
enstringThe English text; omitted when empty.

DirectRechargePartialRefund

FieldTypeNotes
refundedPayoutalways presentstringThe refunded or remaining payout as a string in the product currency.
refundedTotalalways presentMoneyThe refunded or remaining LYD wallet amount.
remainingPayoutalways presentstringThe refunded or remaining payout as a string in the product currency.
remainingTotalalways presentMoneyThe refunded or remaining LYD wallet amount.

DirectRechargeAccepted

FieldTypeNotes
operationIdalways presentUUIDThe same UUID sent as Idempotency-Key for this purchase.
operationTypealways presentstringAlways directRecharge. Values: directRecharge
statusalways presentstringAlways processing; the outcome is not final. Values: processing