Preview a policy issuance
Before issuing a policy, you can see how the charges in the policy will be sliced into invoice items. You can do this by previewing the issuance.
POST /accounts/{accountId}/issuance-previewThis endpoint
functions the same as the POST
/issuances endpoint, except no data from the
POST is persisted to the database. The endpoint returns an array of
preview invoice items.Required fields
This endpoint accepts exactly the same request body as the POST /issuances endpoint.
The same fields are required.
Response object
The request returns a response object consisting of an array of preview items. Preview items are data objects that represent invoice items that BillingCenter would create in the event of an actual issuance. Preview items are not persisted to the database, and only exist in the context of individual API calls.
Preview items include the following information:
- The amount of the invoice item
- The category of the charge
- The payer account
- The invoice stream
- The type of invoice item (such as installment, one time, or down payment)
Example issuance preview
This example demonstrates previewing a policy with one $1000 premium charge and one $50 tax charge. The payment plan is 30% down with three max installments.
Command
POST /billing/v1/accounts/bc:122/issuance-preview
Request body
{
"data": {
"attributes": {
"charges": [
{
"amount": {
"amount": "1000",
"currency": "USD"
},
"chargePattern": {
"id": "default_data:1",
"displayName": "Premium"
}
},
{
"amount": {
"amount": "50",
"currency": "USD"
},
"chargePattern": {
"id": "default_data:6",
"displayName": "Taxes"
}
}
],
"paymentPlan": {
"id": "quarterly-30-percent-down-3-max-installments_pmntplan"
},
"policy": {},
"policyPeriod": {
"effectiveDate": "2025-08-01",
"expirationDate": "2026-08-01",
"policyNumber": "PA-234553"
}
}
}
}
In the response, there are 5 items included in the previewItems array.
- One $300 down payment item
- Three $233.34 installment premium items
- One $50 one-time tax item
The response looks like this:
Response
{
"data": {
"attributes": {
"previewItems": [
{
"amount": {
"amount": "300.00",
"currency": "usd"
},
"category": {
"code": "premium",
"name": "Premium"
},
"eventDate": "2025-09-01",
"invoiceStream": {
"displayName": "Monthly",
"id": "bc:SmxgIR9gUrYvW6kXzCcpi",
"type": "AccountInvoiceStream",
"uri": "/billing/v1/accounts/bc:122/invoice-streams/bc:SmxgIR9gUrYvW6kXzCcpi"
},
"paidAmount": {
"amount": "0.00",
"currency": "usd"
},
"payerAccount": {
"displayName": "Standard Account",
"id": "bc:SSceTURXnhwJyKaDm_ZNX",
"type": "Account",
"uri": "/billing/v1/accounts/bc:122"
},
"paymentDueDate": "2025-09-22",
"type": {
"code": "deposit",
"name": "Down Payment"
}
},
{
"amount": {
"amount": "50.00",
"currency": "usd"
},
"category": {
"code": "tax",
"name": "Tax"
},
"eventDate": "2025-09-01",
"invoiceStream": {
"displayName": "Monthly",
"id": "bc:SmxgIR9gUrYvW6kXzCcpi",
"type": "AccountInvoiceStream",
"uri": "/billing/v1/accounts/bc:122/invoice-streams/bc:SmxgIR9gUrYvW6kXzCcpi"
},
"paidAmount": {
"amount": "0.00",
"currency": "usd"
},
"payerAccount": {
"displayName": "Standard Account",
"id": "bc:SSceTURXnhwJyKaDm_ZNX",
"type": "Account",
"uri": "/billing/v1/accounts/bc:122"
},
"paymentDueDate": "2025-09-22",
"type": {
"code": "onetime",
"name": "One-Time"
}
},
{
"amount": {
"amount": "233.34",
"currency": "usd"
},
"category": {
"code": "premium",
"name": "Premium"
},
"eventDate": "2025-11-01",
"invoiceStream": {
"displayName": "Monthly",
"id": "bc:SmxgIR9gUrYvW6kXzCcpi",
"type": "AccountInvoiceStream",
"uri": "/billing/v1/accounts/bc:122/invoice-streams/bc:SmxgIR9gUrYvW6kXzCcpi"
},
"paidAmount": {
"amount": "0.00",
"currency": "usd"
},
"payerAccount": {
"displayName": "Standard Account",
"id": "bc:SSceTURXnhwJyKaDm_ZNX",
"type": "Account",
"uri": "/billing/v1/accounts/bc:122"
},
"paymentDueDate": "2025-11-22",
"type": {
"code": "installment",
"name": "Installment"
}
},
{
"amount": {
"amount": "233.33",
"currency": "usd"
},
"category": {
"code": "premium",
"name": "Premium"
},
...
},
{
"amount": {
"amount": "233.33",
"currency": "usd"
},
"category": {
"code": "premium",
"name": "Premium"
},
...
}
]
}
}
}