Orivanta PayDocs

Errors

The response envelope, every error code, and how to branch on them.

The envelope

Every JSON response — success or failure — shares one shape:

FieldTypeDescription
successbooleantrue for a successful request, false otherwise.
codestring"SUCCESS" on success; a specific error code otherwise — see below.
messagestringHuman-readable, currently in French regardless of your locale.
dataobject | nullThe actual payload on success. null on error, except VALIDATION_ERROR (see below).
timestampstringISO 8601, server local time.

Check success (or the HTTP status) to branch — don't infer failure from data being empty, since some successful 204 No Content responses have no body at all.

Error codes

HTTPcodeWhen
400VALIDATION_ERRORA field failed validation. data is a map of { fieldName: message } for every failing field — not just the first one.
400MALFORMED_JSONThe request body isn't valid JSON.
400CURRENCY_MISMATCHcurrency doesn't match what the application or provider expects.
400AMOUNT_BELOW_MINIMUMBelow the rail's configured minimum — see Supported rails.
400AMOUNT_ABOVE_MAXIMUMAbove the rail's configured maximum.
400INVALID_PARAMETERA query or path parameter has the wrong type.
401UNAUTHORIZEDMissing, malformed, or unrecognized credential — the same code for a missing X-API-KEY as for an invalid one.
403ACCESS_DENIEDAuthenticated, but not allowed to do this.
404PROVIDER_NOT_FOUNDpaymentMethod isn't a recognized, active provider code.
404TRANSACTION_NOT_FOUNDThe reference doesn't exist.
404ENTITY_NOT_FOUND / RESOURCE_NOT_FOUNDGeneric not-found, from a path that doesn't map to anything.
409API_KEY_ALREADY_ACTIVEYou already have an active API key on this application — see Authentication.
500INTERNAL_SERVER_ERRORUnhandled server error — including the idempotency race described in Idempotency. Retrying the identical request won't help; if you suspect a duplicate charge, check its status instead.

Example — validation failure

curl -X POST https://api.orivantapay.com/api/v1/pay-in/charge \
  -H "X-API-KEY: sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{ "currency": "XAF", "paymentMethod": "MTN_MOMO_CM", "payerAccount": "670000000" }'
{
  "success": false,
  "code": "VALIDATION_ERROR",
  "message": "Erreur de validation des données",
  "data": { "amount": "must not be null" },
  "timestamp": "2026-09-05T10:15:30.123"
}

Example — business error

{
  "success": false,
  "code": "PROVIDER_NOT_FOUND",
  "message": "Moyen de paiement 'FOO' introuvable.",
  "data": null,
  "timestamp": "2026-09-05T10:16:02.045"
}

What to retry, and what not to

  • 400 and 404 codes mean the request itself is the problem. Retrying the identical body reproduces the identical error — fix the data first.
  • 401/403 won't resolve by retrying either; fix the credential or the permission.
  • 500 is the only code here worth retrying at all, and only sequentially, with backoff — see Idempotency for why firing a second attempt concurrently is exactly the wrong move on the one endpoint that supports retrying safely.

On this page