Account Statements

Overview

With Abound's Account Statement API you can:

  • Issue a brand-specific account statement (expect more customizations in the future)
  • Include all fields, as required by law, including account holder details, interest-related figures, period-specific data and customer service information
  • Access each statement for at least five years in order to remain compliant with the OCC's record-keeping requirements

Creating an Account Statement

To create an Account Statement, first, we need to Create a User. Users are a foundational resource of every API call.

After we have a UserUser - A single end-user of your application. Each user has a unique userId, which should be stored in your database and used to make API requests on behalf of this individual., let's create some incomes and expenses. Use POST /users/{userId}/incomes API endpoint to create incomes and POST /users/{userId}/expenses API endpoint to create expenses.

Now we can call the POST /documents API endpoint to create an Account Statement.

curl \
  --request POST \
  --url https://sandbox-api.withabound.com/v2/users/<<testUserId>>/documents \
  --header 'Authorization: Bearer <<apiKey>>' \
  --header 'Content-Type: application/json' \
  --data '{
    "documents": [
      {
        "type": "accountStatement",
        "year": 2020,
        "beginDate": "2020-01-01",
        "endDate": "2020-01-31",
        "accountNumber": "1234567890",
        "summary": {
          "beginningBalance": 5810.70,
          "endingBalance": 7230.13,
          "interestPercentage": 0.0014,
          "interestAmount": 10.12,
          "totalFees": 5
        },
        "bank": {
          "name": "Spacebucks",
          "logo": "data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAA1JREFUGFdjMDY2/g8AAs8BmT556WsAAAAASUVORK5CYII=",
          "address": "123 Jolly Lane",
          "address2": "Suite #123",
          "city": "San Francisco",
          "state": "CA",
          "zipcode": "94102",
          "customerService": {
            "phoneNumber": "1-888-123-BANK",
            "email": "[email protected]",
            "website": "https://fakebank.com",
            "instrucations": "Instruction text"
          }
        },
        "disclosure": "Disclosure text"
      }
    ]
  }'
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.documents.create(
    "<<testUserId>>",
    [
      {
        type: "accountStatement",
        year: 2020,
        beginDate: "2020-01-01",
        endDate: "2020-01-31",
        accountNumber: "1234567890",
        summary: {
          beginningBalance: 5810.7,
          endingBalance: 7230.13,
          interestPercentage: 0.0014,
          interestAmount: 10.12,
          totalFees: 5,
        },
        bank: {
          name: "Spacebucks",
          logo: "data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAA1JREFUGFdjMDY2/g8AAs8BmT556WsAAAAASUVORK5CYII=",
          address: "123 Jolly Lane",
          address2: "Suite #123",
          city: "San Francisco",
          state: "CA",
          zipcode: "94102",
          customerService: {
            phoneNumber: "1-888-123-BANK",
            email: "[email protected]",
            website: "https://fakebank.com",
            instructions: "Instruction text",
          },
        },
        disclosure: "Disclosure text",
      },
    ]
  );

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

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

payload = {"documents": [
        {
            "type": "accountStatement",
            "year": 2020,
            "beginDate": "2020-01-01",
            "endDate": "2020-01-31",
            "accountNumber": "1234567890",
            "summary": {
                "beginningBalance": 5810.7,
                "endingBalance": 7230.13,
                "interestPercentage": 0.0014,
                "interestAmount": 10.12,
                "totalFees": 5
            },
            "disclosure": "Disclosure Text",
            "bank": {
                "name": "Spacebucks",
                "logo": "data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAA1JREFUGFdjMDY2/g8AAs8BmT556WsAAAAASUVORK5CYII=",
                "address": "123 Jolly Lane",
                "address2": "Suite #123",
                "city": "San Francisco",
                "state": "CA",
                "zipcode": "94102",
                "customerService": {
                    "phoneNumber": "1-888-123-BANK",
                    "email": "[email protected]",
                    "website": "https://fakebank.com",
                    "instructions": "Instruction Text"
                }
            }
        }
    ]}
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 documents = new JsonArray();
JsonObject accountStatement = new JsonObject();
JsonObject accountStatementSummary = new JsonObject();
JsonObject accountStatementBank = new JsonObject();
JsonObject accountStatementBankCustomerService = new JsonObject();

accountStatement.addProperty("type", "accountStatement");
accountStatement.addProperty("year", 2020);
accountStatement.addProperty("beginDate", "2020-01-01");
accountStatement.addProperty("endDate", "2020-01-31");
accountStatement.addProperty("accountNumber", "1234567890");
accountStatement.addProperty("disclosure", "Disclosure text");

accountStatementSummary.addProperty("beginningBalance": 5810.70);
accountStatementSummary.addProperty("endingBalance": 7230.13);
accountStatementSummary.addProperty("interestPercentage": 0.0014);
accountStatementSummary.addProperty("interestAmount": 10.12);
accountStatementSummary.addProperty("totalFees": 5);

accountStatement.add("summary", accountStatementSummary);

accountStatementBank.addProperty("name", "Spacebucks");
accountStatementBank.addProperty("logo", "data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAA1JREFUGFdjMDY2/g8AAs8BmT556WsAAAAASUVORK5CYII=");
accountStatementBank.addProperty("address", "123 Jolly Lane");
accountStatementBank.addProperty("address2", "Suite #123");
accountStatementBank.addProperty("city", "San Francisco");
accountStatementBank.addProperty("state", "CA");
accountStatementBank.addProperty("zipcode", "94102");

accountStatementBankCustomerService.addProperty("phoneNumber", "1-888-123-BANK");
accountStatementBankCustomerService.addProperty("email", "[email protected]");
accountStatementBankCustomerService.addProperty("website", "https://fakebank.com");
accountStatementBankCustomerService.addProperty("instrucations", "Instruction text");

accountStatementBank.add("customerService", accountStatementBankCustomerService);

accountStatement.add("bank", accountStatementBank);

documents.add(accountStatement);

requestBody.add("documents", documents);

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/users/<<testUserId>>/documents")
  .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/users/<<testUserId>>/documents"

    var requestBody = []byte(`{
        "documents": [
            {
                "type": "accountStatement",
                "year": 2020,
                "beginDate": "2020-01-01",
                "endDate": "2020-01-31",
                "accountNumber": "1234567890",
                "summary": {
                    "beginningBalance": 5810.70,
                    "endingBalance": 7230.13,
                    "interestPercentage": 0.0014,
                    "interestAmount": 10.12,
                    "totalFees": 5
                },
                "bank": {
                    "name": "Spacebucks",
                    "logo": "data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAA1JREFUGFdjMDY2/g8AAs8BmT556WsAAAAASUVORK5CYII=",
                    "address": "123 Jolly Lane",
                    "address2": "Suite #123",
                    "city": "San Francisco",
                    "state": "CA",
                    "zipcode": "94102",
                    "customerService": {
                        "phoneNumber": "1-888-123-BANK",
                        "email": "[email protected]",
                        "website": "https://fakebank.com",
                        "instrucations": "Instruction text"
                    }
                },
                "disclosure": "Disclosure text"
            }
        ]
    }`)

    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>>/documents");
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 {
  documents = new[] {
    new {
      type = "accountStatement",
      year = 2020,
      beginDate = "2020-01-01",
      endDate = "2020-01-31",
      accountNumber = "1234567890",
      summary = new {
        beginningBalance = 5810.70,
        endingBalance = 7230.13,
        interestPercentage = 0.0014,
        interestAmount = 10.12,
        totalFees = 5
      },
      bank = new {
        name = "Spacebucks",
        logo = "data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAA1JREFUGFdjMDY2/g8AAs8BmT556WsAAAAASUVORK5CYII=",
        address = "123 Jolly Lane",
        address2 = "Suite #123",
        city = "San Francisco",
        state = "CA",
        zipcode = "94102",
        customerService = new {
          phoneNumber = "1-888-123-BANK",
          email = "[email protected]",
          website = "https://fakebank.com",
          instructions = "Instruction text"
        }
      },
      disclosure = "Disclosure text"
    }
  }
});
IRestResponse response = client.Execute(request);
require 'uri'
require 'net/http'
require 'openssl'
require 'json'

url = URI("https://sandbox-api.withabound.com/v2/users/<<testUserId>>/documents")
requestBody = {
  documents: [
    {
      type: 'accountStatement',
      year: 2020,
      beginDate: '2020-01-01',
      endDate: '2020-01-31',
      accountNumber: '1234567890',
      summary: {
        beginningBalance: 5810.70,
        endingBalance: 7230.13,
        interestPercentage: 0.0014,
        interestAmount: 10.12,
        totalFees: 5
      },
      bank: {
        name: 'Spacebucks',
        logo: 'data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAA1JREFUGFdjMDY2/g8AAs8BmT556WsAAAAASUVORK5CYII=',
        address: '123 Jolly Lane',
        address2: 'Suite #123',
        city: 'San Francisco',
        state: 'CA',
        zipcode: '94102',
        customerService: {
          phoneNumber: '1-888-123-BANK',
          email: '[email protected]',
          website: 'https://fakebank.com',
          instructions: 'Instruction text'
        }
      },
      disclosure: 'Disclosure text'
    }
  ]
}

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

Field

Description

type

The type of document to create: accountStatement

year

The year associated with this account statement.

beginDate

The date representing the start of this period. Follows YYYY-MM-DD format.

endDate

The date representing the end of this period. Follows YYYY-MM-DD format.

accountNumber

The ten-digit account number associated with this account statement. Numerical digits only.

summary.beginningBalance

The balance at the beginning of the period.

summary.endingBalance

The balance at the end of the period.

summary.interestPercentage

The annual percentage yield earned during this period.

summary.interestAmount

The dollar amount of interest earned during this period.

summary.totalFees

The total service charges and/or fees accrued during this period.

bank.name

The bank's name.

bank.logo

The bank's base64 encoded logo.

bank.address

The bank's legal street address.

bank.address2

The second part of the bank's legal street address such as a suite number.

bank.city

The bank's city, associated with the street address.

bank.state

The two-letter character code for this bank's state. (e.g. CA for California)

bank.zipcode

The bank's zip code, associated with the street address.

bank.customerService.phoneNumber

The bank's customer service phone number.

bank.customerService.email

The bank's customer service email address.

bank.customerService.website

The bank's website address.

bank.customerService.instructions

Instruction text to include on the customer service page.

disclosure

The disclosure text to place at the bottom of all account statement pages. Maximum of one thousand (1000) characters.

After your Account Statement has been created, you will receive a documentURL where you can access the generated Account Statement PDF.

{
  "documentId": "documentId_testefbd5d3d9ee9526ef9ff89a7c6b879174170",
  "documentURL": "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/test62ae93bafa6310aa9952e8b3bf5796443111/2020-01-01_2020-01-31_Account_Statement_7890.pdf?AWSAccessKeyId=AKIA6C6AUYYBZMXK74XQ&Expires=1629919965&Signature=vDp7XgGkRJdgmVLe3P7sNuwKl0o%3D",
  "documentName": "2021-01-01 - 2021-01-31 Account Statement (7890)",
  "type": "accountStatement",
  "year": "2020",
  "createdTimestamp": 1628271669618
}

Abound documents are immutable. If you want to make changes to an Account Statement, create a new document with your changes using the POST /documents API endpoint.


Did this page help you?