Plans

Deprecated compatibility endpoint. Quote tax with POST /payment_quotes instead.

post/plans/{id}/calculate_tax

Request

  • Base URL: https://api.whop.com/api/v1
  • URL: https://api.whop.com/api/v1/plans/{id}/calculate_tax
  • Auth: HTTP bearer

Headers

Idempotency-Keystring
Example:d9105228-4a08-46b1-8b91-42fed586d383

A unique key that makes this request safe to retry. See Idempotent requests.

Request body

ip_addressstring

Example request

{
  "address": {
    "country": "US",
    "postal_code": "78701",
    "state": "TX"
  },
  "tax_ids": [
    {
      "type": "ad_nrt"
    }
  ]
}

Response

variant tax calculated through the deprecated plans path

currencystring required
status'calculated' | 'not_calculated' required
subtotalinteger required
tax_amountinteger required
tax_behavior'exclusive' | 'inclusive' required
totalinteger required

Example response

{
  "currency": "usd",
  "status": "calculated",
  "subtotal": 1000,
  "tax_amount": 70,
  "tax_behavior": "exclusive",
  "total": 1070
}

Changes

    • info

      endpoint deprecated

    • info

      added the new optional header request parameter Api-Version-Date to all path's operations

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      added the non-success response with the status