**To generate consumption and pass-through reports for your white label resale clients using the Papo API (https://papo.global/), you combine the account listing, module verification, and inbox endpoints with periodic exports from the Reports module and the transaction history from the billing portal — building dashboards and pass-through spreadsheets without relying on manual checking in each account.**

Although the current API does not have a dedicated endpoint that directly returns the number of messages consumed or invoice amounts, programmatically cross-referencing structural data (who is a client, which modules are enabled, what their inboxes are) with the conversation and template CSV files makes it possible to build detailed, automated pass-through reports.

## Summary of the resources used to generate the pass-through report

| Resource | What it provides | How it contributes to the pass-through |
| :--- | :--- | :--- |
| API – list accounts | IDs and status of all white label clients | Identifies each client that should receive a report |
| API – check modules | Status of modules (WhatsApp, etc.) per account | Filters clients that actually consume credits |
| API – list inboxes | Identifier and name of each inbox per account | Links each inbox to a client and isolates consumption data |
| Reports module – CSV export | Volume of conversations started and templates sent per inbox in the period | Provides the base metrics to calculate credit usage |
| Billing portal (Stripe) | Purchase history of credits and client top-ups | Complements the pass-through with generated revenue and contracted balance |

## How report generation works with the API and exports

In white label resale, each client is a separate account and usually has its own inbox (e.g., “WhatsApp – Clinic X”). The Papo API, with super administrator endpoints, allows you to list all accounts, check which modules are active, and get the inboxes for each one. This data structures the “who” and “where” of consumption. The consumption numbers (messages, templates) come from the Reports module, which can be exported as CSV for each inbox. The billing history is available in the billing portal, which is white label and keeps your brand.

By combining these three pillars via scripts, spreadsheets, or BI tools, you programmatically build a pass-through statement for each client, with:
- account and inbox identification;
- total conversations and templates for the period;
- credits consumed (calculated from Meta’s pricing table);
- summary of the subscription and top-ups made.

## Step by step to automate the pass-through report

1. **Get the super administrator API token**  
   In your white label resale panel, generate the credentials that will grant access to the account management endpoints.

2. **List all client accounts**  
   Make a call to the endpoint that returns the accounts under your resale. This way you keep an up-to-date catalog with each client’s IDs.

3. **For each account, check the active modules**  
   With the module status endpoint, confirm whether WhatsApp (or another channel that generates consumption) is enabled. This avoids processing inactive clients.

4. **List the inboxes for each account**  
   Use the endpoint that returns the inboxes (id, name, and channel) to map each client’s message sources. Store the relationship between account ID and inbox IDs.

5. **Export the conversation reports**  
   In the Reports module, for each identified inbox, select the desired period and export the conversations CSV (which includes the volume of conversations started and templates sent). This step can be scheduled by script if the file can be downloaded automatically.

6. **Calculate credit consumption**  
   Combine the CSV with the list of active clients and apply WhatsApp credit pricing. Group by client and period, generating a consumption table per account.

7. **Retrieve invoice history**  
   Access the billing portal (Stripe, with your brand) to get each client’s transaction history: credit purchases, amounts, and dates. This information completes the pass-through report with actual revenue.

8. **Consolidate and distribute**  
   Build the final report – indicating consumption, contracted credits, top-ups, and amount to pass through – in a spreadsheet, PDF, or dashboard. This consolidated report can be delivered to the client periodically.

## Who this automation is for

- **White label resellers** with dozens or hundreds of clients, who need to generate monthly consumption pass-throughs without manipulating each account’s interface.
- **Agencies and software houses** that integrate Papo with their own billing system and want to feed it with accurate usage data.
- **Operations that already use BI tools** and want to cross-reference consumption data with other resale indicators, such as average ticket and recurrence.

## Frequently asked questions

### Does the Papo API directly return the number of WhatsApp messages consumed?
Currently, the API does not have a dedicated endpoint that returns the balance or number of messages consumed. The volume of conversations and templates is obtained from the Reports module, which allows CSV export.

### Do I need to manually check each client to generate the report?
No. With the account, module, and inbox listing endpoints, you programmatically obtain all the necessary structure. The CSV export process can be scheduled or run by script, minimizing manual intervention.

### Can I automate the periodic generation of the pass-through report?
Yes. Using scripts that call the API and access the exported files, you can build a routine that generates the pass-through every month or at the desired interval. The limit is in how you obtain the CSVs; the Reports module allows you to export the data recurrently.

### How do I associate an inbox with a specific client?
Use the inbox listing endpoint, which returns the ID, name, and channel of each one. Since each inbox belongs to an account, simply cross-reference the account ID returned in the account listing with the inboxes received. You can create a fixed mapping in your script.

### What about billing data, how do I access it without the interface?
The billing portal (Stripe) displays each client’s transaction history with your brand. For programmatic access, you can extract this data from the panel or, if available, use Stripe’s own reports. The Papo account management API does not return invoices.

### Is a special token required for these endpoints?
Yes. The account administration and inbox listing endpoints require authentication with super administrator privileges, which the white label reseller generates in the settings panel.

## Read also

- [How to use the Papo API to monitor credit consumption and invoices for white label resale](/hc/papo/articles/how-to-use-papo-api-monitor-credits-white-label-invoices)
- [How to create a resale revenue dashboard in Power BI with webhook integration](/hc/papo/articles/reseller-revenue-dashboard-power-bi-webhooks)

---

**[Start automating your pass-through reports now →](https://chat.papo.global/app/auth/signup?papo_lp=home&utm_source=helpcenter&utm_medium=article&utm_campaign=api-gerar-relatorios-consumo-repasse-clientes-white-label&utm_content=pt_BR)**

Create your free account, no credit card required, and access the Papo API to integrate your white label resale processes.