Error Handling

Handle errors at both the API layer and transaction-result layer.

API errors

HTTP statusMeaningRecommended action
400Validation or processing error.Fix request fields and retry only after correcting the payload.
401Missing or invalid API key.Confirm the X-Api-Key header.
403Account or permission issue.Contact your account manager.
500Processing-side error.Retry later or contact support if it persists.

Transaction declines

A processor decline may be returned inside a successful HTTP response.

If the API returns HTTP 200 but response_code is 200, treat the transaction as declined.

{
  "order_id": "700202",
  "response_code": 200,
  "gateway_response_code": "202",
  "gateway_response_description": "Insufficient funds"
}

Postback delivery failures

Postback delivery fails when your endpoint does not return HTTP 200.

Common causes:

CauseFix
Endpoint returns 401 or 403Allow the postback request or adjust endpoint authentication.
Endpoint returns 404Confirm the configured Postback URL.
Endpoint returns 500Check your server logs.
TimeoutReturn HTTP 200 quickly, then process complex work asynchronously.
Invalid SSLUse a valid HTTPS certificate.

Review delivery attempts here:

https://factoring.ltvx.dev/factoring-v1/postback-attempts