# Routing Service

<figure><img src="https://4099587247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5qNVx0H0TdrsN8mn73d4%2Fuploads%2FC2iAmMBaGKQqD2pgivj9%2Fimage.png?alt=media&#x26;token=e055c13b-6959-4601-b6a4-c12192a9879e" alt=""><figcaption></figcaption></figure>

The Routing Service is an off-chain connectivity service with standardized APIs that allow for 3rd parties (typically device aggregators, utilities, or program administrators) to gather the necessary information to form a DER connection. It has 3 key components:

A program enrollment page calls the Routing Service API and provides the following standardized information:

* Site address
* Utility
* Device make and model
* Device identifier (e.g. serial number)
* Desired connectivity protocol (e.g. OpenADR 2.0k)
* Desired program identifier

A fee is assessed in $OVPP for connecting the device to the utility, and can be paid for in one of three ways:

* Direct payment in native $OVPP from the customer’s wallet
* Indirect payment in native $OVPP from the program administrator’s wallet
* Direct or indirect payment in stablecoins (or fiat) via OpenVPP’s Stablecoin On-Ramp Service, which automatically purchases the necessary $OVPP for the transaction

The Routing Service interacts with the Registry Service to fetch the device connectivity server and utility control server routing information based upon the input fields. The device and utility information is exchanged, and capability of the device and utility are checked, returning a result for readiness to connect:

* If a valid result is obtained, the connectivity fee is charged, and the output stage is called upon
* If a valid result is not obtained, or there are insufficient funds, an error is returned to the program enrollment API and the connection is not formed.

Provided a successful input result is returned and the fee is collected, the routing information and certificates are made available to the respective device and utility servers thereby enabling them to form a secure connection. A response is sent back via the program enrolment API to the enrollment page informing the program administrator that a successful connection was formed.
