API reference · Direct recharge

Correct a suspended recipient

PATCH/v1/direct-recharges/{operationId}/recipient

Send the complete corrected recipient list while the direct recharge is suspendedDataError. It replaces the saved list, including optional values you want to retain. A successful correction returns signed 202 Accepted with Location and the standard three-member processing acknowledgement, without an direct recharge or order body; follow it to read the direct recharge.

Permissiondirect_recharges:create
AuthenticationSigned change
Anis’s answerSigned
Staff-set limits it counts towardAll requests
.NET SDKanis.DirectRecharges.UpdateRecipientAsync(operationId, request)
  • Sign the JSON body digest with a fresh nonce, without an Idempotency-Key. A successful correction returns signed 202 Accepted with Location: /v1/direct-recharges/{operationId} and only operationId, operationType: "directRecharge" and status: "processing". It carries no direct recharge or order body. Read that location or wait for a webhook before resending an already-applied correction.

Parameters

NameInTypeNotes
operationIdrequiredpathUUIDA UUID, lower-case with hyphens.

Request

Signed with your key, with a one-time nonce and a digest of the body.

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

Body: UpdateDirectRechargeRecipientRequest, as JSON.

FieldTypeNotes
recipientrequiredlist of DirectRechargeRecipientInputSend the complete corrected recipient list. It replaces the saved list; include required fields and optional values you want to retain, including recipient_location.

Responses

StatusMeaningBody
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
Replay detectedreplay_detected409
Not foundresource_not_found404
Recipient cannot be changed nowdirect_recharge_not_suspended409

Types

UpdateDirectRechargeRecipientRequest

FieldTypeNotes
recipientrequiredlist of DirectRechargeRecipientInputSend the complete corrected recipient list. It replaces the saved list; include required fields and optional values you want to retain, including recipient_location.

DirectRechargeRecipientInput

FieldTypeNotes
keyrequiredstringThe exact field key supplied by the direct recharge product definition.
valuerequiredstringThe submitted field value; a location choice uses its id.

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