API reference · Direct recharge
Correct a suspended recipient
/v1/direct-recharges/{operationId}/recipientSend 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.
direct_recharges:createanis.DirectRecharges.UpdateRecipientAsync(operationId, request)- Sign the JSON body digest with a fresh nonce, without an
Idempotency-Key. A successful correction returns signed202 AcceptedwithLocation: /v1/direct-recharges/{operationId}and onlyoperationId,operationType: "directRecharge"andstatus: "processing". It carries no direct recharge or order body. Read that location or wait for a webhook before resending an already-applied correction.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
operationIdrequired | path | UUID | A 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.
| Field | Type | Notes |
|---|---|---|
recipientrequired | list of DirectRechargeRecipientInput | Send the complete corrected recipient list. It replaces the saved list; include required fields and optional values you want to retain, including recipient_location. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 202 | Accepted — no outcome yet. | DirectRechargeAccepted |
| 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 |
| 409 | Refused: conflicts with the current state. | Problem |
| 422 | Refused: the request breaks a rule. | Problem |
| 429 | Refused: a limit was reached. | Problem |
| 503 | No 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.
| 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 |
| Replay detected | replay_detected | 409 |
| Not found | resource_not_found | 404 |
| Recipient cannot be changed now | direct_recharge_not_suspended | 409 |
Types
UpdateDirectRechargeRecipientRequest
| Field | Type | Notes |
|---|---|---|
recipientrequired | list of DirectRechargeRecipientInput | Send the complete corrected recipient list. It replaces the saved list; include required fields and optional values you want to retain, including recipient_location. |
DirectRechargeRecipientInput
| Field | Type | Notes |
|---|---|---|
keyrequired | string | The exact field key supplied by the direct recharge product definition. |
valuerequired | string | The submitted field value; a location choice uses its id. |
DirectRechargeAccepted
| Field | Type | Notes |
|---|---|---|
operationIdalways present | UUID | The same UUID sent as Idempotency-Key for this purchase. |
operationTypealways present | string | Always directRecharge. Values: directRecharge |
statusalways present | string | Always processing; the outcome is not final. Values: processing |