Payclave developers
Errors and troubleshooting
Interpret API and SDK errors and choose a recovery action.
Read the HTTP status and error code
API failures use success:false, error.code, error.message, optional details, and meta.requestId. Keep the machine code and request ID in server logs. Do not depend on exact human message wording or assume an unknown future error code is success.
| Status | Recovery |
|---|---|
| 400 / 422 | Correct the request fields, amount, or validation issue before retrying. |
| 401 | Check the credential and authentication header. Never log the secret. |
| 403 | Check merchant access, key type, and permission. Do not bypass it with a more powerful browser credential. |
| 404 | Check the returned ID, merchant ownership, and test/live mode. |
| 409 | Read the current record and resolve version, reservation, or idempotency conflicts. |
| 429 | Honor Retry-After and reduce request concurrency. |
| 5xx / network timeout | Treat the outcome as uncertain. Retry only under the route's idempotency contract. |
Handle errors in your SDK integration
Catch PayclaveError and retain code, status, requestId, and redacted details. A failed creation response does not prove that no record was created. Keep the same operation key while recovering its outcome.
For FEATURE_UNAVAILABLE, confirm that the feature is enabled for this merchant and mode. For wallet or destination errors, review the configured settlement wallet. For webhook signature failures, verify the raw body and endpoint secret before replaying deliveries.