How do I connect Chargebee to Retool?

how do i connect chargebee to retool ? i am a beginner so simple terms would be very heplful .

1 Like

Taking a look at their docs (https://apidocs.chargebee.com/docs/api?prod_cat_ver=2), it looks like they expose a REST API which you should be able to use in Retool..
You would use
https://{site}.chargebee.com/api/v2/subscriptionsfor the Base URL.

You will also need to choose "Basic Auth" for your auth type, then put your API key in the username field.

Your configured resource should end up looking something like this:



Give this a try, and let me know if you run into any difficulty!


4 Likes

thanks a lot

This worked perfectly !!!

2 Likes

i want to update the time value inside a jason file , i have selected the post method but else needs to be done ?
the file looks like this ...
{
"list": [
{
"subscription": {
"id": "Abc123",
"plan_id": "individual_pro_yearly",
"plan_quantity": 1,
"plan_unit_price": 0,
"billing_period": 1,
"billing_period_unit": "year",
"customer_id": "123abc",
"plan_amount": 0,
"plan_free_quantity": 0,
"status": "active",
"current_term_start": 1625324580,
"current_term_end": 1656860580,
"next_billing_at": 1656860580,
"created_at": 1625324580,
"started_at": 1625324580,
"activated_at": 1625324580,
"updated_at": 1625324588,
"has_scheduled_changes": false,
"channel": "web",
"resource_version": 123,
"deleted": false,
"object": "subscription",
"currency_code": "USD",
"due_invoices_count": 0,
"mrr": 0,
"exchange_rate": 1,
"base_currency_code": "USD",
"cf_workspace_id": "abc"
}}}]

I am not familiar with this API, so I am not sure what it is expecting, but you should be able to find documentation on the different endpoints and their expected inputs and outputs here: https://apidocs.chargebee.com/docs/api

If you can tell me which endpoint you are specifically trying to use, and any errors you are encountering, I am happy to help debug!

2 Likes

getting this error , tried many things but doesnt work ?
{
"message": "Term Ends At : Should be in valid date format",
"type": "invalid_request",
"api_error_code": "param_wrong_value",
"param": "Term Ends At",
"error_code": "wrong_format_pattern",
"error_msg": "Should be in valid date format",
"error_param": "Term Ends At",
"http_status_code": 400
}

Hi @sarthak
Retool comes pre-built with Moment.js to change in between date and time formats easily.

Here is an example of me using Moment in an app that might be useful. I am taking the original created_at from the table and converting it to multiple formats.

You can do this to get your date in the desired format and save this value in a temporary variable that you can access as part of the JSON response (as shown below).

Hope this helps.

i have tried all formats but it still gives the same error
{
"message": "Term Ends At : Should be in valid date format",
"type": "invalid_request",
"api_error_code": "param_wrong_value",
"param": "Term Ends At",
"error_code": "wrong_format_pattern",
"error_msg": "Should be in valid date format",
"error_param": "Term Ends At",
"http_status_code": 400
}

Can you share the API endpoint you are trying to use from the API docs and i'll try to check what they are expecting based on that?