Tax

Learn how to use the Tax resource with Metaprise Invoicing.

Overview

Tax Rate represents rate applied to calculate tax liability. Use the TaxService entity to create a taxrate. See Global tax model for more information about using TaxRate objects and the tax model in general.


Before you begin

Sign up the Metaprise developer devhub platform to get your unique Client ID and API key.
Obtain your access token by authenticating to Metaprise using your unique Client ID and API key. You will need the access token to make API calls.
Set up webhooks to receive notifications on Global Account events.


Tax operation

Clients could use inherent tax rate, or create a customized tax rate based on the business demand.

TaxDescription
Tax NameThe name of the specific tax rate.
Tax RateThe rate applied to calculate tax liability.

Create a Tax

  1. Use dashboard to create a new customer.

    1. Sign up and log in the Metaprise dashboard

    2. Click 'Add new tax' button.

    3. Fill 'Tax Name' and 'Tax Rate%'


  1. Use API to create a new tax.
    To add new tax to an invoice, send a POST request to the /payables/{payable_id}/tax endpoint:
    curl -X POST 'https://api.sandbox.metaprise.com/v1/vat_rates?counterpart_id=3a9c5...48df' \
         -H 'X-Metaprise-Version: 2024-01-31' \
         -H 'X-Metaprise-Entity-Id: ENTITY_ID' \
         -H 'Authorization: Bearer ACCESS_TOKEN'
    

The successful response contains information about the created line item:

{
    "result": "success",
    "data": {
        "uid": "12217",
        "tax_name": "New York tax",
        "tax_rate": "10%",
        "create_at": "2015-10-06T10:50:42-07:00",
        "update_at": "2015-10-06T10:50:42-07:00",      
    }
}

To Retrieve a tax send a GETrequest to the /payables/{payable_id}/tax endpoint:

curl -X GET 'https://api.sandbox.metaprise.com/v1/vat_rates?counterpart_id=3a9c5...48df' \
     -H 'X-Metaprise-Version: 2024-01-31' \
     -H 'X-Metaprise-Entity-Id: ENTITY_ID' \
     -H 'Authorization: Bearer ACCESS_TOKEN'

The successful response contains information about the created line item:

{
    "result": "success",
    "data": {
        "uid": "12217",
        "tax_name": "New York tax",
        "tax_rate": "10%",
        "create_at": "2015-10-06T10:50:42-07:00",
        "update_at": "2015-10-06T10:50:42-07:00",      
    }
}