Build Your Own Checkout
Learn how to create a custom checkout experience using our authentication system
This guide assumes you’re building a server-side application. Never expose your client credentials in client-side code.
Prerequisites
In order to complete this guide, you’ll need a valid set of client credentials (client_id
and client_secret
), and contacted us to create an organization with at least one plan. If you’re missing any of these prerequisites, please reach out to support@nomos.energy for assistance.
Overview
In this guide, we’ll walk through creating a custom checkout experience using our API. By the end, you’ll have implemented a complete checkout flow for your customers.
Get Quote Information
First, you’ll need to get pricing information based on the customer’s zip code and estimated usage using the Get Quote endpoint.
The quote endpoint accepts additional parameters for more precise pricing. See the API reference for details.
Build the Checkout Form
Your checkout form should collect necessary customer information, including their current energy supplier. We provide two endpoints to help with supplier selection:
- Use the Search Suppliers endpoint to search by name
- Use the List Suppliers endpoint to get all suppliers
Implement a searchable dropdown using these endpoints to provide a better user experience.
Create the Subscription
Once the customer has completed the form, use the Create Subscription endpoint to set up their subscription.
Store the returned subscription ID for future reference and status tracking.
Final Thoughts
Great work! With just a few API calls, you’ve learned how to create a complete checkout flow for energy subscriptions. You can now offer your customers a seamless way to switch their energy provider right from your platform.
We’d love your feedback! We hope this guide has shown you how straightforward it is to integrate energy services into your applications. Did you run into any issues? Was anything unclear? Please let us know by reaching out to support@nomos.energy - we’re always looking to improve our API and documentation.