{
  "openapi": "3.1.0",
  "info": {
    "title": "AfterTax AU API: Australian pay and tax",
    "version": "0.4.0",
    "description": "Australian take-home pay, PAYG withholding, income tax and refunds, super guarantee and ABN/TFN checks, using the ATO's published formulas and rates. Free, no API key."
  },
  "servers": [
    {
      "url": "https://aftertaxau.com"
    }
  ],
  "paths": {
    "/api/take_home_pay": {
      "post": {
        "operationId": "take_home_pay",
        "summary": "Australian take-home pay",
        "description": "Take-home pay in Australia for a salary or hourly rate, for 2025-26 or 2026-27.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "salary": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Annual salary in AUD, excluding super unless salaryIncludesSuper is true, e.g. 85000. Give salary or hourlyRate, not both."
                  },
                  "hourlyRate": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Hourly rate in AUD excluding super, including any casual loading, e.g. 35.5."
                  },
                  "hoursPerWeek": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 168,
                    "description": "Hours a week for hourlyRate. Default 38 (full time)."
                  },
                  "salaryIncludesSuper": {
                    "type": "boolean",
                    "description": "The salary is a total package that includes the 12% super guarantee. Default false."
                  },
                  "taxYear": {
                    "type": "string",
                    "enum": [
                      "2025-26",
                      "2026-27"
                    ],
                    "description": "Australian financial year (1 July to 30 June) whose withholding tables to use. Default 2026-27."
                  },
                  "taxFreeThreshold": {
                    "type": "boolean",
                    "description": "Tax-free threshold claimed with this employer. Default true (main job). Use false for a second job."
                  },
                  "tfnProvided": {
                    "type": "boolean",
                    "description": "Employee gave their tax file number. Default true. False applies the no-TFN rate."
                  },
                  "foreignResident": {
                    "type": "boolean",
                    "description": "Foreign resident for tax purposes. Default false."
                  },
                  "studyLoan": {
                    "type": "boolean",
                    "description": "Has a HELP, VSL, SSL or other study and training support loan. Default false."
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result, amounts in AUD",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Input to fix; the error says what",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/salary_for_take_home": {
      "post": {
        "operationId": "salary_for_take_home",
        "summary": "Salary needed for a target take-home pay",
        "description": "Works backwards from the take-home pay someone wants to the gross annual salary they need in Australia, for 2025-26 or 2026-27.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "takeHome": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Take-home pay wanted, in AUD, for the period in 'per', e.g. 1500."
                  },
                  "per": {
                    "type": "string",
                    "enum": [
                      "weekly",
                      "fortnightly",
                      "monthly",
                      "year"
                    ],
                    "description": "The period takeHome is for."
                  },
                  "taxYear": {
                    "type": "string",
                    "enum": [
                      "2025-26",
                      "2026-27"
                    ],
                    "description": "Australian financial year (1 July to 30 June) whose withholding tables to use. Default 2026-27."
                  },
                  "taxFreeThreshold": {
                    "type": "boolean",
                    "description": "Tax-free threshold claimed with this employer. Default true (main job). Use false for a second job."
                  },
                  "studyLoan": {
                    "type": "boolean",
                    "description": "Has a HELP, VSL, SSL or other study and training support loan. Default false."
                  },
                  "foreignResident": {
                    "type": "boolean",
                    "description": "Foreign resident for tax purposes. Default false."
                  }
                },
                "required": [
                  "takeHome",
                  "per"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result, amounts in AUD",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Input to fix; the error says what",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/payg_withholding": {
      "post": {
        "operationId": "payg_withholding",
        "summary": "PAYG withholding for one pay",
        "description": "Exact PAYG tax an Australian employer must withhold from one pay (weekly, fortnightly, monthly or quarterly) under ATO Schedule 1 (NAT 1004), with Schedule 8 for study loans and Schedule 9 for seniors, for 2025-26 or 2026-27.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "earnings": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Gross earnings for this pay period in AUD, including taxable allowances and overtime, e.g. 3076.92 for a fortnight."
                  },
                  "period": {
                    "type": "string",
                    "enum": [
                      "weekly",
                      "fortnightly",
                      "monthly",
                      "quarterly"
                    ],
                    "description": "Pay period."
                  },
                  "payDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "Pay date (YYYY-MM-DD). Picks the financial year's tables; overrides taxYear."
                  },
                  "taxYear": {
                    "type": "string",
                    "enum": [
                      "2025-26",
                      "2026-27"
                    ],
                    "description": "Australian financial year (1 July to 30 June) whose withholding tables to use. Default 2026-27."
                  },
                  "taxFreeThreshold": {
                    "type": "boolean",
                    "description": "Tax-free threshold claimed with this employer. Default true (main job). Use false for a second job."
                  },
                  "tfnProvided": {
                    "type": "boolean",
                    "description": "Employee gave their tax file number. Default true. False applies the no-TFN rate."
                  },
                  "foreignResident": {
                    "type": "boolean",
                    "description": "Foreign resident for tax purposes. Default false."
                  },
                  "studyLoan": {
                    "type": "boolean",
                    "description": "Has a HELP, VSL, SSL or other study and training support loan. Default false."
                  },
                  "medicareExemption": {
                    "type": "string",
                    "enum": [
                      "none",
                      "half",
                      "full"
                    ],
                    "description": "Medicare levy exemption claimed. Default none."
                  },
                  "annualTaxOffset": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Total annual tax offsets claimed on the withholding declaration (AUD)."
                  },
                  "medicareFamily": {
                    "type": "object",
                    "description": "Medicare levy variation declaration (lower withholding for low-income families).",
                    "properties": {
                      "spouse": {
                        "type": "boolean"
                      },
                      "children": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "additionalProperties": false
                  },
                  "seniors": {
                    "type": "string",
                    "enum": [
                      "single",
                      "couple",
                      "illness-separated"
                    ],
                    "description": "Claims the seniors and pensioners tax offset with this status (uses Schedule 9)."
                  }
                },
                "required": [
                  "earnings",
                  "period"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result, amounts in AUD",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Input to fix; the error says what",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/bonus_withholding": {
      "post": {
        "operationId": "bonus_withholding",
        "summary": "Tax withheld from a bonus",
        "description": "PAYG tax to withhold from a bonus, commission or other one-off payment made with a regular Australian pay, using ATO Schedule 5 Method A, for 2025-26 or 2026-27. Use it for 'how much tax comes out of my bonus'.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "earnings": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Regular gross earnings for the pay period the bonus is paid with (AUD), excluding the bonus."
                  },
                  "bonus": {
                    "type": "number",
                    "minimum": 0,
                    "description": "The bonus or commission amount (AUD)."
                  },
                  "period": {
                    "type": "string",
                    "enum": [
                      "weekly",
                      "fortnightly",
                      "monthly",
                      "quarterly"
                    ],
                    "description": "Pay period."
                  },
                  "periodsCovered": {
                    "type": "integer",
                    "minimum": 1,
                    "description": "Pay periods the bonus relates to, if less than a year."
                  },
                  "payDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "Pay date (YYYY-MM-DD)."
                  },
                  "taxYear": {
                    "type": "string",
                    "enum": [
                      "2025-26",
                      "2026-27"
                    ],
                    "description": "Australian financial year (1 July to 30 June) whose withholding tables to use. Default 2026-27."
                  },
                  "taxFreeThreshold": {
                    "type": "boolean",
                    "description": "Tax-free threshold claimed with this employer. Default true (main job). Use false for a second job."
                  },
                  "tfnProvided": {
                    "type": "boolean",
                    "description": "Employee gave their tax file number. Default true. False applies the no-TFN rate."
                  },
                  "foreignResident": {
                    "type": "boolean",
                    "description": "Foreign resident for tax purposes. Default false."
                  },
                  "studyLoan": {
                    "type": "boolean",
                    "description": "Has a HELP, VSL, SSL or other study and training support loan. Default false."
                  }
                },
                "required": [
                  "earnings",
                  "bonus",
                  "period"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result, amounts in AUD",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Input to fix; the error says what",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/annual_tax_estimate": {
      "post": {
        "operationId": "annual_tax_estimate",
        "summary": "Australian income tax and refund estimate",
        "description": "Australian income tax for a whole financial year and the likely refund or bill: tax at resident or foreign rates, low income tax offset, seniors and pensioners tax offset, Medicare levy with low-income and family reductions, Medicare levy surcharge and compulsory HELP/study loan repayments, compa...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "salary": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Salary or wages for the year from one employer (AUD), excluding super, overtime and bonuses."
                  },
                  "taxYear": {
                    "type": "string",
                    "enum": [
                      "2025-26",
                      "2026-27",
                      "2027-28"
                    ],
                    "description": "Financial year. Default 2026-27."
                  },
                  "overtime": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Overtime earnings for the year (AUD)."
                  },
                  "bonus": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Bonuses paid in the year (AUD)."
                  },
                  "otherIncome": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Other taxable income with no tax withheld, e.g. interest (AUD)."
                  },
                  "deductions": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Work-related expenses the person would itemise (AUD). From 2026-27 residents with work income get at least the $1,000 standard deduction, so amounts up to $1,000 don't change the result."
                  },
                  "otherDeductions": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Deductions not covered by the standard deduction, such as gifts to charity and tax agent fees (AUD)."
                  },
                  "payFrequency": {
                    "type": "string",
                    "enum": [
                      "weekly",
                      "fortnightly",
                      "monthly"
                    ],
                    "description": "How often the salary is paid, for tax withheld. Default fortnightly."
                  },
                  "salaryIncludesSuper": {
                    "type": "boolean",
                    "description": "salary is a package including the 12% super guarantee."
                  },
                  "privateHospitalCover": {
                    "type": "boolean",
                    "description": "Has private patient hospital cover all year. Default true (no Medicare levy surcharge)."
                  },
                  "family": {
                    "type": "object",
                    "description": "Spouse and dependent children, for the Medicare levy family reduction and surcharge thresholds.",
                    "properties": {
                      "spouse": {
                        "type": "boolean"
                      },
                      "spouseIncome": {
                        "type": "number",
                        "minimum": 0,
                        "description": "Spouse's taxable income (AUD)."
                      },
                      "dependants": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "Dependent children."
                      }
                    },
                    "additionalProperties": false
                  },
                  "sapto": {
                    "type": "string",
                    "enum": [
                      "single",
                      "couple",
                      "illness-separated"
                    ],
                    "description": "Eligible for the seniors and pensioners tax offset, with this status."
                  },
                  "taxFreeThreshold": {
                    "type": "boolean",
                    "description": "Tax-free threshold claimed with this employer. Default true (main job). Use false for a second job."
                  },
                  "tfnProvided": {
                    "type": "boolean",
                    "description": "Employee gave their tax file number. Default true. False applies the no-TFN rate."
                  },
                  "foreignResident": {
                    "type": "boolean",
                    "description": "Foreign resident for tax purposes. Default false."
                  },
                  "studyLoan": {
                    "type": "boolean",
                    "description": "Has a HELP, VSL, SSL or other study and training support loan. Default false."
                  }
                },
                "required": [
                  "salary"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result, amounts in AUD",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Input to fix; the error says what",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/super_guarantee": {
      "post": {
        "operationId": "super_guarantee",
        "summary": "Super guarantee",
        "description": "Australian superannuation guarantee (12%) an employer must pay on ordinary time earnings, or the split of a total package that includes super into base salary and super (package divided by 1.12). Use it for 'how much super is paid on $X' or 'what is the base salary in a $X package'.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Earnings (AUD), or the total package if includesSuper is true."
                  },
                  "includesSuper": {
                    "type": "boolean",
                    "description": "amount is a package that includes super. Default false."
                  }
                },
                "required": [
                  "amount"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result, amounts in AUD",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Input to fix; the error says what",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/identifier_validation": {
      "post": {
        "operationId": "identifier_validation",
        "summary": "ABN, ACN, TFN, BSB or account number validation",
        "description": "Checks an Australian Business Number (ABN), Australian Company Number (ACN) or tax file number (TFN) with the official check-digit algorithms, or the format of a BSB or bank account number. Returns valid true or false, with the normalised form or the reason it fails.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "abn",
                      "acn",
                      "tfn",
                      "bsb",
                      "bank_account"
                    ],
                    "description": "Which identifier: abn, acn, tfn, bsb or bank_account."
                  },
                  "value": {
                    "type": "string",
                    "description": "The number, with or without spaces or dashes, e.g. \"51 824 753 556\"."
                  }
                },
                "required": [
                  "type",
                  "value"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result, amounts in AUD",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Input to fix; the error says what",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/tax_rates": {
      "post": {
        "operationId": "tax_rates",
        "summary": "Australian tax rates and thresholds",
        "description": "Official Australian individual tax rates and thresholds for 2025-26, 2026-27 or 2027-28: resident and foreign resident brackets, low income tax offset, Medicare levy and surcharge thresholds, HELP repayment thresholds, seniors offset and the 12% super guarantee.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "taxYear": {
                    "type": "string",
                    "enum": [
                      "2025-26",
                      "2026-27",
                      "2027-28"
                    ],
                    "description": "Financial year. Default 2026-27."
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result, amounts in AUD",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Input to fix; the error says what",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/gst_calculation": {
      "post": {
        "operationId": "gst_calculation",
        "summary": "GST calculation",
        "description": "Adds 10% Australian GST to a price, or works out the GST included in a GST-inclusive price (the price divided by 11). Returns the price excluding GST, the GST and the price including GST, rounded to the cent. Use it for invoices, quotes and receipts.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "number",
                    "minimum": 0,
                    "description": "The price in AUD, e.g. 110."
                  },
                  "includesGst": {
                    "type": "boolean",
                    "description": "true if amount already includes GST (to take it out). Default false (GST is added)."
                  }
                },
                "required": [
                  "amount"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result, amounts in AUD",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Input to fix; the error says what",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
