TS Commerce Developers

Real Time Taxes API

Current version: v1.1 beta

With this API endpoint, it can override the VAT rate of one or more products during checkout in real time. As part of the call, you will receive the entire cart and the data entered by the user to verify the VAT to be applied

Get Realtime Tax Available

GET
/realtimetaxprofile/realtimetaxprofile.json
Get Realtime Tax Request

$storeden = new Storeden\Storeden($config);
$webhook_list = $storeden->get('/realtimetaxprofile/list.json');
					
Get Realtime Tax Request

{
    "name": "Register Tax Endpoint",
    "instance": "640b4f5cd4029d9a30597ac1",
    "url": "https://taxes.storeden.dev/calculate",
    "id": "640b4f667713b4d80ed13602"
}
						

Create real time tax endpoint

POST
/realtimetaxprofile/realtimetaxprofile.json

Create a new endpoint that will be called by Storeden to get the taxes to apply on the checkout.

PARAMETERS LIST
url required (string) A valid endpoint url. Must be in https.
name required (string) Your real time taxes endpoint name
Create real time shipping Request

$data = array();
$data['url'] = 'https://taxes.storeden.dev/calculate';
$data['name'] = 'Register Tax Endpoint';

$storeden = new Storeden\Storeden($config);
$tax_endpoint = $storeden->post('/realtimetaxprofile/realtimetaxprofile.json', $data);
					
Create real time shipping Response

{
    "name": "Register Tax Endpoint",
    "instance": "640b4f5cd4029d9a30597ac1",
    "url": "https://taxes.storeden.dev/calculate",
    "id": "640b4f667713b4d80ed13602"
}
					

Remove real time tax endpoint

DELETE
/realtimetaxprofile/realtimetaxprofile.json
PARAMETERS LIST
id required (StoredenID) Real Time Tax Endpoint id you want to remove
Remove real time tax endpoint Request

$data = array();
$data['id'] = '640b4f667713b4d80ed13602';

$storeden = new Storeden\Storeden($config);
$webhook_list = $storeden->delete('/realtimetaxprofile/realtimetaxprofile.json', $data);
					
Remove real time tax endpoint Response

{
    "ok": 1,
    "err": null,
    "errmsg": null,
    "nRemoved": 1
}