The subscriber API supports reconciliation by letting you add unpaid schedule items to the cart. You can link these schedule items to the items in the cart you would like to reconcile with (service pricing options or packages). You may also add account service pricing options (service pricing options that the consumer has already purchased) to the cart and use those to reconcile schedule items. Reconciliation takes place when checkout is performed.
A specific scheduled service for a consumer, past or future. This can be an appointment, a class, an enrollment, or a resource booking. Reconciliation concerns schedule items that have not been paid for.
An item in the cart that can pay for a schedule item. These can be one of:
When a consumer purchases a service pricing option, either directly or through a package/contract, it is stored on their account. This account service pricing option can be added to the cart, so that it can be used to pay for a schedule item.
For example, a consumer may have purchased a 10-session pack and only used 2 of the sessions. This pricing option can be added to the cart, and used to reconcile an unpaid, 1-session schedule item. After checkout, the schedule item will be paid for and the pricing option will have 7 sessions remaining.
Note: An account service pricing option is already purchased by the consumer. If there are no schedule items in the cart linked to it, checkout validation will fail, because the only reason to have it in the cart is to reconcile schedule items.
Another note: Because an account service pricing option is already purchased, you can use it to perform reconciliation at checkout without any purchase taking place.
To reconcile a schedule item, add it to the cart and link it to the desired schedule item payments. A schedule item can be linked to a cart item, a cart package, or an cart account schedule item payment. A link is part of the cart schedule item, and it consists of a type (CatalogItem, CatalogPackage, AccountScheduleItemPayment) and the Guid of the cart item.
Cart +--------------------------------------------------------------------+ | | | Packages | | +-------------------------+ | | +------> | Contract 1 | | | | | | | | | | | | | | | | | | | +-------------------------+ | | ScheduleItems | | | +-------------------+ | Items | | | Unpaid appt 1 +-------+ +-------------------------+ | | | | | SPO 1 | | | | | | | | | | | +------> | SPO 2 | | | | Unpaid appt 2 +-------+ | | | | | | +-------------------------+ | | | | | | | | | | | Unpaid class 1 +-------+ AccountScheduleItemPayments | | | | | +-------------------------+ | | +-------------------+ +------> | ASPO 1 | | | | | | | | | | | | | | | +-------------------------+ | | | +--------------------------------------------------------------------+
The expected add/customize/remove endpoints are available for schedule items and account schedule item payments. You can manipulate links by customizing a schedule item. Removing an item removes any links associated with it.
For convenience, the Add schedule items endpoint supports adding multiple schedule items at once, along with a schedule item payment, which will be automatically linked to each schedule item. You may specify an item already in the cart, or you may provide one, and it will be added to the cart.
For example, if you have a contract in the cart, and you want to use it to reconcile 3 unpaid schedule items, you may add all 3 schedule items at once, and reference the cart package ID of the contract as the intended payment.; All 3 schedule items will be added to the cart, each linked to the contract in the cart.
To start reconciliation, you need to find unpaid schedule items for a consumer. Use the Get unpaid schedule items for consumer endpoint.
To discover catalog items that could pay for one or more schedule items, use the Find schedule item payment options endpoint. The payment options endpoint will return all catalog items that can pay for every requested schedule item.
This will go through a general workflow of reconciliation.