> For the complete documentation index, see [llms.txt](https://help.alianhub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.alianhub.com/app-installation-and-start-guide/4.-installation-guide/4.7-payment-configuration/4.7.1-chargebee-configuration.md).

# 4.7.1 Chargebee Configuration

**NOTE:** These steps are only for the SAAS Extended versions

<figure><img src="/files/9rwNJNNrXMFmRAZr9giC" alt=""><figcaption></figcaption></figure>

1. Go to [***https://www.chargebee.com/trial-signup/***](https://www.chargebee.com/trial-signup/) and create a new account in Chargebee and verify your email address.
2. After that, you can add your domain name in the <mark style="color:red;">**CHARGEBEE\_SITE**</mark> in the form field

<figure><img src="/files/bzBlSnQDR0kMogYd0rzv" alt=""><figcaption></figcaption></figure>

3. Then click on settings - configure Chargebee - then click on API-Keys as shown in the below image.

<figure><img src="/files/1GtX2h2LxPKePmJFcLfj" alt=""><figcaption></figcaption></figure>

4. Then in the form field add <mark style="color:red;">**CHARGEBEE\_API\_KEY**</mark> and <mark style="color:red;">**CHARGEBEE\_PUBLISH\_KEY**</mark> as shown in the image below.

<figure><img src="/files/GcvkRBmtC6Cl0F7nKQsR" alt=""><figcaption></figcaption></figure>

### 4.7.1.1 Set Webhooks

1. After setting the API key,  click on Webhooks and create the Webhook button in the configure Chargebee tab as shown in the image below.

<figure><img src="/files/EKrS5RElbDd3JUvkZtgF" alt=""><figcaption></figcaption></figure>

2. In open dialog box add the Webhook name anything. Then in the Webhook URL add like '<mark style="color:red;">**{{your\_domain}}/api/v2/webhook2'**</mark>. In Event Send Select All Events and then click on create to create a Webhook.

<figure><img src="/files/RoNQaiOaO2427mAx01e2" alt=""><figcaption></figcaption></figure>

### 4.7.1.2 Set Currency

1. Click on settings - configure Chargebee - currencies as shown in the below image.

<figure><img src="/files/fP8RRPx1xlEsHP1oed9o" alt=""><figcaption></figcaption></figure>

2. Click on Add Currencies button

<figure><img src="/files/vIdmKwBV8Eh6fbWmD1tU" alt=""><figcaption></figcaption></figure>

3. After that select '**USD**' in currency and then click '**I’ll let Chargebee set it for me**' option and then click on **Add Currency** button.

<figure><img src="/files/7eB2cCh5PoGiODaPSRE7" alt=""><figcaption></figcaption></figure>

### 4.7.1.3 Set Payment Gateway

1. For set Payment GateWay Click on setting - Payment Gateways as shown in below image. Then Set your payment gateway as per your requirement. You can refer this doc for set payment gateway [***https://www.chargebee.com/docs/2.0/gateway\_settings.html***](https://www.chargebee.com/docs/2.0/gateway_settings.html)

<figure><img src="/files/btIJ3wBC7yvnqTJOPrFs" alt=""><figcaption></figcaption></figure>

### 4.7.1.4 Set Custom Field

1. For set custom field click on setting - configure Chargebee - Custom fields as shown in the image below.

<figure><img src="/files/Nuo32VXaUjZCbvXxqbr4" alt=""><figcaption></figcaption></figure>

2. Then click on customer and single-line text as shown in below image

<figure><img src="/files/TPXxs2eJ6YBVY6G6h8dn" alt=""><figcaption></figcaption></figure>

3. Then add '**Alianhub email**' and click on the create & save button as shown in the image.

<figure><img src="/files/QkaKdXxC13DcdyHEaiIn" alt=""><figcaption></figcaption></figure>

4. Refer to the provided table for what should be the value to be added in the custom fields.

| Field Label         | API Name                |
| ------------------- | ----------------------- |
| domain link         | cf\_domain\_link        |
| customer\_Mongo\_id | cf\_customer\_Mongo\_id |
| Alianhub email      | cf\_alianhub\_email     |
| Company id          | cf\_company\_id         |
| GSTIN               | cf\_gstin               |
| Selected Plan       | cf\_selected\_plan      |

5. Now follow the same steps and create an custom field for '**domain link'**, '**Company id**', '**GSTIN**', '**customer\_Mongo\_id**' after create all custom field it looks like below image.

<figure><img src="/files/zb97taUqyj55HILcGWZ6" alt=""><figcaption></figcaption></figure>

6. After that click Subscription Tab and click on single-line text as shown in below image

<div align="center"><figure><img src="/files/WOQvSCfJlslAe7BUoLeH" alt=""><figcaption></figcaption></figure></div>

7. Now add a custom field for '**Company id**' and **'Selected Plan**'. After create both custom field it looks like below image.

<figure><img src="/files/SILn7iSF0WCgvNXgAymP" alt=""><figcaption></figcaption></figure>
