Prerequisites
Before you begin:- You have completed How to Fetch and Match Tax Codes and determined what action is needed for each tax code
- Your integration is authenticated using one of the supported authentication methods
- Your integration can call Pleo’s Tax Codes API endpoints
Scenario
This how-to continues from the How to Fetch and Match Tax Codes scenario. After matching, the following actions are required:| AS Tax Code | Pleo Tax Code | Action |
|---|---|---|
| VAT20 - Standard (20%) | VAT20 - Standard (20%) | No action |
| VAT5 - Reduced (5%) | VAT5 - Reduced (5%) | Unarchive |
| VAT0 - Zero Rated (0%) | — | Create |
| REV - Reverse Charge | REV - Reverse Charge | Update |
| — | EXEMPT - Exempt | Archive |
Steps
1. Create Tax Codes for New AS Entries
API Endpoint: POST/v0/tax-codes
If an AS tax code has no matching Pleo Tax Code, create a new Tax Code.
Example Pseudo:
Type Mapping
| AS Tax Code | Pleo type |
|---|---|
| Reverse tax | reverse |
| All other taxes | inclusive |
Example Request
- OAuth 2.0
- API Key
Example Response
What it looks like in Pleo Web App

2. Unarchive or Update Existing Tax Codes
API Endpoint: PUT/v0/tax-codes/{taxCodeId}
If a matching Tax Code is found:
- AS tax code is active, Pleo Tax Code is archived: Unarchive by setting
archived: falseand update name, rate, and type if they differ. - AS tax code is active, Pleo Tax Code details differ: Update the Tax Code to match the AS.
- AS tax code is active, Pleo Tax Code details match: No action required.
Unarchive
Example Request
The “VAT5 - Reduced (5%)” Tax Code is unarchived in this example.- OAuth 2.0
- API Key
Example Response
What it looks like in Pleo Web App


Update
Example Request
The “REV - Reverse Charge” Tax Code’s rate is updated from 20% to match the AS rate of 10% in this example.- OAuth 2.0
- API Key
Example Response
What it looks like in Pleo Web App

3. Archive Tax Codes with No Matching AS Entry
API Endpoint: PUT/v0/tax-codes/{taxCodeId}
If a Pleo Tax Code is active but its corresponding AS tax code is no longer active (or does not exist), archive the Tax Code.
Do not delete Tax Codes. Archiving is non-destructive and reversible.
Example Pseudo:
Example Request
- OAuth 2.0
- API Key
Example Response
What it looks like in Pleo Web App


4. Handle Duplicate Codes in Pleo
API Endpoint: PUT/v0/tax-codes/{taxCodeId}
If two or more Pleo Tax Codes share the same code, resolve the conflict before completing the sync:
- Retain the Tax Code whose rate matches the rate from the corresponding AS tax code.
- Archive the duplicate using
archived: true. - If all duplicates match the rate, retain one and archive the rest.
Result
The table below recaps what happened to each Tax Code across all steps.| Tax Code | AS Status | Pleo State Before | Action | Final Pleo State |
|---|---|---|---|---|
| VAT20 - Standard (20%) | Active | Active, matches | No action | Active |
| VAT5 - Reduced (5%) | Active | Archived | Unarchived | Active |
| VAT0 - Zero Rated (0%) | Active | Does not exist | Created | Active |
| REV - Reverse Charge | Active | Active, rate differed | Updated | Active |
| EXEMPT - Exempt | Not in AS | Active | Archived | Archived |
| Tax Code | Final State in Pleo | In AS? | Aligned? |
|---|---|---|---|
| VAT20 - Standard (20%) | Active | Yes | ✓ Yes |
| VAT5 - Reduced (5%) | Active | Yes | ✓ Yes |
| VAT0 - Zero Rated (0%) | Active | Yes | ✓ Yes |
| REV - Reverse Charge | Active | Yes | ✓ Yes |
| EXEMPT - Exempt | Archived | No | ✓ Yes |
What Comes Next?
this how-to is part of:
Related Reading
- How to Fetch and Match Tax Codes
- Sync Tax Codes Integration Design
- Tax Sync Data Mapping
- Platform Capabilities: Tax Sync