Add Incomes to a User’s Tax Calculation

1099 Income

You should update your user's YTD running total of 1099 income as soon as new 1099 income is detected. This can be accomplished in two ways:

🔎

If you are looking to find the tax liability on specific 1099 incomes read: Calculate Taxes Owed On Specific Incomes.

Create incomes

Utilizing the POST /users/{userId}/incomes API endpoint, you can create new incomes for a user. All 1099 incomes for a year will be summed up and included in the tax calculation.

curl \
  --request POST \
  --url https://sandbox-api.withabound.com/v2/users/<<testUserId>>/incomes \
  --header 'Authorization: Bearer <<apiKey>>' \
  --header 'Content-Type: application/json' \
  --data '{
    "incomes": [
      {
        "amount": 212.16,
        "date": "2020-01-01",
        "description": "SSA Income",
        "foreignId": "your_foreign_id",
        "incomeType": "1099",
        "documentType": "ssa1099",
        "notes": {}
      }
      {
        "amount": 375.27,
        "date": "2020-08-16",
        "description": "Client Invoice",
        "category": "Design Services",
        "foreignId": "your_foreign_id_2",
        "incomeType": "1099",
        "notes": {}
      }
    ]
  }'
const { default: Abound, Environment } = require("@withabound/node-sdk");

const abound = new Abound({
  appId: "<<sandbox_app_id>>",
  appSecret: "<<sandbox_app_secret>>",
  environment: Environment.SANDBOX,
  apiVersion: "v2",
});

(async () => {
  const response = await abound.incomes.create(
    "<<testUserId>>",
    [
      {
        amount: 212.16,
        date: "2020-01-01",
        description: "SSA Income",
        foreignId: "your_foreign_id",
        incomeType: "1099",
        documentType: "ssa1099",
        notes: {},
      },
      {
        amount: 375.75,
        date: "2020-08-16",
        description: "Client Invoice",
        category:"Design Services",
        foreignId: "your_foreign_id_2",
        incomeType: "1099",
        notes: {},
      },
    ]
  );

  console.log(response);
})();
import requests

url = "https://sandbox-api.withabound.com/v2/users/<<testUserId>>/incomes"

payload = {"incomes": [
        {
            "amount": 212.16,
            "date": "2020-01-01",
            "description": "SSA Income",
            "incomeType": "1099",
            "documentType": "ssa1099",
            "foreignId": "your_foreign_id",
            "notes": {}
        },
        {
            "amount": 375.27,
            "date": "2020-08-16",
            "description": "Client Invoice",
            "category":"Design Services"
            "incomeType": "1099",
            "foreignId": "your_foreign_id_2",
            "notes": {}
        }
    ]}
headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
    "Authorization": "Bearer <<apiKey>>"
}

response = requests.request("POST", url, json=payload, headers=headers)

print(response.text)
// import com.squareup.okhttp.*;
// import com.google.gson.JsonObject;
// import com.google.gson.JsonArray;
// import com.withabound.AboundConfig;
// import com.withabound.models.*;
// import com.withabound.resources.base*;

AboundConfig aboundConfig = new AboundConfig(
  "<<sandbox_app_id>>",
  "<<sandbox_app_secret>>",
  AboundEnvironment.SANDBOX,
  AboundApiVersion.V2
);
Abound abound = new Abound(aboundConfig);
String userId = "<<testUserId>>";

IncomeRequest incomeRequestOne = IncomeRequest.builder()
  .incomeType(IncomeType.TEN99)
  .documentType(IncomeDocumentType.SSA1099)
  .description("SSA Income")
  .amount(212.16)
  .date("2020-01-01")
  .foreginId("your_foreign_id_1")
  .build();

IncomeRequest incomeRequestTwo = IncomeRequest.builder()
  .incomeType(IncomeType.TEN99)
  .description("Client Invoice")
  .category("Design Services")
  .amount(375.27)
  .date("2020-08-16")
  .foreginId("your_foreign_id_2")
  .build();


AboundBulkResponse<Income> response = abound.incomes().create(userId, Arrays.asList(
  incomeRequestOne,
  incomeRequestTwo
));

System.out.println(response.getData()); // list of created Incomes
package main

import (
    "bytes"
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://sandbox-api.withabound.com/v2/users/<<testUserId>>/incomes"

    var requestBody = []byte(`{
        "incomes": [
            {
                "amount": 212.16,
                "date": "2020-01-01",
                "description": "SSA Income",
                "incomeType": "1099",
        "documentType": "ssa1099",
                "foreignId": "your_foreign_id",
                "notes": {}
            },
      {
                "amount": 375.27,
                "date": "2020-08-16",
                "description": "Client Invoice",
        "category": "Design Services",
                "incomeType": "1099",
                "foreignId": "your_foreign_id_2",
                "notes": {}
            }
        ]
    }`)

    req, _ := http.NewRequest("POST", url, bytes.NewBuffer(requestBody))

    req.Header.Add("Accept", "application/json")
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("Authorization", "Bearer <<apiKey>>")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
// using RestSharp;

var client = new RestClient("https://sandbox-api.withabound.com/v2/users/<<testUserId>>/incomes");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Bearer <<apiKey>>");
request.AddJsonBody(new {
  incomes = new[] {
    new {
      amount = 212.16,
      date = "2020-01-01",
      description = "SSA Income",
      incomeType = "1099",
      documentType = "ssa1099",
      foreignId = "your_foreign_id",
      notes = new {}
    },
    new {
      amount = 375.27,
      date = "2020-08-16",
      description = "Client Invoice",
      incomeType = "1099",
      category = "Design Services",
      foreignId = "your_foreign_id_2",
      notes = new {}
    }
  }
});
IRestResponse response = client.Execute(request);
require 'uri'
require 'net/http'
require 'openssl'
require 'json'

url = URI("https://sandbox-api.withabound.com/v2/users/<<testUserId>>/incomes")
requestBody = {
  incomes: [
    {
      amount: 212.16,
      date: '2020-01-01',
      description: 'SSA Income',
      incomeType: '1099',
      documentType: 'ssa1099',
      foreignId: 'your_foreign_id',
      notes: {}
    },
    {
      amount: 375.27,
      date: '2020-08-16',
      description: 'Client Invoice',
      incomeType: '1099',
      category: 'Design Services',
      foreignId: 'your_foreign_id_2',
      notes: {}
    }
  ]
}

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Content-Type"] = 'application/json'
request["Authorization"] = 'Bearer <<apiKey>>'
request.body = requestBody.to_json

response = http.request(request)
puts response.read_body
{
    "data": [
        {
            "incomeId": "incomeId_05f71b627b3cb0f2a71b2e11344acddf33256323",
            "incomeType": "1099",
            "amount": 212.16,
            "description": "SSA Income",
            "date": "2020-01-01",
            "documentType": "ssa1099",
            "notes": {},
            "foreignId": "your_foreign_id"
        },
        {
            "incomeId": "incomeId_790b1cce9088d7d1d6f25b36fcf6e0ffa6e92ab4",
            "incomeType": "1099",
            "amount": 375.27,
            "description": "Client Invoice",
            "date": "2020-08-16",
            "category": "Design Services",
            "notes": {},
            "foreignId": "your_foreign_id_2"
        }
    ],
    "request": {
        "timestamp": 1640624086879,
        "requestId": "requestId_XXXXXXXXXXXXXX"
    }
}

Manually set 1099Income when calculating taxes

Update the 1099Income value by manually by calling the PUT/users/{userId}/taxes/{year} API endpoint. This value will manually override any previously entered incomes.

FieldDescription
1099IncomeThe total annual 1099 income for the user. The tax totals returned are the taxes owed on this income.
curl \
  --request PUT \
  --url https://sandbox-api.withabound.com/v2/users/<<testUserId>>/taxes/2020 \
  --header 'Authorization: Bearer <<apiKey>>' \
  --header 'Content-Type: application/json' \
  --data '{
    "taxes": {
      "1099Income": 85329.67
    }
  }'
const { default: Abound, Environment } = require("@withabound/node-sdk");

const abound = new Abound({
  appId: "<<sandbox_app_id>>",
  appSecret: "<<sandbox_app_secret>>",
  environment: Environment.SANDBOX,
  apiVersion: "v2",
});

(async () => {
  const response = await abound.taxes.calculate(
    "<<testUserId>>",
    "2020",
    {
      "1099Income": 85329.67,
    }
  );
  
  console.log(response);
})();
import requests

url = "https://sandbox-api.withabound.com/v2/users/<<testUserId>>/taxes/2020"

payload = {"taxes": {"1099Income": 85329.67}}
headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
    "Authorization": "Bearer <<apiKey>>"
}

response = requests.request("PUT", url, json=payload, headers=headers)

print(response.text)
//import com.withabound.AboundConfig;
//import com.withabound.models.*;
//import com.withabound.resources.base*;

AboundConfig aboundConfig = new AboundConfig(
  "<<sandbox_app_id>>",
  "<<sandbox_app_secret>>",
  AboundEnvironment.SANDBOX,
  AboundApiVersion.V2
);
Abound abound = new Abound(aboundConfig);
String userId = "<<testUserId>>";
String year = "2020";
TaxRequest taxUpdates = TaxRequest.builder()
  .ten99Income(85329.67)
  .build();

AboundResponse<Tax> response = abound.taxes().calculate(userId, year, taxUpdates);

System.out.println(response.getData().getEffectiveTaxRate());
package main

import (
    "bytes"
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://sandbox-api.withabound.com/v2/users/<<testUserId>>/taxes/2020"

    var requestBody = []byte(`{
        "taxes": {
            "1099Income": 85329.67
        }
    }`)

    req, _ := http.NewRequest("PUT", url, bytes.NewBuffer(requestBody))

    req.Header.Add("Accept", "application/json")
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("Authorization", "Bearer <<apiKey>>")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
// using RestSharp;

var client = new RestClient("https://sandbox-api.withabound.com/v2/users/<<testUserId>>/taxes/2020");
var request = new RestRequest(Method.PUT);
request.AddHeader("Accept", "application/json");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Bearer <<apiKey>>");
request.AddJsonBody(new {
  taxes = new {
    1099Income = 85329.67
  }
});
IRestResponse response = client.Execute(request);
require 'uri'
require 'net/http'
require 'openssl'
require 'json'

url = URI("https://sandbox-api.withabound.com/v2/users/<<testUserId>>/taxes/2020")
requestBody = {
  taxes: {
    '1099Income': 85329.67
  }
}

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Accept"] = 'application/json'
request["Content-Type"] = 'application/json'
request["Authorization"] = 'Bearer <<apiKey>>'
request.body = requestBody.to_json

response = http.request(request)
puts response.read_body

The response from this API call is the same as detailed in the Calculate Taxes Owed for a Specific User guide.

W-2 Income

Including your user's W-2 earnings (when applicable) will improve the accuracy of our tax calculations. You can update the w2Income value by calling the PUT /users/{userId}/taxes/{year} API endpoint.

FieldDescription
w2IncomeThe user’s expected annual gross W-2 income with pretax deductions removed (if applicable). w2Income informs the tax bracket to be used when calculating the taxes owed on the 1099 income. The taxes owed on w2income are not included in the tax totals returned, as it is assumed to be already withheld by the employer.
curl \
  --request PUT \
  --url https://sandbox-api.withabound.com/v2/users/<<testUserId>>/taxes/2020 \
  --header 'Authorization: Bearer <<apiKey>>' \
  --header 'Content-Type: application/json' \
  --data '{
    "taxes": {
      "w2Income": 60000
    }
  }'
const { default: Abound, Environment } = require("@withabound/node-sdk");

const abound = new Abound({
  appId: "<<sandbox_app_id>>",
  appSecret: "<<sandbox_app_secret>>",
  environment: Environment.SANDBOX,
  apiVersion: "v2",
});

(async () => {
  const response = await abound.taxes.calculate(
    "<<testUserId>>",
    "2020",
    {
      w2Income: 60000,
    }
  );
  
  console.log(response);
})();
import requests

url = "https://sandbox-api.withabound.com/v2/users/<<testUserId>>/taxes/2020"

payload = {"taxes": {"w2Income": 60000}}
headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
    "Authorization": "Bearer <<apiKey>>"
}

response = requests.request("PUT", url, json=payload, headers=headers)

print(response.text)
//import com.withabound.AboundConfig;
//import com.withabound.models.*;
//import com.withabound.resources.base*;

AboundConfig aboundConfig = new AboundConfig(
  "<<sandbox_app_id>>",
  "<<sandbox_app_secret>>",
  AboundEnvironment.SANDBOX,
  AboundApiVersion.V2
);
Abound abound = new Abound(aboundConfig);

String userId = "<<testUserId>>";
String year = "2020";
TaxRequest taxUpdates = TaxRequest.builder()
  .w2Income(60000.00)
  .build();

AboundResponse<Tax> response = abound.taxes().calculate(userId, year, taxUpdates);

System.out.println(response.getData().getEffectiveTaxRate());
package main

import (
    "bytes"
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://sandbox-api.withabound.com/v2/users/<<testUserId>>/taxes/2020"

    var requestBody = []byte(`{
        "taxes": {
            "w2Income": 60000
        }
    }`)

    req, _ := http.NewRequest("PUT", url, bytes.NewBuffer(requestBody))

    req.Header.Add("Accept", "application/json")
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("Authorization", "Bearer <<apiKey>>")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
// using RestSharp;

var client = new RestClient("https://sandbox-api.withabound.com/v2/users/<<testUserId>>/taxes/2020");
var request = new RestRequest(Method.PUT);
request.AddHeader("Accept", "application/json");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Bearer <<apiKey>>");
request.AddJsonBody(new {
  taxes = new {
    w2Income = 60000
  }
});
IRestResponse response = client.Execute(request);
require 'uri'
require 'net/http'
require 'openssl'
require 'json'

url = URI("https://sandbox-api.withabound.com/v2/users/<<testUserId>>/taxes/2020")
requestBody = {
  taxes: {
    w2Income: 60000
  }
}

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Accept"] = 'application/json'
request["Content-Type"] = 'application/json'
request["Authorization"] = 'Bearer <<apiKey>>'
request.body = requestBody.to_json

response = http.request(request)
puts response.read_body

The response from this API call is the same as detailed in the Calculate Taxes Owed for a Specific User guide.