{
  "openapi": "3.1.0",
  "info": {
    "title": "AfterTax AU API: Australian pay and tax",
    "version": "0.2.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: gross pay, PAYG tax withheld, net pay and employer super for each week, fortnight and month and for the year, plus the actual tax owed for the year and the likely refund.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "salary": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Annual salary in AUD, excluding super (unless salaryIncludesSuper). Give salary or hourlyRate."
                  },
                  "hourlyRate": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Hourly rate in AUD, excluding super."
                  },
                  "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/payg_withholding": {
      "post": {
        "operationId": "payg_withholding",
        "summary": "PAYG withholding for one pay",
        "description": "Exact amount an Australian employer must withhold from one pay under the ATO's PAYG withholding Schedule 1 (NAT 1004), for weekly, fortnightly, monthly or quarterly pays in 2025-26 or 2026-27.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "earnings": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Gross earnings for the pay period in AUD, including taxable allowances and overtime."
                  },
                  "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 similar one-off payment made with a regular pay in Australia (ATO Schedule 5, Method A), for 2025-26 or 2026-27.",
        "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": "Income tax owed for an Australian financial year and the refund or bill against tax withheld: tax at resident or foreign rates, low income tax offset, seniors and pensioners tax offset, Medicare levy (including family and low-income reductions), Medicare levy surcharge, and compulsory HELP/study ...",
        "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": "Tax deductions (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 pays on earnings, or split a total package that includes super into salary and super.",
        "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/validate_au_identifier": {
      "post": {
        "operationId": "validate_au_identifier",
        "summary": "Validate an ABN, ACN, TFN, BSB or account number",
        "description": "Check an Australian Business Number (ABN), Australian Company Number (ACN) or tax file number (TFN) with the official check-digit algorithms, or check the format of a BSB or bank account number. Returns the normalised form or the reason it's invalid.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "abn",
                      "acn",
                      "tfn",
                      "bsb",
                      "bank_account"
                    ],
                    "description": "Which identifier."
                  },
                  "value": {
                    "type": "string",
                    "description": "The number, with or without spaces or dashes."
                  }
                },
                "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 a financial year: resident and foreign resident brackets, low income tax offset, Medicare levy and surcharge thresholds, HELP repayment thresholds, seniors offset and the super guarantee rate.",
        "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"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
