Trax Platform APIv1

Account balances and statements

A family's money account holds what they owe and what they paid. These calls show it: the balances, the transactions, and an annual payment summary. Every call needs the family's access token. They only read: none of them opens an account for a family that has none (the answers are then zeros and empty lists).

Every amount is computed on the server, in cents. Show the numbers as they come; don't add charges up yourself.

Balances

The account's balances

GET https://api.nfocus.solutions/v1/portals/riverbend/north/account/balance → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/portals/riverbend/north/account/balance' \
  -H 'Authorization: Bearer your_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/portals/riverbend/north/account/balance', {
  headers: {
    'Authorization': 'Bearer your_access_token',
  },
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.nfocus.solutions/v1/portals/riverbend/north/account/balance");
request.Headers.Authorization = new("Bearer", "your_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

GET …/account/balance answers:

Field Meaning
accountBalanceCents Everything still owed on the account
dueNowCents What is due on or before today, in the organization's calendar. Show an "outstanding balance" banner when it is above zero
pastDueCents What was due before today. This is the number the balance-due rule checks before a registration (Household and eligibility guide)
currentMonthCents, currentMonthEnd What is due by the end of this month
showCurrentMonthBalance The organization's choice: open on this month's balance (true) or only show the account balance (false)
creditCents Credit on the account. Checkout doesn't spend it
charges Each unpaid charge, oldest due first (the same fields as GET …/account/charges)
scheduledPayments Payment-plan and automatic payments still to come: kind (plan or automatic), date, amount, convenience fee, total and the card's name and last four digits
payNow For each Pay Now button (dueNow, currentMonth, accountBalance), the charge ids to add to the cart and their total

A charge that a scheduled payment will pay counts in the balances and carries scheduledPayment (its date and kind). It can be paid now: the payNow sets include it, and the plan's or automatic payment becomes smaller at checkout (Payment plans and Automatic payments guides). A payment that runs within about a day holds its charges: no set includes them.

To pay, add each charge id of the chosen set to the cart as a charge line (Cart and checkout guide).

Transactions

Transactions in the last year

GET https://api.nfocus.solutions/v1/portals/riverbend/north/account/transactions?days=360 → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/portals/riverbend/north/account/transactions?days=360' \
  -H 'Authorization: Bearer your_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/portals/riverbend/north/account/transactions?days=360', {
  headers: {
    'Authorization': 'Bearer your_access_token',
  },
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.nfocus.solutions/v1/portals/riverbend/north/account/transactions?days=360");
request.Headers.Authorization = new("Bearer", "your_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

GET …/account/transactions?days=90 lists what happened on the account at this portal's organizations, newest first. days is 30, 60, 90 (the default), 180, 360 or 720; any other value answers 400. from is the first day included.

Each item has:

Annual payment summary

Years with an annual payment summary

GET https://api.nfocus.solutions/v1/portals/riverbend/north/account/statements → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/portals/riverbend/north/account/statements' \
  -H 'Authorization: Bearer your_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/portals/riverbend/north/account/statements', {
  headers: {
    'Authorization': 'Bearer your_access_token',
  },
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.nfocus.solutions/v1/portals/riverbend/north/account/statements");
request.Headers.Authorization = new("Bearer", "your_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

GET …/account/statements lists the years a summary is available for: this year, last year, and every year with a transaction, newest first. GET …/account/statements/{year}.pdf is the summary for one of them, a landscape Letter PDF with:

A year with no summary

GET https://api.nfocus.solutions/v1/portals/riverbend/north/account/statements/1999.pdf → 404, problem details

curl
curl -s 'https://api.nfocus.solutions/v1/portals/riverbend/north/account/statements/1999.pdf' \
  -H 'Authorization: Bearer your_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/portals/riverbend/north/account/statements/1999.pdf', {
  headers: {
    'Authorization': 'Bearer your_access_token',
  },
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.nfocus.solutions/v1/portals/riverbend/north/account/statements/1999.pdf");
request.Headers.Authorization = new("Bearer", "your_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

A year that isn't in the list answers 404 statement-not-found.

Editing a member during checkout

While a member has answers waiting in the checkout forms step, changing them on the account pages (PUT …/household/members/{personId} or the participant form) answers 409 member-in-checkout: checkout would otherwise save the waiting answers over the edit. Send the family to check out, or to remove that member's lines from the cart, which drops the waiting answers.

What changed from the legacy portal