Skip to Content
Docs

Tax

Charge your own tax figures or let Pay.com calculate them when you sell, and let Pay.com calculate, collect, and file when it sells.

Use the tax figures your own system calculates, or let Pay.com calculate them for you. When Pay.com sells as the merchant of record, Pay.com calculates, collects, and files the tax.

When you sell

You choose one of two ways:

  • Your own figures: send the tax figures with the sale. Those alone are the tax charged, and Pay.com doesn't calculate its own.
  • Pay.com's calculation: Pay.com calculates the tax on your tax setup.

Checkout sessions, payment links, and subscriptions take the same tax_options that charges take. Each order and invoice records the tax it charged in tax, with source set to merchant for your figures or pay_com for Pay.com's calculation.

Send your own figures

Send your figures in tax_options.tax_quote_data.tax_breakdown. Each entry has the tax amount, whether it's inclusive, the taxable_amount, and tax_rate_details. Amounts are in the smallest currency unit, so 1999 is $19.99 USD.

curl https://api.sandbox.pay.com/v1/checkout \
  -u ':sk-pay-com-sandbox-…' \
  -H "Content-Type: application/json" \
  -H "idempotency-key: $(uuidgen)" \
  -d '{
    "mode": "payment",
    "customer_reference_id": "cust-jane-doe-001",
    "line_items": [{ "price": "prc_691180274607050752", "quantity": 1 }],
    "tax_options": {
      "tax_quote_data": {
        "tax_breakdown": [
          {
            "amount": 170,
            "inclusive": false,
            "taxable_amount": 1999,
            "tax_rate_details": {
              "country": "US",
              "state": "NY",
              "tax_type": "sales_tax",
              "rate_type": "percentage",
              "percentage_decimal": "8.5"
            }
          }
        ]
      }
    }
  }'

Let Pay.com calculate

Pay.com calculates the tax on your tax setup whenever you don't send figures. To get the figure before the sale, for example to show a total, create a tax quote with POST /v1/tax_quotes, then pass its ID as tax_options.tax_quote. A quote is valid until its expires time.

curl https://api.sandbox.pay.com/v1/tax_quotes \
  -u ':sk-pay-com-sandbox-…' \
  -H "Content-Type: application/json" \
  -H "idempotency-key: $(uuidgen)" \
  -d '{
    "currency": "usd",
    "customer_reference_id": "cust-jane-doe-001",
    "customer_details": {
      "address": {
        "line1": "123 Main Street",
        "city": "San Francisco",
        "state": "CA",
        "postal_code": "94102",
        "country": "US"
      },
      "address_source": "billing"
    },
    "line_items": [
      { "amount": 1999, "quantity": 1, "reference": "brand-kit", "tax_behavior": "exclusive" }
    ]
  }'

When Pay.com sells

You can still send your figures. Pay.com calculates the tax on its own entity's tax account and charges its own figure. It keeps yours alongside it, in tax.merchant_amount and tax.merchant_breakdown on the order or invoice, and never charges them. Both are null unless Pay.com sells and you sent your own figures. Pay.com and its filing partners file and pay the returns.

Your figures on renewals

When you sell a subscription with your own figures, Pay.com stores the rates from the first payment and applies them to each renewal. Each tax_breakdown entry on a subscription needs a percentage_decimal or a flat_amount, or the request returns 422 with tax_rate_required.

To send figures for each renewal instead, set subscription_options.tax_figures to per_invoice. Pay.com then sends invoice.drafted for each renewal invoice and accepts your figures through POST /v1/invoices/{invoice_id}/tax during a draft window (1 hour by default). If none arrive, the stored rates apply. When the customer's country or tax ID changes, or a price change takes effect, Pay.com sends subscription.tax_inputs_changed and keeps applying the stored rates until you send new ones.

Invoices issued elsewhere

Pay.com doesn't calculate the tax on an invoice another system issues, such as an external subscription engine that issues its own. That system calculates the tax. See One owner for each job.

Where tax appears

Tax appears in three places:

  • At checkout: the tax for the customer's country, and reverse charge for a valid tax ID when Pay.com calculates the tax. See Currencies and tax at checkout.
  • In Insights: the tax calculated at checkout on your sales, for your top 10 countries. See Insights and metrics.
  • In reports: tax by country and period, and by where the figures came from, your system or Pay.com's calculation. See Reports and exports.
Was this page helpful?