cURL
curl --request PUT \
--url https://api.paycashless.com/v1/tax_rates/{id} \
--header 'Content-Type: application/json' \
--header 'Request-Signature: <request-signature>' \
--header 'Request-Timestamp: <request-timestamp>' \
--data '
{
"name": "<string>",
"description": "<string>",
"active": true,
"metadata": {}
}
'import requests
url = "https://api.paycashless.com/v1/tax_rates/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"active": True,
"metadata": {}
}
headers = {
"Request-Signature": "<request-signature>",
"Request-Timestamp": "<request-timestamp>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'Request-Signature': '<request-signature>',
'Request-Timestamp': '<request-timestamp>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>', description: '<string>', active: true, metadata: {}})
};
fetch('https://api.paycashless.com/v1/tax_rates/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.paycashless.com/v1/tax_rates/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'active' => true,
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Request-Signature: <request-signature>",
"Request-Timestamp: <request-timestamp>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.paycashless.com/v1/tax_rates/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"active\": true,\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Request-Signature", "<request-signature>")
req.Header.Add("Request-Timestamp", "<request-timestamp>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.paycashless.com/v1/tax_rates/{id}")
.header("Request-Signature", "<request-signature>")
.header("Request-Timestamp", "<request-timestamp>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"active\": true,\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paycashless.com/v1/tax_rates/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Request-Signature"] = '<request-signature>'
request["Request-Timestamp"] = '<request-timestamp>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"active\": true,\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"active": true,
"inclusive": true,
"description": "<string>",
"percentage": 123,
"fixedAmount": 123,
"liveMode": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"metadata": {}
}Tax Rates
Update a tax rate
Update a tax rate
PUT
/
v1
/
tax_rates
/
{id}
cURL
curl --request PUT \
--url https://api.paycashless.com/v1/tax_rates/{id} \
--header 'Content-Type: application/json' \
--header 'Request-Signature: <request-signature>' \
--header 'Request-Timestamp: <request-timestamp>' \
--data '
{
"name": "<string>",
"description": "<string>",
"active": true,
"metadata": {}
}
'import requests
url = "https://api.paycashless.com/v1/tax_rates/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"active": True,
"metadata": {}
}
headers = {
"Request-Signature": "<request-signature>",
"Request-Timestamp": "<request-timestamp>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'Request-Signature': '<request-signature>',
'Request-Timestamp': '<request-timestamp>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>', description: '<string>', active: true, metadata: {}})
};
fetch('https://api.paycashless.com/v1/tax_rates/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.paycashless.com/v1/tax_rates/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'active' => true,
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Request-Signature: <request-signature>",
"Request-Timestamp: <request-timestamp>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.paycashless.com/v1/tax_rates/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"active\": true,\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Request-Signature", "<request-signature>")
req.Header.Add("Request-Timestamp", "<request-timestamp>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.paycashless.com/v1/tax_rates/{id}")
.header("Request-Signature", "<request-signature>")
.header("Request-Timestamp", "<request-timestamp>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"active\": true,\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paycashless.com/v1/tax_rates/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Request-Signature"] = '<request-signature>'
request["Request-Timestamp"] = '<request-timestamp>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"active\": true,\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"active": true,
"inclusive": true,
"description": "<string>",
"percentage": 123,
"fixedAmount": 123,
"liveMode": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"metadata": {}
}Headers
SHA-512 HMAC signature of the request payload using the API secret
Minimum string length:
1Example:
"5e73d044c44d733fcf819ad3409aaaddca840d421b69cb0b04e2c750fc62ece7526d36296237663ad1f06f62a730c0466516507196b3ce6567493cc52a7cf63d"
UNIX timestamp when the request was created (in seconds)
Pattern:
^\d{10}$Example:
"1712336881"
Path Parameters
Tax rate id
Example:
"txr_123"
Body
application/json
Response
200 - application/json
Tax rate updated
Available options:
vat, sales_tax Available options:
fixed_amount, percentage Show child attributes
Show child attributes
⌘I