---
updatedAt: 2026-10-27T14:37:08.000Z
agentTools:
  projectIndex: https://developers.masspay.io/llms.txt
---

# Get list of users' annual balance

This **GET**  endpoint is used to get tax information for a specific user identified by their `user_token`. It provides access to historical tax attribute values as well as the ability to perform attribute velocity checks. <br>  To use this endpoint, replace `user_token` in the URL path with the actual user token of the user whose tax information you want to retrieve. This endpoint's purpose is to aid in the identification of users with matching attribute values and to prevent fraudulent activities by monitoring unusual attribute value changes over time. It compares the provided attribute value to the historical attribute values for the same user to see if it meets the velocity check criteria.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "description": "MassPay API",
    "version": "1.0.0",
    "title": "MassPay API",
    "termsOfService": "https://www.masspay.io/terms/",
    "contact": {
      "name": "MassPay",
      "email": "info@masspay.io",
      "url": "https://www.masspay.io"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    }
  },
  "tags": [
    {
      "name": "Tax",
      "description": "Tax resource for managing tax responsibilities."
    }
  ],
  "paths": {
    "/payout/tax": {
      "get": {
        "summary": "Get list of users' annual balance",
        "description": "This **GET**  endpoint is used to get tax information for a specific user identified by their `user_token`. It provides access to historical tax attribute values as well as the ability to perform attribute velocity checks. <br>  To use this endpoint, replace `user_token` in the URL path with the actual user token of the user whose tax information you want to retrieve. This endpoint's purpose is to aid in the identification of users with matching attribute values and to prevent fraudulent activities by monitoring unusual attribute value changes over time. It compares the provided attribute value to the historical attribute values for the same user to see if it meets the velocity check criteria.",
        "tags": [
          "Tax"
        ],
        "responses": {
          "200": {
            "description": "Succesful operation.",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TaxYearUserResp"
                  }
                },
                "examples": {
                  "List of Tax Response": {
                    "value": [
                      {
                        "user_token": "usr_123e4567-e89b-12d3-a456-426614174000",
                        "address1": "2000 main st",
                        "address2": "apt D",
                        "city": "Santa Monica",
                        "state_province": "CA",
                        "postal_code": 90405,
                        "country": "USA",
                        "first_name": "John",
                        "middle_name": "",
                        "last_name": "Doe",
                        "email": "jdoe@masspay.io",
                        "mobile_number": "16502000226",
                        "business_name": "ABC Company",
                        "date_of_birth": "1975-03-24",
                        "balance": 1500,
                        "tax_id": "123-45-678"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error401"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error403"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed.",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error405"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error500"
                }
              }
            }
          },
          "504": {
            "description": "Gateway Time-out.",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error504"
                }
              }
            }
          }
        },
        "operationId": "get-tax-users",
        "parameters": [
          {
            "schema": {
              "type": "number"
            },
            "in": "query",
            "name": "amount_threshold",
            "description": "If specified, only show users whose total balance exceeds the provided amount",
            "required": true
          },
          {
            "schema": {
              "type": "integer"
            },
            "in": "query",
            "name": "tax_year",
            "description": "The year for which we would like to obtain tax information for. If none provided, defaults to previous year.",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "usr_aac401aa-6e5e-4af4-bcc1-2e06c18a4735,usr_2baa773a-9ce6-401a-944b-dd95098e6730"
            },
            "in": "query",
            "name": "user_token",
            "description": "Optional user token. When provider, it will return the tax amount for the provided users. For more than one user, provided the tokens comma separated."
          }
        ],
        "security": [
          {
            "AUTHORIZER_NAME": []
          },
          {
            "api_key": []
          }
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://{environment}.masspay.io/{VERSION}",
      "description": "MassPay's API server",
      "variables": {
        "VERSION": {
          "default": "v1.0.0",
          "enum": [
            "v1.0.0"
          ]
        },
        "environment": {
          "default": "api",
          "enum": [
            "api",
            "staging-api"
          ]
        }
      }
    }
  ],
  "components": {
    "schemas": {
      "TaxYearUserResp": {
        "title": "TaxYearUserResp",
        "type": "object",
        "required": [
          "address1",
          "city",
          "country",
          "first_name",
          "last_name",
          "date_of_birth",
          "balance"
        ],
        "properties": {
          "user_token": {
            "type": "string",
            "description": "The user token that needs to be fetched.",
            "example": "123e4567-e89b-12d3-a456-426614174000"
          },
          "address1": {
            "type": "string",
            "description": "The user's street address.",
            "example": "2000 main st"
          },
          "address2": {
            "type": "string",
            "description": "The user's street address, line 2.",
            "example": "apt D"
          },
          "city": {
            "type": "string",
            "description": "The user's city.",
            "example": "Santa Monica"
          },
          "state_province": {
            "type": "string",
            "description": "The user's state/province.",
            "example": "CA"
          },
          "postal_code": {
            "type": "number",
            "description": "The user's postal code.",
            "example": 90405
          },
          "country": {
            "type": "string",
            "description": "The user's country code. [ISO_3166-1_alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) code.",
            "example": "USA"
          },
          "first_name": {
            "type": "string",
            "description": "The user's first name. If Business account, the first name of the representative.",
            "example": "John"
          },
          "middle_name": {
            "type": "string",
            "description": "The user's middle name. If Business account, the middle name of the representative."
          },
          "last_name": {
            "type": "string",
            "description": "The user's last name. If Business account, the last name of the representative.",
            "example": "Doe"
          },
          "email": {
            "type": "string",
            "description": "The user's e-mail address. Must be unique. Cannot have two users with the same e-mail address.",
            "example": "jdoe@gmail.com"
          },
          "mobile_number": {
            "type": "string",
            "description": "Mobile phone number in [international format](https://en.wikipedia.org/wiki/National_conventions_for_writing_telephone_numbers#).",
            "example": "16502000226"
          },
          "business_name": {
            "type": "string",
            "description": "Name of business",
            "example": "ABC Company"
          },
          "date_of_birth": {
            "type": "string",
            "format": "date",
            "description": "Date of birth. Minimum 18 years old.",
            "example": "1975-03-24"
          },
          "balance": {
            "type": "number",
            "description": "Current user balance",
            "example": 1500
          },
          "payout_count": {
            "type": "integer",
            "description": "Total count of payouts"
          },
          "tax_id": {
            "type": "string",
            "description": "User Tax ID. This can be a Taxpayer Identification Number (TIN), Social Security Number (SSN), Individual Taxpayer Identification Number (ITIN) or Employer Identification Number (EIN).",
            "example": "123-45-678"
          }
        }
      },
      "Error400": {
        "description": "Bad request.",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "title": {
            "type": "string",
            "description": "Error title.",
            "enum": [
              "Bad request."
            ],
            "example": "Bad request."
          },
          "message": {
            "type": "string",
            "description": "Error description.",
            "enum": [
              "The request was invalid or malformed. Please ensure that the request body conforms to the required format and that all required parameters are included."
            ],
            "example": "The request was invalid or malformed. Please ensure that the request body conforms to the required format and that all required parameters are included."
          },
          "code": {
            "type": "integer",
            "description": "Error code.",
            "enum": [
              400
            ],
            "example": 400
          },
          "error": {
            "type": "object",
            "properties": {
              "reason": {
                "type": "string",
                "example": "Error initiating payout",
                "description": "Reason for error"
              },
              "details": {
                "type": "array",
                "description": "Specific details of the cause of the error",
                "items": {
                  "type": "string",
                  "example": "Source amount cannot be $0"
                }
              }
            }
          }
        },
        "required": [
          "message",
          "code"
        ]
      },
      "Error401": {
        "description": "Unauthorized.",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Error title.",
            "enum": [
              "Unauthorized."
            ],
            "example": "Unauthorized."
          },
          "message": {
            "type": "string",
            "description": "Error description.",
            "enum": [
              "Authentication failed or credentials were not provided. Please ensure that you have provided valid API credentials and that they are authorized to access the MassPay API."
            ],
            "example": "Authentication failed or credentials were not provided. Please ensure that you have provided valid API credentials and that they are authorized to access the MassPay API."
          },
          "code": {
            "type": "integer",
            "description": "Error code.",
            "enum": [
              401
            ],
            "example": 401
          }
        },
        "additionalProperties": false,
        "required": [
          "error",
          "message",
          "code"
        ]
      },
      "Error403": {
        "description": "Forbidden.",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Error title.",
            "enum": [
              "Forbidden."
            ],
            "example": "Forbidden."
          },
          "message": {
            "type": "string",
            "description": "Error description.",
            "enum": [
              "The requested action is not allowed or the API credentials do not have sufficient permissions. Please ensure that the API credentials used for the request have the necessary permissions to perform the requested action."
            ],
            "example": "The requested action is not allowed or the API credentials do not have sufficient permissions. Please ensure that the API credentials used for the request have the necessary permissions to perform the requested action."
          },
          "code": {
            "type": "integer",
            "description": "Error code.",
            "enum": [
              403
            ],
            "example": 403
          }
        },
        "additionalProperties": false,
        "required": [
          "error",
          "message",
          "code"
        ]
      },
      "Error405": {
        "description": "Method not allowed.",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Error title.",
            "enum": [
              "Method not allowed."
            ],
            "example": "Method not allowed."
          },
          "message": {
            "type": "string",
            "description": "Error description.",
            "enum": [
              "The HTTP method used for the request is not supported by the MassPay API. Please ensure that you are using the correct HTTP method (e.g., POST) for the specific MassPay API endpoint."
            ],
            "example": "The HTTP method used for the request is not supported by the MassPay API. Please ensure that you are using the correct HTTP method (e.g., POST) for the specific MassPay API endpoint."
          },
          "code": {
            "type": "integer",
            "description": "Error code.",
            "enum": [
              405
            ],
            "example": 405
          }
        },
        "additionalProperties": false,
        "required": [
          "error",
          "message",
          "code"
        ]
      },
      "Error500": {
        "description": "Internal server error",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Error title.",
            "enum": [
              "Internal server error."
            ],
            "example": "Internal server error."
          },
          "message": {
            "type": "string",
            "description": "Error description.",
            "enum": [
              "An unexpected error occurred on the server-side while processing the request. Please try again later or contact support if the issue persists."
            ],
            "example": "An unexpected error occurred on the server-side while processing the request. Please try again later or contact support if the issue persists."
          },
          "code": {
            "type": "integer",
            "description": "Error code.",
            "enum": [
              500
            ],
            "example": 500
          }
        },
        "additionalProperties": false,
        "required": [
          "error",
          "message",
          "code"
        ]
      },
      "Error504": {
        "description": "Gateway Time-out.",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Error title.",
            "enum": [
              "Gateway Time-out."
            ],
            "example": "Gateway Time-out."
          },
          "message": {
            "type": "string",
            "description": "Error description.",
            "enum": [
              "The request timed out while waiting for a response from the server. Please try again later or contact support if the issue persists."
            ],
            "example": "The request timed out while waiting for a response from the server. Please try again later or contact support if the issue persists."
          },
          "code": {
            "type": "integer",
            "description": "Error code.",
            "enum": [
              500
            ],
            "example": 500
          }
        },
        "additionalProperties": false,
        "required": [
          "error",
          "message",
          "code"
        ]
      }
    },
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header"
      },
      "AUTHORIZER_NAME": {
        "name": "Authorization",
        "in": "header",
        "type": "apiKey"
      }
    }
  }
}
```