Manage rate catalog (pricing for services)
- Create Multiple Charges
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.
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
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
All financial transactions follow the accounting equation (Debits = Credits). Journal entries are immutable once created - corrections use adjustment entries.
- Mock serverhttps://docs.nelnetpay.com/_mock/apis/billing-ledger-service/charges
- UAT serverhttps://api.uat.nelnetpay.com/billing/charges
- Production serverhttps://api.nelnetpay.com/billing/charges
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.nelnetpay.com/_mock/apis/billing-ledger-service/charges?status=PENDING&billable_entity_id=497f6eca-6276-4993-bfeb-53cbbbba6f08&account_id=497f6eca-6276-4993-bfeb-53cbbbba6f08&event_date_from=2019-08-24&event_date_to=2019-08-24&page=1&page_size=50' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'{ "results": [ { … } ], "pagination": { "totalRecords": 100, "currentPage": 1, "totalPages": 10, "nextPage": 2, "prevPage": null } }
Request
Create a new charge for a billable entity.
Validation at Creation:
- Fetches all accounts associated with billableEntityId (via Profile Service)
- Validates billableEntity is associated with ALL accounts in allocationConfig
- Validates allocationConfig covers 100% of ALL accounts for the billableEntity
- Returns 422 if validation fails
Charge Calculation:
amount= quantity × rate.pricePerUnitproratedAmount= amount × prorationFactornetAmount= proratedAmount - sum(discountAmounts)
Idempotency: Include Idempotency-Key header to prevent duplicate charges.
- Mock serverhttps://docs.nelnetpay.com/_mock/apis/billing-ledger-service/charges
- UAT serverhttps://api.uat.nelnetpay.com/billing/charges
- Production serverhttps://api.nelnetpay.com/billing/charges
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs.nelnetpay.com/_mock/apis/billing-ledger-service/charges \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \
-d '{
"billableEntityId": "550e8400-e29b-41d4-a716-446655440010",
"rateId": "550e8400-e29b-41d4-a716-446655440001",
"quantity": 5,
"allocationConfigId": "550e8400-e29b-41d4-a716-446655440020",
"discountRateIds": [
"550e8400-e29b-41d4-a716-446655440002"
],
"eventDate": "2026-01-20"
}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5", "billableEntityId": "efd73805-0b19-4de3-9f1e-a64de8c44765", "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9", "subscriptionId": "d079718b-ff63-45dd-947b-4950c023750f", "rateId": "dc6263b0-e8fb-4144-a111-53fde6c86836", "quantity": 0.1, "amount": 0, "prorationFactor": 1, "proratedAmount": 0, "netAmount": 0, "discountRateIds": [ "497f6eca-6276-4993-bfeb-53cbbbba6f08" ], "discountAmounts": [ 0 ], "allocationConfigId": "dacda6b8-3e25-4031-b6a4-1ec5aa108ab2", "overrideAllocation": {}, "status": "PENDING", "eventDate": "2019-08-24", "rateVersion": 0, "subscriptionVersion": 0, "allocationVersion": 0, "discountRateVersions": [ 0 ], "tags": { "property1": "string", "property2": "string" }, "optimisticLockVersion": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }
- Mock serverhttps://docs.nelnetpay.com/_mock/apis/billing-ledger-service/charges/{chargeId}
- UAT serverhttps://api.uat.nelnetpay.com/billing/charges/{chargeId}
- Production serverhttps://api.nelnetpay.com/billing/charges/{chargeId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.nelnetpay.com/_mock/apis/billing-ledger-service/charges/{chargeId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5", "billableEntityId": "efd73805-0b19-4de3-9f1e-a64de8c44765", "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9", "subscriptionId": "d079718b-ff63-45dd-947b-4950c023750f", "rateId": "dc6263b0-e8fb-4144-a111-53fde6c86836", "quantity": 0.1, "amount": 0, "prorationFactor": 1, "proratedAmount": 0, "netAmount": 0, "discountRateIds": [ "497f6eca-6276-4993-bfeb-53cbbbba6f08" ], "discountAmounts": [ 0 ], "allocationConfigId": "dacda6b8-3e25-4031-b6a4-1ec5aa108ab2", "overrideAllocation": {}, "status": "PENDING", "eventDate": "2019-08-24", "rateVersion": 0, "subscriptionVersion": 0, "allocationVersion": 0, "discountRateVersions": [ 0 ], "tags": { "property1": "string", "property2": "string" }, "optimisticLockVersion": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }
- Mock serverhttps://docs.nelnetpay.com/_mock/apis/billing-ledger-service/charges/{chargeId}
- UAT serverhttps://api.uat.nelnetpay.com/billing/charges/{chargeId}
- Production serverhttps://api.nelnetpay.com/billing/charges/{chargeId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PATCH \
'https://docs.nelnetpay.com/_mock/apis/billing-ledger-service/charges/{chargeId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"quantity": 0.1,
"prorationFactor": 1,
"discountRateIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"overrideAllocation": {},
"eventDate": "2019-08-24",
"tags": {
"property1": "string",
"property2": "string"
}
}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5", "billableEntityId": "efd73805-0b19-4de3-9f1e-a64de8c44765", "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9", "subscriptionId": "d079718b-ff63-45dd-947b-4950c023750f", "rateId": "dc6263b0-e8fb-4144-a111-53fde6c86836", "quantity": 0.1, "amount": 0, "prorationFactor": 1, "proratedAmount": 0, "netAmount": 0, "discountRateIds": [ "497f6eca-6276-4993-bfeb-53cbbbba6f08" ], "discountAmounts": [ 0 ], "allocationConfigId": "dacda6b8-3e25-4031-b6a4-1ec5aa108ab2", "overrideAllocation": {}, "status": "PENDING", "eventDate": "2019-08-24", "rateVersion": 0, "subscriptionVersion": 0, "allocationVersion": 0, "discountRateVersions": [ 0 ], "tags": { "property1": "string", "property2": "string" }, "optimisticLockVersion": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }
- Mock serverhttps://docs.nelnetpay.com/_mock/apis/billing-ledger-service/charges/{chargeId}
- UAT serverhttps://api.uat.nelnetpay.com/billing/charges/{chargeId}
- Production serverhttps://api.nelnetpay.com/billing/charges/{chargeId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://docs.nelnetpay.com/_mock/apis/billing-ledger-service/charges/{chargeId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'- Mock serverhttps://docs.nelnetpay.com/_mock/apis/billing-ledger-service/charges/{chargeId}/void
- UAT serverhttps://api.uat.nelnetpay.com/billing/charges/{chargeId}/void
- Production serverhttps://api.nelnetpay.com/billing/charges/{chargeId}/void
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://docs.nelnetpay.com/_mock/apis/billing-ledger-service/charges/{chargeId}/void' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"reason": "string"
}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5", "billableEntityId": "efd73805-0b19-4de3-9f1e-a64de8c44765", "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9", "subscriptionId": "d079718b-ff63-45dd-947b-4950c023750f", "rateId": "dc6263b0-e8fb-4144-a111-53fde6c86836", "quantity": 0.1, "amount": 0, "prorationFactor": 1, "proratedAmount": 0, "netAmount": 0, "discountRateIds": [ "497f6eca-6276-4993-bfeb-53cbbbba6f08" ], "discountAmounts": [ 0 ], "allocationConfigId": "dacda6b8-3e25-4031-b6a4-1ec5aa108ab2", "overrideAllocation": {}, "status": "PENDING", "eventDate": "2019-08-24", "rateVersion": 0, "subscriptionVersion": 0, "allocationVersion": 0, "discountRateVersions": [ 0 ], "tags": { "property1": "string", "property2": "string" }, "optimisticLockVersion": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }
- Mock serverhttps://docs.nelnetpay.com/_mock/apis/billing-ledger-service/charges/bulk
- UAT serverhttps://api.uat.nelnetpay.com/billing/charges/bulk
- Production serverhttps://api.nelnetpay.com/billing/charges/bulk
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs.nelnetpay.com/_mock/apis/billing-ledger-service/charges/bulk \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \
-d '{
"charges": [
{
"billableEntityId": "efd73805-0b19-4de3-9f1e-a64de8c44765",
"subscriptionId": "d079718b-ff63-45dd-947b-4950c023750f",
"rateId": "dc6263b0-e8fb-4144-a111-53fde6c86836",
"quantity": 0.1,
"prorationFactor": 1,
"allocationConfigId": "dacda6b8-3e25-4031-b6a4-1ec5aa108ab2",
"discountRateIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"overrideAllocation": {},
"eventDate": "2019-08-24",
"tags": {
"property1": "string",
"property2": "string"
}
}
]
}'{ "data": [ { … } ], "created": 0 }