Getting Started

Getting Started

This guide gets you to your first successful request with the Global Pricing & Tax Estimator API.

1. Subscribe on RapidAPI

  1. Go to the API's page on RapidAPI
  2. Subscribe to the Free or Basic plan.
  3. RapidAPI will give you:
    • X-RapidAPI-Key
    • X-RapidAPI-Host

You will use those in every request.

2. First Request with cURL

curl -X POST "https://global-pricing-tax-estimator-api-fx-vat-gst-sales-tax.p.rapidapi.com/v1/price/estimate" \
  -H "X-RapidAPI-Key: <YOUR_RAPIDAPI_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "basePrice": 10,
    "baseCurrency": "USD",
    "originCountry": "US",
    "destinationCountry": "GB",
    "productCategory": "ebook",
    "customerType": "consumer",
    "pricingStrategy": "charm_99"
  }'

If everything is wired correctly, you will get a JSON breakdown with displayPrice, currency, taxAmount, and meta.

3. Node.js Example

import axios from "axios";

const client = axios.create({
  baseURL:
    "https://global-pricing-tax-estimator-api-fx-vat-gst-sales-tax.p.rapidapi.com",
  headers: {
    "X-RapidAPI-Key": process.env.RAPIDAPI_KEY!,
    "X-RapidAPI-Host":
      "global-pricing-tax-estimator-api-fx-vat-gst-sales-tax.p.rapidapi.com",
    "Content-Type": "application/json",
  },
});

async function run() {
  const { data } = await client.post("/v1/price/estimate", {
    basePrice: 20,
    baseCurrency: "USD",
    originCountry: "US",
    destinationCountry: "DE",
    productCategory: "digital_service",
    customerType: "consumer",
    pricingStrategy: "charm_99",
  });

  console.log(data.displayPrice, data.currency);
}

run().catch(console.error);

4. Python Example

import requests
import os

url = "https://global-pricing-tax-estimator-api-fx-vat-gst-sales-tax.p.rapidapi.com/v1/price/estimate"

headers = {
    "X-RapidAPI-Key": os.environ["RAPIDAPI_KEY"],
    "X-RapidAPI-Host": "global-pricing-tax-estimator-api-fx-vat-gst-sales-tax.p.rapidapi.com",
    "Content-Type": "application/json",
}

payload = {
    "basePrice": 15,
    "baseCurrency": "USD",
    "originCountry": "US",
    "destinationCountry": "FR",
    "productCategory": "physical_goods_general",
    "customerType": "consumer",
    "pricingStrategy": "round_05",
}

resp = requests.post(url, json=payload, headers=headers)
print(resp.json())

5. Batch Pricing

To price multiple items (e.g. a cart), use:

6. Next Steps