Tax rates
View as Markdown

Preview tax on a basket (writes nothing)

Needs the catalog:read scope, or a full-access key. About scopes

POST
/api/v1/tax-rates/calculate

Authorization

Authorization
Required
Bearer <token>

An API key: gpy_test_… or gpy_live_… (or an agent key, agk_…).

In: header

Request Body

application/jsonOptional

customer_id
Required
string

Format: "uuid"

currency
Required
string

Value in: "USD" | "AUD" | "CAD" | "GBP" | "EUR" | "INR" | "NPR"

lines
Required
array<object>

curl -X POST "https://globalymint.com/api/v1/tax-rates/calculate" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "currency": "USD",
    "lines": [
      {
        "description": "string",
        "amount_cents": "-1500",
        "discount_cents": "1999",
        "taxable": true
      }
    ]
  }'

Per-line tax, tax lines and totals.

{
  "data": {
    "rate": {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "name": "string",
      "percentage": "string"
    },
    "lines": [
      {
        "property1": null,
        "property2": null
      }
    ],
    "tax_lines": [
      {
        "property1": null,
        "property2": null
      }
    ],
    "totals": {
      "currency": "USD",
      "subtotal_cents": "-1500",
      "inclusive_tax_cents": "-1500",
      "exclusive_tax_cents": "-1500",
      "tax_cents": "-1500",
      "total_cents": "-1500"
    },
    "reverse_charge": true,
    "notes": [
      "string"
    ]
  },
  "_agent": {
    "summary": "string",
    "status": "ok",
    "next_actions": [
      "string"
    ],
    "warnings": [
      "string"
    ]
  },
  "api_version": "2026-07-01"
}