Payment plans
A payment plan spreads what a family owes over monthly payments charged to a saved card. The account has at most one
plan. The organization must offer plans (offered in the plan, features.paymentPlans in the portal configuration).
The server computes every date and amount. The family chooses the terms and a card; the API works out the payment dates, what each payment pays and its convenience fee. Show what it answers.
The plan
The account's payment plan
GET https://api.nfocus.solutions/v1/portals/riverbend/north/payment-plan → 200 OK, JSON
curl
curl -s 'https://api.nfocus.solutions/v1/portals/riverbend/north/payment-plan' \
-H 'Authorization: Bearer your_access_token'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/portals/riverbend/north/payment-plan', {
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/payment-plan");
request.Headers.Authorization = new("Bearer", "your_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();GET …/payment-plan answers:
| Field | Meaning |
|---|---|
status |
new (no plan), inactive (starts later), active, expired (its last month has passed), canceled, or disabled (the organization turned it off after a payment failed) |
offered, customAmountsOffered |
Whether the organization offers plans, and custom-amount plans |
terms |
For an enabled plan: type, paymentDay, startDate, endDate, payments (or null when the plan runs until endDate) and amountCents (custom amounts) |
card |
The saved card the payments use (id as GET …/payment-methods lists it, name, lastFour, expired) |
payments |
The payments that haven't run, soonest first: date, amountCents, convenienceFeeCents, totalCents (what the card is charged) and charges (what each pays) |
scheduledCents |
All of those payments together |
uncoveredCents |
What the account owes that no plan payment pays |
earliestStartDate, latestStartDate |
The range a new plan's startDate must fall in |
A payment marked pending runs within about a day. It no longer changes, even if the plan is replaced or cancelled.
The terms
type:balanceDuepays, each month, what has come due by that payment's date (the first payment also pays what is past due).customAmountpays up toamountCentsa payment ($1.00 to $100,000.00), oldest due first.paymentDay: the day of the month, 1 to 28, or 0 for the last day of the month.startDate: the first payment is the first payment day on or after it. It must be betweenearliestStartDateandlatestStartDate(the first of the month six months out).payments(1 to 60), orendDate: payments run until that date. Send one of them.
A month with nothing to pay has no payment. Charges the family registers for later (future installments) join the plan's months at checkout, and paying a planned charge early makes its payment smaller (see Cart and checkout). Charges on automatic payments aren't in the plan; a cancelled automatic payment's charges join it (Automatic payments guide).
Quoting and saving
Quoting a plan with terms that aren't offered
GET https://api.nfocus.solutions/v1/portals/riverbend/north/payment-plan/preview?type=accountBalance&paymentDay=31&payments=6 → 400, problem details
curl
curl -s 'https://api.nfocus.solutions/v1/portals/riverbend/north/payment-plan/preview?type=accountBalance&paymentDay=31&payments=6' \
-H 'Authorization: Bearer your_access_token'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/portals/riverbend/north/payment-plan/preview?type=accountBalance&paymentDay=31&payments=6', {
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/payment-plan/preview?type=accountBalance&paymentDay=31&payments=6");
request.Headers.Authorization = new("Bearer", "your_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();GET …/payment-plan/preview?type=balanceDue&paymentDay=1&startDate=2026-12-01&payments=6 answers the payments the
server would make from today's balance, without saving anything.
To save, send the same terms with a saved card:
PUT …/payment-plan
Authorization: Bearer {access token}
{
"type": "balanceDue",
"paymentDay": 1,
"startDate": "2026-12-01",
"payments": 6,
"paymentMethodId": 4021
}
The answer is the plan. Saving again replaces the terms: each month keeps its payment, moved to the new day. The card must be one of the signed-in person's saved cards and not expired (Saved cards guide).
PUT …/payment-plan/payment-methodwith{ "paymentMethodId": … }moves every payment to another saved card.DELETE …/payment-plancancels the plan (204). Pending payments still run.
Cancelling when there is no plan
DELETE https://api.nfocus.solutions/v1/portals/riverbend/north/payment-plan → 404, problem details
curl
curl -s -X DELETE 'https://api.nfocus.solutions/v1/portals/riverbend/north/payment-plan' \
-H 'Authorization: Bearer your_access_token'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/portals/riverbend/north/payment-plan', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer your_access_token',
},
});
const data = await response.json();C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Delete, "https://api.nfocus.solutions/v1/portals/riverbend/north/payment-plan");
request.Headers.Authorization = new("Bearer", "your_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();| Status | code |
What to do |
|---|---|---|
400 |
invalid-request |
Fix the field named in errors (a startDate before a pending payment is one) |
404 |
payment-plan-not-found |
The account has no plan |
409 |
payment-plans-off |
The organization doesn't offer plans online |
409 |
payment-plan-custom-amounts-off |
Use a balanceDue plan |
409 |
payment-plan-not-active |
Only an enabled plan's card can change |
409 |
payments-unavailable |
The organization takes no card payments online |
409 |
saved-cards-unavailable |
The person's saved cards can't be read here (Saved cards guide) |
502 |
payment-unavailable |
The payment service didn't answer; try again shortly |
How the payments are charged
Each payment is charged by the payment service on its date, as the current Trax portal's plans are, so staff in Trax see and change the same plans. When the service can't be reached as a plan is saved, the plan is still saved and the API keeps trying in the background. Nothing for the family to do.
The organization's notices (plan created, ending soon, upcoming payment, balance-due reminders) are sent by Trax, not by this API.
What changed from the current portal
- The server computes the payment dates, amounts and fees; the current portal took them from the browser.
- The card must be the signed-in person's own; the current portal accepted any card id, including another family's.
- The limits are checked on the server: whether the organization offers plans, custom amounts, 1 to 60 payments, a start within six months. Account-balance plans stay refused, as the current portal's server refused them.
- A plan change is saved even when the payment service is down, and the API finishes the change later. The current portal could leave a payment charging after its plan changed.