Payiano helps you manage taxes efficiently. You
can set up various taxes and use them for subscriptions, and one-time
payments through Checkout. But remember, Payiano
won't automatically create these taxes for you. When you use taxes,
Payiano calculates the total tax for each rate
and provides a summary table. This can be exported for tax reports.
It's important to create a catalog of taxes that comply with the tax
laws of the country where your business operates.
Understanding these nuances in tax management is crucial for accurate
financial planning and compliance with tax laws in different countries.
Payiano's flexibility in handling both manual and
automated Tax Calculations, along with its Dashboard and API capabilities, makes it a versatile
tool for businesses navigating complex tax environments.
GET/taxes
Sandbox: https://api.payiano.dev/v1/taxes
Live: https://api.payiano.com/v1/taxes
Security
Authorization header with access token is required to access this endpoint: Bearer ACCESS-TOKEN
Your access token should be associated to this permission taxes_view
Request
Request body schema:
application/json
Query parameters:
page
page
Type: integer|null
Default: 1
The page number to be retrieved, for the list of taxes. So, a combination of page=1 and per_page=25 returns the first 25 taxes. A combination of page=2 and per_page=25 returns the next 25 taxes.
per_page
per_page
Type: integer|null
Default: 25
Possible values: [1 ... 200]
The maximum number of taxes to return in the response.
includes
includes
Type: array_of_enums|null
Possible values:
["tax.metadata"]
A list of additional tax relations to return, if available. Feel free
to send the relations you would like to return with every item. See Including Resources to better understand how this is working.
Response
200
Response schema:
application/json
Response body:
total_pages
total_pages
Type: integer
The total number of pages that are available for the taxes search criteria.
current_page
current_page
Type: integer
The current pagination page.
per_page
per_page
Type: integer
The amount of taxes items return per page.
total_items
total_items
Type: integer
The total number of taxes that match the search criteria.
items
items
Type: array_of_objects
The list of taxes that match the search criteria.
id
id
Type: ulid
Length: 26
The unique ID assigned to each tax which is generated
by our system using the ULID format. Each ID is
precisely 26 characters long, ensuring a unique and consistent
identifier for every tax. This ULID is
automatically created by our system and is used to uniquely identify
and track each tax in our database.
name
name
Type: string
Min: 2
Max: 255
The name is a clear label that quickly tells the person paying the
payment what the tax is about. It's a customer-facing term used to
identify and explain the taxes on various transaction-related documents
and platforms. It's important for this name to be clear and descriptive,
as it aids in ensuring transparency and understanding for the customer
regarding the taxes applied to their purchase or service.
value
value
Type: decimal
Min: 0.01
Max: 9999999 when value_type is FLAT and 10000 when the
value_type is PERCENTAGE.
The tax amount value. The length includes the value, the decimal digit and the decimal value. The API accepts 2 digits like 50.53.
value_type
value_type
Type: enum
Possible values:
["PERCENTAGE","FLAT"]
The tax value type.
type
type
Type: enum
Possible values:
["AMUSEMENT_TAX","SALES_TAX","SERVICE_TAX","VAT"]
Each of these taxes is specific to certain types of transactions and is subject to the
prevailing laws and regulations of that region. Businesses operating in multiple regions
or countries often need to manage several of these tax types concurrently.
AMUSEMENT_TAX:
A tax levied on the fees charged for entertainment or amusement services.
This could be applied to movie tickets, theme park entries, etc.
SALES_TAX:
A general tax on the sale of goods and services, usually calculated as a percentage
of the purchase price.
VAT:
A consumption tax placed on a product whenever value is added at each stage of the supply
chain, from production to the point of sale.
strategy
strategy
Type: enum
Possible values:
["EXCLUSIVE","INCLUSIVE"]
Determines if the tax is calculated as part of the total amount or added on top.
The total amount payable by a customer varies significantly based on whether a tax
rate is inclusive or exclusive.
EXCLUSIVE:
Added to the subtotal, increasing the final amount the customer pays.
INCLUSIVE:
Included within the listed price, not increasing the final amount but reducing the net
revenue you receive.
A 20% tax will have a different impact on the total charge amount, depending
on its inclusivity. In an exclusive scenario, it adds to the customer's cost, while
in an inclusive scenario, it's a part of the already stated price.
Scenario: Selling a Product for $100 with 20% Tax
Tax Value
Total
Exclusive
20% of $100 = $20
$120
Inclusive
$100 - ( $100 / 1.20 ) = $16.67
$100
country_code
country_code
Type: string
Specify the unique two-letter country code ( e.g EG, SA or AE )
corresponding to the country where your tax was officially registered. This code is part of the standard
international country codes set by the ISO .
reference_id
reference_id
Type: string|null
Max: 50
It's a unique identifier assigned to each tax. It's
primary role is to distinguish one tax from another, ensuring
that each tax can be individually tracked and managed without
any confusion. Please notice that duplicate values are not allowed
and it's allowed to use alpha dash only [A-Za-z0-9-_]. The reference_id
value is used to Identify Resource when you consume any tax endpoint with sending identify_by
query parameter with value reference_id.
is_active
is_active
Type: boolean
Default: true
This value indicates whether the tax is active or not. This flag can be used
to control the tax's availability in runtime environments or listings without
deleting or removing the tax from records. A true value means the tax
is active and functioning, while a false value implies that the tax is
deactivated or not in use.
description
description
Type: string|null
Min: 2
Max: 255
It provides clear, concise details about what the tax is for.
It serves as an identifier or reference that helps in organizing,
tracking, or categorizing taxes internally. This string will not
be shown to customers.
metadata
metadata
Type: object|null
The tax metadata model details. Metadata serves as a tool
for keeping extra, organized details about a resource. For example,
you can use it to store a user's preferences like prefered color,
notes or any other data that aids in personalizing services, improving
customer relations, or optimizing internal workflows. This information
isn't utilized by Payiano – meaning it's not
involved in authorizing or declining transactions and remains invisible
to your users. Its value is entirely private for your internal
use, and we ensure it remains confidential, not shared with any
external parties.
info
info
Type: array_of_objects
Max: 50
This array consists of objects, each containing a key and a value.
These pairs of key-value are structured in a way that's more suitable
for programmatic access. You can add up to 50 objects.
key
key
Type: string
Min: 1
Max: 50
It's a unique identifier to avoid confusion or data overlap.
The keys serve as identifiers for the corresponding values, making
it easier to retrieve specific pieces of information as needed.
value
value
Type: string
Min: 1
Max: 255
The value is the actual data associated with that key. It could be
a simple string, a number, a URL, or any other data format that
conveys the necessary information.
list
list
Type: array_of_strings
Max: 50
The list attribute is particularly useful for scenarios where
the data needs to be presented in a straightforward, unstructured
format. It's ideal for quick overviews, simple data logging, or
when the information does not require the more complex organization
that nested JSON objects provide. Please
notice that duplicate values are not allowed, you can add up
to 50 item and the max list item length is 255
characters.
created_at
created_at
Type: datetime
The created datetime of the tax.
This attribute can be formatted as an ISO 8601
string or a UNIX timestamp in milliseconds,
depending on the preferred datetime format specified in the request header (e.g., 2024-08-04T14:22:01Z or
1722572118554). By default, the format is UNIX
timestamp in milliseconds.
updated_at
updated_at
Type: datetime
The updated datetime of the tax.
This attribute can be formatted as an ISO 8601
string or a UNIX timestamp in milliseconds,
depending on the preferred datetime format specified in the request header (e.g., 2024-08-04T14:22:01Z or
1722572118554). By default, the format is UNIX
timestamp in milliseconds.
Response sample:
1{2"per_page": 25,3"total_pages": 1,4"total_items": 1,5"current_page": 1,6"items": [7{8"id": "01hqh45s7826hfwdze8dp1z21f",9"name": "Value added tax",10"value": 14,11"value_type": "PERCENTAGE",12"type": "VAT",13"strategy": "EXCLUSIVE",14"country_code": "EG",15"reference_id": "b438800f-9e32-36a1-aee8-725aca982cc7",16"is_active": true,17"description": "The value added tax",18"metadata": {19"info": [20{21"key": "Company name",22"value": "Pyngy"23}24],25"list": [26"Cairo, Nasr City, 7th District, Building 12 floor 5"27]28},29"created_at": "1722572118554",30"updated_at": "1722572118554"31}32]33}