Calculate tax.
POST
/v1/tax/calculate
const url = 'https://api.ridleypay.com/v1/tax/calculate';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"amount":1000}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.ridleypay.com/v1/tax/calculate \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "amount": 1000 }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
amount
required
The amount to calculate tax for.
number
Example
1000Responses
Section titled “ Responses ”Media typeapplication/json
object
data
object
type
string
attributes
object
amount
integer
subtotal
integer
tax_amount
integer
total
integer
tax_name
string
tax_rate
integer
inclusive
boolean
applied
boolean
Example
{ "data": { "type": "tax-calculations", "attributes": { "amount": 1000, "subtotal": 1000, "tax_amount": 150, "total": 1150, "tax_name": "GCT", "tax_rate": 15, "inclusive": false, "applied": true } }}