Custom customer portal tutorials
You can use Postman to create a demo customer portal using a test Recharge Environment and pre-configured test Collections. Use the following tutorials to practice using the Recharge API and create a demo customer portal.
Warning
You must use a test customer account in Recharge with at least one active subscription to complete these tutorials. A test customer account is needed because you will be editing and changing your test customer's subscription(s).
Tutorial 1 - Create your Recharge Environment and retrieve subscriptions
In this tutorial, you will set up the test Recharge Environment in Postman and retrieve your store's subscriptions using the API. This tutorial should make you comfortable using the Recharge API before creating a customer portal.
Step 1 - Set up the Recharge Environment in Postman
- Download the Recharge Environment Configuration.
- Download the Lab 1 Collection.
- Launch Postman and click Import.
- Locate and upload the Recharge Environment.postman_environment.json file.
- Click Import to finish uploading the Recharge Environment file.
- From Postman's main page, click Import again.
- Locate and upload the Recharge API- Lab 1.postman_collection.json file.
- Click Import to finish uploading the Lab 1 Collection.
Step 2 - Create an API token
- From the Recharge merchant portal, click Apps and select API tokens.
- Click Create an API token.
- Name the token Test for Postman, provide your email address, and set the scopes for all permissions to
Read
andWrite
, if available, orRead
if not available. - Agree to Recharge's API Terms of Service and click Save.
- Click Yes, grant access and copy the API token to your clipboard.
Step 3 - Update the Postman Environment
- In Postman, click on the Environment drop-down menu and select Recharge Environment.

- Click on the Environment quick look icon and click Edit.

- Paste your Recharge API token under Current Value and click Save.
Step 4 - Use GET
to retrieve subscriptions
GET
to retrieve subscriptions- Open the Recharge API: Lab 1 Collection and click List Subscriptions.
- Click Headers and review the API Token and API Version. Ensure your API Token is correct and the API Version is set to 2021-11.
- Click Send and verify the
GET
call was successful. - Open the Recharge API: Lab 1 Collection and click List Subscriptions with include.
- Click Send.
- Compare your results to the first
GET
call. The second call should include customer information. - Continue executing other API calls in this Collection for more practice or move on to the next tutorial.
Tutorial 2 - Create a customer portal using the Recharge API
In this tutorial, you will use a pre-configured test Collection and test customer account to create a customer portal using the Recharge API. After completing this tutorial, you should understand the basics of creating a custom customer portal.
Step 1 - Recharge Environment configuration
- Download the Lab 2 Collection.
- Launch Postman and click Import.
- Locate and upload the Recharge API- Lab 2.postman_collection.json file.
- Click Import to finish uploading the Recharge Environment file.
Step 2 - Retrieve customer by hash
- From the Recharge merchant portal, click Customers and open a test customer's account.
- From the test customer's profile, click Customer portal links and copy the Subscriptions link.
- Paste the URL in a text file or notepad.
- Locate the
customer_hash
. Thecustomer_hash
is located betweenportal/
and/subscriptions/
in the URL. - Copy the
customer_hash
value. - Launch Postman and from the Environment drop-down choose Recharge Environment.
- Click on the Environment quick look icon and click Edit.
- Locate the
hash_id
variable and paste thecustomer_hash
value under Current Value. - Click Save.
- Open the Recharge API: Lab 2 Collection and click List Customer by hash.
- Click Send.
- Verify the
GET
call was successful. - Locate and highlight the
id
in the response body. - Right-click the highlighted
id
and click Set: Recharge Environment > customer_id. - You have now retrieved the
customer_id
and set thecustomer_id
variable by using thecustomer_hash
.
Step 3 - Retrieve customer subscriptions by customer_id
customer_id
- From the Recharge API: Lab 2 Collection, click List Subscriptions by Customer.
- Click Send.
- Review the JSON response. All the subscriptions for the customer should be listed.
- Locate and highlight the
id
in the response body. - Right-click the highlighted
id
and click Set: Recharge Environment > subscription_id.
Step 4 - Retrieve customer delivery schedule
- From the Recharge API: Lab 2 Collection, click List Customer Delivery Schedule.
- Click Send.
- Review the JSON response. The delivery schedule for the customer's subscriptions should be listed.
- Locate and highlight the
charge_id
in the response body. - Right-click the highlighted
charge_id
and click Set: Recharge Environment > charge_id.
Step 5 - Add a filter to customer delivery schedule
- From the Recharge API: Lab 2 Collection, click List Customer Delivery Schedule.
- Edit the
GET
line in Postman and add the?future_interval=10
filter. This will return all scheduled deliveries for the next 10 days.

- Click Send.
- Review the JSON response. You can add additional filters that you might find useful in a customer portal. Refer to the Recharge API Reference for an explanation of these attributes.
Step 6 - Skip next order
- From the Recharge API: Lab 2 Collection, click Skip upcoming order.
- Click Send.
- Review the JSON response. You should see that you skipped the next order for this subscription. To verify this, check the customer's account from the Recharge merchant portal.
Step 7 - Update frequency
- From the Recharge API: Lab 2 Collection, click Update Subscription Frequency.
- Click Body and set the following:
order_interval_unit
: "week"order_interval_frequency
: 1charge_interval_frequency
: 1
- Click Send.
- Review the JSON response. You should have changed this subscription's frequency to once per week.
Updated 5 months ago