> ## Documentation Index
> Fetch the complete documentation index at: https://spidocs.chargebee.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting

The `trace_id` included in the Authorization header is a unique identifier that helps track API requests across systems. It's a valuable tool for troubleshooting issues such as failed requests, authentication errors, or slow responses.

### How to Use `trace_id` for Troubleshooting:

1. **Locate the `trace_id`:**\
   The `trace_id` is found in the Authorization header of the API request, for example:

```json theme={null}
{
--header 'Authorization: 
{
  "api_key": "api_keyX",
  "merchant_id": "merchant_id_partnerX", //sent by Chargebee by default
  "company_code": "company_code_partnerX", //sent by Chargebee by default
  "trace_id": "12345-abcde-67890" //sent by Chargebee by default
}
'
}
```

2. **Track Requests Across Systems:**
   Use the trace\_id to trace the request through your logs and identify where issues may have occurred such as:

* Incoming requests.
* Internal processing layers.
* Outgoing responses to Chargebee.

3. **Collaborate with Chargebee:**

-Using `trace_id`:

If a request fails or behaves unexpectedly, share the `trace_id` with Chargebee's team. This helps them identify the exact request and investigate the root cause efficiently.
Similar way Chargebee team can also use the `trace_id` to reach out Partner team for any issues.

4. **Common Issues to Troubleshoot:**

* Authentication Errors (401/403): Verify api\_key and merchant\_id.
* Data Mismatches: Trace the request to spot discrepancies.
* Timeouts or Slow Responses: Use the trace\_id to identify bottlenecks.
