Welcome to the B2Brouter testing environment! This guide will help you integrate with our electronic invoicing platform.
Prerequisites
Before you begin, make sure you have:
- API credentials (API key and account ID)
- Access to the staging environment
- Basic understanding of REST APIs
Initial Setup
Configure Account Settings
If you haven't configured your tax data yet, you can set it up in two ways:
- Through the web interface (settings → gear icon)
- Via API using
PUT /accounts/{account_id}
(see API Reference)
Create Test Accounts
You can create as many test accounts as needed in the staging environment:
-
eDocExchange users: Create accounts manually through the web interface:
- Go to the account dropdown menu
- Select "Add account"
- Configure in the Developers section
-
eDocSync users: Create accounts programmatically via
POST /accounts
(see API Reference)
Basic Integration Flow
Step 0: Get Account Information (Optional)
Only needed if you've created new accounts and need to retrieve the account ID:
GET /accounts → {account_id}
Step 1: Configure Transport and Tax Reporting
Set up once per account:
POST /transports
POST /tax-report-settings # Optional, depending on country
Step 2: Look Up Contact (If Needed)
Search for existing contacts in the directory:
GET /directory?query={contact_identifier}
Step 3: Create Contact
If this is the first time invoicing this contact:
POST /contacts
Note: If the contact already exists in B2Brouter, skip to Step 4.
Step 4: Retrieve Contact
Verify the contact details:
GET /contacts/{contact_id}
Step 5: Create Invoice
You can send the invoice directly upon creation:
POST /invoices
You can include the contact object inline if needed.
Step 6: Retrieve Invoice
Get the invoice details and status:
GET /invoices/{invoice_id}
Step 7: Get Tax Report (If Required)
Only necessary for certain jurisdictions:
GET /tax_reports/{report_id}
Simplified Flow
For quick testing, you can use this minimal flow:
POST /invoices
(with embedded contact object)GET /invoices/{invoice_id}
Recommended Guides
Depending on your needs, check out these additional guides:
- Schemes Guide - Understanding TIN, CIN, PIN, and scheme formats
- Payment Method Guide - How to handle payment information
- Country-Specific Behaviors - Some countries include guides with information about their unique requirements
Moving to Production
When you're ready to go live:
- Register at app.b2brouter.net if you haven't already
- Subscribe to an eDocExchange monthly plan based on your expected transaction volume
- Update your integration:
- Change domain from
app-staging.b2brouter.net
toapp.b2brouter.net
- Use your production API key
- Use your production account ID(s)
- Change domain from
- Test thoroughly - All request/response payloads work the same way as staging
Note: You don't need a complete integration to go live. You can start with the basic flow and continue developing additional features using the staging environment.
Important Considerations
Multi-Company Management
- If you manage multiple companies and each needs access to B2Brouter, separate them into different account groups to ensure privacy and data isolation.
Testing Best Practices
- Never send test invoices to real clients from staging, even via email or B2Brouter network. While they have no legal validity, they can cause confusion.
- Always use a personal email address to review invoice receipts during testing.
- Create dedicated test accounts for testing send/receive flows.
- Don't use real Tax Identification Numbers of companies you won't actually integrate.
Simplicity First
B2Brouter is designed to simplify electronic invoicing, not complicate it. Keep your integration as clean and straightforward as possible. We aim for a streamlined, organized, and global approach to information exchange.
Need Help?
If you have specific questions or need a feature not covered in the documentation:
- Contact us via Support inside the B2Brouter Application
- Ask in the Discussion Forum
More information
- Explore the API Reference for detailed endpoint documentation
- Explore the API Guides for specific flow implementation
Happy integrating! If you run into any issues, don't hesitate to reach out to our support team.