Create a Payer

The PayerPayer - An entity that makes payments for: services performed by independent contractors (1099-NEC), interest on a business debt (1099-INT), and payment card transactions settled on behalf of merchants (1099-K). is a foundational resource for 1099 Filing and Issuance, which can be broken in two steps:

  1. Create a Payer
  2. Save the payerId

1. Create a Payer

To create a new Payer, call the POST /payers API endpoint.

curl \
  --request POST \
  --url https://sandbox-api.withabound.com/v2/payers \
  --header 'Authorization: Bearer <<apiKey>>' \
  --header 'Content-Type: application/json' \
  --data '{
    "payers": [
      {
        "name": "Acme Inc",
        "address": "123 Main St.",
        "address2": "Suite 124",
        "city": "Smallville",
        "state": "CA",
        "country": "US",
        "zipcode": "10001",
        "phoneNumber": "5555555555",
        "taxIdNumber": "123456789"
      }
    ]
  }'
const fetch = require('node-fetch');

const url = 'https://sandbox-api.withabound.com/v2/payers';
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    'Content-Type': 'application/json',
    Authorization: 'Bearer <<apiKey>>'
  },
  body: JSON.stringify({
    payers: [
      {
        name: "Acme Inc",
        address: "123 Main St.",
        address2: "Suite 124",
        city: "Smallville",
        state: "CA",
        country: "US",
        zipcode: "10001",
        phoneNumber: "5555555555",
        taxIdNumber: "123456789"
      }
    ]
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));
import requests

url = "https://sandbox-api.withabound.com/v2/payers"

payload = {"payers": [
        {
            "name": "Acme Inc",
            "address": "123 Main St.",
            "address2": "Suite 124",
            "city": "Smallville",
            "state": "CA",
            "country": "US",
            "zipcode": "10001",
            "phoneNumber": "5555555555",
            "taxIdNumber": "123456789"
        }
    ]}
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;

OkHttpClient client = new OkHttpClient();

JsonObject requestBody = new JsonObject();
JsonArray payers = new JsonArray();
JsonObject payerOne = new JsonObject();

payerOne.addProperty("name", "Acme Inc");
payerOne.addProperty("address", "123 Main St.");
payerOne.addProperty("address2", "Suite 124");
payerOne.addProperty("city", "Smallville");
payerOne.addProperty("state", "CA");
payerOne.addProperty("country", "US");
payerOne.addProperty("zipcode", "10001");
payerOne.addProperty("phoneNumber", "5555555555");
payerOne.addProperty("taxIdNumber", "123456789");

payers.add(payerOne);

requestBody.add("payers", payers);

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, requestBody.toString());
Request request = new Request.Builder()
  .url("https://sandbox-api.withabound.com/v2/payers")
  .post(body)
  .addHeader("Accept", "application/json")
  .addHeader("Content-Type", "application/json")
  .addHeader("Authorization", "Bearer <<apiKey>>")
  .build();

Response response = client.newCall(request).execute();
package main

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

func main() {

    url := "https://sandbox-api.withabound.com/v2/payers"

    var requestBody = []byte(`{
        "payers": [
            {
                "name": "Acme Inc",
                "address": "123 Main St.",
                "address2": "Suite 124",
                "city": "Smallville",
                "state": "CA",
                "country": "US",
                "zipcode": "10001",
                "phoneNumber": "5555555555",
                "taxIdNumber": "123456789"
            }
        ]
    }`)

    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/payers");
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 {
  payers = new[] {
    new {
      name = "Acme Inc",
      address = "123 Main St.",
      address2 = "Suite 124",
      city = "Smallville",
      state = "CA",
      country = "US",
      zipcode = "10001",
      phoneNumber = "5555555555",
      taxIdNumber = "123456789"
    }
  }
});
IRestResponse response = client.Execute(request);
require 'uri'
require 'net/http'
require 'openssl'
require 'json'

url = URI("https://sandbox-api.withabound.com/v2/payers")
requestBody = {
  payers: [
    {
      name: 'Acme Inc',
      address: '123 Main St.',
      address2: 'Suite 124',
      city: 'Smallville',
      state: 'CA',
      country: 'US',
      zipcode: '10001',
      phoneNumber: '5555555555',
      taxIdNumber: '123456789'
    }
  ]
}

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

2. Save the payerId

The response from POST /payers is shown below. It's crucial that you save the payerId to your own database for future reference.

{
  "data": {
    "payerId": "<<testPayerId>>",
    "name": "Acme Inc",
    "address": "123 Main St.",
    "address2": "Suite 124",
    "city": "Smallville",
    "state": "CA",
    "country": "US",
    "zipcode": "10001",
    "phoneNumber": "5555555555"
  }
}

You’ve now created a PayerPayer - An entity that makes payments for: services performed by independent contractors (1099-NEC), interest on a business debt (1099-INT), and payment card transactions settled on behalf of merchants (1099-K)..


Did this page help you?