We use cookies to optimize your user experience. All information shared with us through cookies is secure and covered by our data privacy obligations. To learn more, view our privacy policy.
KongaPay Logo
KongaPayDevelopers
v1.0
DevelopersVirtual AccountError Codes

Error Codes

All KongaPay Virtual Account API errors return a consistent JSON structure.

Error Response Structure

Error Response
{
  "status":  "error",
  "message": "A duplicate reference already exists.",
  "code":    409
}

Error Reference

HTTP StatusCodeErrorResolution
400Bad RequestCheck request body for missing or malformed fields.
400Missing secretKeyInclude your secretKey in the request header.
401UnauthorizedYour secretKey is invalid. Contact support to verify or rotate your key.
404Account Not FoundNo settlement account found for your integration. Contact support.
404Transaction Not FoundNo record exists for this reference. Verify the value and retry.
409Duplicate ReferenceA virtual account with this reference already exists. Use a new reference.
40994Pending TransactionPayment is still processing. Wait and retry with exponential backoff.

Error Handling Tips

400Validation Errors
  • Check all required fields are present
  • Verify field types match the spec
  • Confirm secretKey header is included
401Auth Errors
  • Ensure you're using the correct environment's key
  • Contact KongaPay support to rotate keys
  • Never log or expose your secretKey
404Not Found
  • Verify the reference value is correct
  • Check your settlement account is set up
  • Confirm you're using the right base URL
409Conflicts
  • Generate a new unique reference for duplicates
  • Use exponential backoff for pending (code 94)
  • Store references server-side before API calls