Skip to content

Billing & Ledger Service API (1.0.0)

The Billing & Ledger Service is the financial engine of the NPS Billing Platform. It manages pricing (Rates, Rate Cards), subscription configurations, allocation rules for split billing scenarios (divorced households, subsidies), charge lifecycle, and double-entry accounting ledger.

Key Concepts

Charge Lifecycle

Charges follow a strict lifecycle with immutability after invoicing:

  • PENDING → Created but not validated
  • BILLED → Validated and ready to invoice (still editable)
  • INVOICED → Invoiced (IMMUTABLE - moved to SettledCharge)
  • PAID → Paid directly without invoice
  • VOID → Cancelled

Allocation Configuration

Defines how charges are split between multiple accounts (e.g., divorced parents, subsidy agencies). Three rule types:

  • RESPONSIBLE_PARTY: Percentage-based split
  • COVERAGE_TRANSFER: Fixed amount covered (e.g., $25 subsidy per charge)
  • BILLING_CAP: Maximum amount per period

Double-Entry Ledger

All financial transactions follow the accounting equation (Debits = Credits). Journal entries are immutable once created - corrections use adjustment entries.

Monetary Values

All monetary amounts are stored as DECIMAL type in cents (e.g., 5000 = $50.00). Use DECIMAL or NUMERIC type (BigDecimal in Java) for precision and to avoid rounding errors. Never use integers or floating-point for money.

Languages
Servers
Mock server
https://docs.nelnetpay.com/_mock/apis/billing-ledger-service
UAT server
https://api.uat.nelnetpay.com/billing
Production server
https://api.nelnetpay.com/billing

Rates

Manage rate catalog (pricing for services)

Operations

RateCards

Manage rate card groupings for UI organization

Operations

Subscriptions

Manage billable entity subscriptions to rates

Operations

AllocationConfigurations

Manage charge allocation configurations for split billing

Operations

Charges

Manage billable charges (mutable pre-invoice state)

Operations

SettledCharges

Query settled charges (immutable post-invoice state)

Operations

Refunds

Manage refunds for invoices, charges, or standalone refunds

Operations

Adjustments

Manage manual adjustments and corrections

Operations

Create Manual Adjustment

Request

Create a manual adjustment to correct ledger entries.

Adjustment Types:

  • DISCOUNT_CORRECTION - Fix discount calculation error
  • FEE_CORRECTION - Adjust fee amount
  • CREDIT_MEMO - Issue credit to account
  • DEBIT_MEMO - Charge additional amount
  • WRITE_OFF - Bad debt write-off

Authorization: Requires special permission level for manual adjustments. All adjustments include a full audit trail.

Security
OAuth2
Bodyapplication/jsonrequired
adjustmentTypestringrequired

Type of adjustment

Enum"DISCOUNT_CORRECTION""FEE_CORRECTION""CREDIT_MEMO""DEBIT_MEMO""WRITE_OFF"
accountIdstring(uuid)

Account to adjust

chargeIdstring(uuid)

Related charge (optional)

invoiceIdstring(uuid)

Related invoice (optional)

amountinteger>= 1required

Adjustment amount in cents

reasonstring<= 1000 charactersrequired

Detailed reason for adjustment

debitAccountCodestring

Account code to debit

creditAccountCodestring

Account code to credit

metadataobject

Additional metadata for audit

curl -i -X POST \
  https://docs.nelnetpay.com/_mock/apis/billing-ledger-service/adjustments \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "adjustmentType": "DISCOUNT_CORRECTION",
    "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
    "chargeId": "aec0aceb-a4db-49fb-b366-75e90229c640",
    "invoiceId": "4f163819-178d-470c-a246-d6768476a6ec",
    "amount": 1,
    "reason": "string",
    "debitAccountCode": "string",
    "creditAccountCode": "string",
    "metadata": {
      "property1": "string",
      "property2": "string"
    }
  }'

Responses

Adjustment created successfully

Bodyapplication/json
idstring(uuid)required
entityIdstring(uuid)required
adjustmentTypestringrequired
Enum"DISCOUNT_CORRECTION""FEE_CORRECTION""CREDIT_MEMO""DEBIT_MEMO""WRITE_OFF"
accountIdstring(uuid)
chargeIdstring(uuid)
invoiceIdstring(uuid)
amountintegerrequired
reasonstringrequired
adminUserIdstringrequired

ID of admin who created the adjustment

adminUserEmailstring

Email of admin who created the adjustment

statusstringrequired
Enum"PENDING""APPROVED""APPLIED""REJECTED"
journalEntryIdstring(uuid)

Linked journal entry (if applied)

debitAccountCodestring
creditAccountCodestring
approvedBystring

ID of admin who approved (if required)

approvedAtstring(date-time)
appliedAtstring(date-time)
metadataobject
optimisticLockVersioninteger(int64)read-only

Optimistic locking version (managed by Hibernate @Version). Prevents concurrent update conflicts.

createdAtstring(date-time)required
updatedAtstring(date-time)
Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5", "adjustmentType": "DISCOUNT_CORRECTION", "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9", "chargeId": "aec0aceb-a4db-49fb-b366-75e90229c640", "invoiceId": "4f163819-178d-470c-a246-d6768476a6ec", "amount": 0, "reason": "string", "adminUserId": "string", "adminUserEmail": "string", "status": "PENDING", "journalEntryId": "72600ee4-b304-47f3-89cd-f685d2692490", "debitAccountCode": "string", "creditAccountCode": "string", "approvedBy": "string", "approvedAt": "2019-08-24T14:15:22Z", "appliedAt": "2019-08-24T14:15:22Z", "metadata": { "property1": "string", "property2": "string" }, "optimisticLockVersion": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }

List Adjustments

Request

List all manual adjustments with pagination and filtering

Security
OAuth2
Query
adjustment_typestring
Enum"DISCOUNT_CORRECTION""FEE_CORRECTION""CREDIT_MEMO""DEBIT_MEMO""WRITE_OFF"
admin_user_idstring
pageinteger>= 1

Page number (1-indexed)

Default 1
Example: page=1
page_sizeinteger[ 1 .. 200 ]

Number of items per page

Default 50
Example: page_size=50
curl -i -X GET \
  'https://docs.nelnetpay.com/_mock/apis/billing-ledger-service/adjustments?adjustment_type=DISCOUNT_CORRECTION&admin_user_id=string&page=1&page_size=50' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful response

Bodyapplication/json
resultsArray of objectsrequired
results[].​idstring(uuid)required
results[].​entityIdstring(uuid)required
results[].​adjustmentTypestringrequired
Enum"DISCOUNT_CORRECTION""FEE_CORRECTION""CREDIT_MEMO""DEBIT_MEMO""WRITE_OFF"
results[].​accountIdstring(uuid)
results[].​chargeIdstring(uuid)
results[].​invoiceIdstring(uuid)
results[].​amountintegerrequired
results[].​reasonstringrequired
results[].​adminUserIdstringrequired

ID of admin who created the adjustment

results[].​adminUserEmailstring

Email of admin who created the adjustment

results[].​statusstringrequired
Enum"PENDING""APPROVED""APPLIED""REJECTED"
results[].​journalEntryIdstring(uuid)

Linked journal entry (if applied)

results[].​debitAccountCodestring
results[].​creditAccountCodestring
results[].​approvedBystring

ID of admin who approved (if required)

results[].​approvedAtstring(date-time)
results[].​appliedAtstring(date-time)
results[].​metadataobject
results[].​optimisticLockVersioninteger(int64)read-only

Optimistic locking version (managed by Hibernate @Version). Prevents concurrent update conflicts.

results[].​createdAtstring(date-time)required
results[].​updatedAtstring(date-time)
paginationobjectrequired
pagination.​totalRecordsintegerrequired

Total number of records across all pages

Example: 100
pagination.​currentPageintegerrequired

Current page number (1-indexed)

Example: 1
pagination.​totalPagesintegerrequired

Total number of pages

Example: 10
pagination.​nextPageinteger or null

Next page number, null if on last page

Example: 2
pagination.​prevPageinteger or null

Previous page number, null if on first page

Example: null
Response
application/json
{ "results": [ {} ], "pagination": { "totalRecords": 100, "currentPage": 1, "totalPages": 10, "nextPage": 2, "prevPage": null } }

Get Adjustment

Request

Retrieve details of a specific adjustment

Security
OAuth2
Path
adjustmentIdstring(uuid)required
curl -i -X GET \
  'https://docs.nelnetpay.com/_mock/apis/billing-ledger-service/adjustments/{adjustmentId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful response

Bodyapplication/json
idstring(uuid)required
entityIdstring(uuid)required
adjustmentTypestringrequired
Enum"DISCOUNT_CORRECTION""FEE_CORRECTION""CREDIT_MEMO""DEBIT_MEMO""WRITE_OFF"
accountIdstring(uuid)
chargeIdstring(uuid)
invoiceIdstring(uuid)
amountintegerrequired
reasonstringrequired
adminUserIdstringrequired

ID of admin who created the adjustment

adminUserEmailstring

Email of admin who created the adjustment

statusstringrequired
Enum"PENDING""APPROVED""APPLIED""REJECTED"
journalEntryIdstring(uuid)

Linked journal entry (if applied)

debitAccountCodestring
creditAccountCodestring
approvedBystring

ID of admin who approved (if required)

approvedAtstring(date-time)
appliedAtstring(date-time)
metadataobject
optimisticLockVersioninteger(int64)read-only

Optimistic locking version (managed by Hibernate @Version). Prevents concurrent update conflicts.

createdAtstring(date-time)required
updatedAtstring(date-time)
Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5", "adjustmentType": "DISCOUNT_CORRECTION", "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9", "chargeId": "aec0aceb-a4db-49fb-b366-75e90229c640", "invoiceId": "4f163819-178d-470c-a246-d6768476a6ec", "amount": 0, "reason": "string", "adminUserId": "string", "adminUserEmail": "string", "status": "PENDING", "journalEntryId": "72600ee4-b304-47f3-89cd-f685d2692490", "debitAccountCode": "string", "creditAccountCode": "string", "approvedBy": "string", "approvedAt": "2019-08-24T14:15:22Z", "appliedAt": "2019-08-24T14:15:22Z", "metadata": { "property1": "string", "property2": "string" }, "optimisticLockVersion": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }

Ledger

Manage double-entry accounting ledger

Operations
Webhooks

Exports

Export data in CSV format for GL integrations

Operations