Skip to main content
Hyperline provides built-in React components to:
  • Display a customer’s subscriptions
  • Preview and update the payment method
  • List and download invoices
  • List and update billing information

List and download invoices

Display active payment method

This doc assumes that you already have a basic working knowledge of React and that you have already set up a React project.

Getting started

1

Install the dependency

First install the @hyperline/react-components NPM package.
Install the package
2

Create an auth token

To allow a customer to see their Hyperline data, you need to generate a unique authentication token on your server side. You can use our API and the create auth token endpoint for this.
cURL
3

Integrate the React components

Then, integrate the React components. You will most likely generate a new token every time your customer accesses the page.

Example of a subscription

Update billing info

Components

Subscriptions

List all active subscriptions

Subscription

Display a subscription by ID

InvoicesList

List and download all invoices and refunds

PaymentMethod

Display the current payment method, delete it if allowed, or add a new payment method

CustomerBillingInfoForm

Display a form with all billing info, with an optional callback when the form has been successfully saved.

Component options

When using the components, provide an options prop with the following parameters:

Appearance

You can change the colors and fonts of the component.

Custom color

Variables

Use variables to customize all elements at once.

Fonts

Set your application’s font.
  • src Url of the font file
  • family Name of the font. This is the name you’ll use for the fontFamily variable