Response Codes

TheBridge API uses a variety of response codes to indicate the status of your requests. Understanding these codes is crucial for effective error handling and troubleshooting in your integration.

Response Code Structure

Each response includes two key elements:
  • response_code: A numeric code indicating the status of the request.
  • response_message: A human-readable description of the status.

List of Response Codes

Success Codes
Success
Error Codes
Error

Handling Response Codes

When integrating with TheBridge API, always check the response_code in your API responses. Here’s a general approach to handling these codes:
  1. Success (500): Proceed with your application logic for successful transactions.
  2. Authentication Errors (011): Review your API credentials and ensure they are correctly implemented.
  3. Request Format Errors (004, 022): Check your request structure and ensure it matches the API specifications.
  4. Missing or Invalid Parameters: Review the specific parameter mentioned in the error message and correct it in your request.
  5. Time-related Errors: Ensure your system clock is synchronized and that requests are sent in a timely manner.
  6. Transaction Status: Handle accordingly based on whether the transaction is duplicate, failed, or pending.
Remember to always provide clear feedback to your users based on these response codes, and implement appropriate error handling in your application.