# Bill.com setup for PopMCP

For bills, payments and invoices you end up pasting four things: a developer key and an Organization ID from one page in BILL, and the username and password of a BILL user. For card spend you paste one Spend & Expense API token. Either works alone.

- Auth: API credentials
- Setup time: 5 min
- API base URL: https://gateway.prod.bill.com/connect
- Credentials screen: https://login.us.bill.com/neo/login
- Provider docs: https://developer.bill.com/docs/get-started-in-production

## Before you begin

- A BILL account for your organization, with a user who can open Settings
- Best practice: a separate BILL user just for PopMCP, so your own password is not used. Administrator reaches everything, Payer can pay bills, and Auditor only reads
- For payments on production: a phone number registered in BILL, because BILL texts a code before the first payment
- For card spend: BILL Spend & Expense, and an Admin to make the API token

## Get your credentials

### 1. Open Manage Developer Keys

Sign in to the BILL web app, click Settings, then under Sync & Integrations click Manage Developer Keys. Testing first? Use the sandbox at login.stage.us.bill.com instead: sandbox keys only work there, and PopMCP works out which one you gave it.

Screen: https://login.us.bill.com/neo/login

### 2. Generate the developer key

Click Generate developer key, read and accept BILL's terms, then click Generate key. It can take up to a minute: click Reload page to see it. Copy the key, and copy the Organization ID at the bottom of the same page. It begins with 008.

Screen: https://developer.bill.com/docs/get-started-in-production

### 3. Choose who PopMCP signs in as

BILL's API signs in as a user and has no sign-in button for other apps, so it needs a username and password. Add a separate BILL user just for this, with the role it needs: Administrator reaches everything, Payer can pay bills, Auditor only reads. Or use a sync token: under Sync & Integrations, click Tokens, then NEW, and enter a name. The name is your username and the token is your password, though a sync token cannot pay, send invoices or approve.

Screen: https://developer.bill.com/docs/token-based-sign-in

### 4. Optional: make a Spend & Expense API token

For cards, budgets, transactions and reimbursements, open BILL Spend & Expense as an Admin. Open My account, find API tokens, click Generate new token, enter a name and click Generate Token. Copy it straight away: it is shown once. This token can also connect on its own, with nothing in the other fields.

Screen: https://help.bill.com/direct/s/article/6633616

### 5. Connect in PopMCP

Paste the developer key, Organization ID, username and password into PopMCP's Bill.com form, add the Spend & Expense token if you made one, and click Connect Bill.com. PopMCP signs in, shows your organization's name, and says whether it is your live account or the sandbox.

Screen: https://developer.bill.com/docs/bill-keys-tokens

### 6. Before the first payment: confirm a text code

On production, BILL asks for a code before a payment, a new bank account or vendor auto-pay. There is nothing to do in advance. The first time, the AI asks BILL to text the phone on your account and asks you for the code. PopMCP keeps the result for 30 days, so you are not asked again until then. If no phone is registered, the AI can add one, or you can add it in BILL.

Screen: https://developer.bill.com/reference/setup

## Fields PopMCP asks for

- Developer key (devKey): In BILL, go to Settings, then Sync & Integrations, then Manage Developer Keys, and click Generate developer key. It can take a minute to appear.
- Organization ID (organizationId): At the bottom of the same Manage Developer Keys page. The connection stays locked to this organization.
- Username (username): The email a BILL user signs in with. A separate user for PopMCP is best. For a sync token, its name.
- Password (password): BILL's API has no other way to sign in as a user. Stored encrypted and sent only to BILL. For a sync token, the token.
- Spend & Expense API token (apiToken): In BILL Spend & Expense, open My account, find API tokens and click Generate new token. You need to be an Admin. Copy it straight away: it is shown once.
- Accountant Console API token (consoleApiToken): Replaces the password when signing in to a client's organization from the BILL Accountant Console.

## Verify

PopMCP shows the Bill.com connector as Connected with your organization's name, and says whether it is your live account, where payments use real money, or the sandbox. With a Spend & Expense token alone, it shows the name of the person who made the token.

## Troubleshooting

### BILL did not accept this username and password

Cause: A typing slip, or the password was changed, or the login belongs to the sandbox while the key belongs to production. The two share nothing.

Fix: Sign in at login.us.bill.com with the same details to check them. With a sync token, the username is the token's name and the password is the token.

### BILL did not accept this developer key

Cause: The key was cut short, or it is from a different system.

Fix: Copy it again from Settings, Sync & Integrations, Manage Developer Keys.

### BILL refused this sign-in, and mentions the Organization ID

Cause: The Organization ID is wrong, or the developer key was made in a different organization.

Fix: Copy the ID from the bottom of Manage Developer Keys, in the organization you want to connect. It begins with 008.

### The connection stopped working after a password change

Cause: PopMCP signs in with the password you gave it.

Fix: Connect Bill.com again with the new password.

### A payment says it needs a session trusted with a text code

Cause: BILL asks for a code on production, and the last one was more than 30 days ago.

Fix: Let the AI ask BILL to send a code, and give it the code you receive. If no phone is registered, one is added first.

### A tool says it needs a Spend & Expense API token, or the BILL sign-in

Cause: BILL keeps the two apart, and this connection has only one of them.

Fix: Connect Bill.com again and fill in the part that is missing.

### A payment says this user cannot pay online

Cause: BILL's bank setup is not finished, or the user is not an Administrator or Payer, or is not allowed on that bank account.

Fix: Finish the bank setup in the BILL web app and check the user's role and bank account access.

### A payment was refused as a duplicate

Cause: The same payment went to BILL in the last 15 minutes, and PopMCP stopped the second one so nothing is paid twice.

Fix: Check the payments list first. If you really want a second identical payment, tell the AI so: it sends it with a new key.

---

Source: https://www.docs.popmcp.com/docs/integrations/bill-com/