# Accept Bayarcash payments in HostBill

> Install the Bayarcash payment module in HostBill and add your portal key, token and API secret key.
>
> Source: https://docs.bayarcash.com/hostbill/

The Bayarcash module for HostBill lets your clients pay invoices through Bayarcash. It accepts MYR only.

## Before you start

You need the following:

- An approved Bayarcash merchant account.
- The Bayarcash module files for HostBill, from Bayarcash.
- Your **Portal Key**, **Personal Access Token** and **API Secret Key**. See [API keys](/api-keys/) and [Portals](/portals/).
- Access to your HostBill server files, with Composer available on the server.

## Install the module

Your developer or host usually does this part. The steps are:

1. Copy the module folder into your HostBill installation, under the **includes/modules/Payment** folder.
2. In the module folder, run `composer install` to add the libraries it needs.
3. In the HostBill admin area, activate **Bayarcash** among the payment modules.

## Add your keys

Open the Bayarcash module settings and fill in these fields:

| Field | What to enter |
|---|---|
| **Portal Key** | The portal that should receive the payments. |
| **Token** | Your Personal Access Token. |
| **API Secret Key** | Your secret key. Keep it private. |
| **Use sandbox** | Tick only when testing with sandbox keys. |

Save the settings. On the payment page, your client chooses **FPX**, **FPX Line of Credit** or **DuitNow DOBW**.

## Tips

- **Test in sandbox first.** Pay one test invoice with sandbox keys, then untick **Use sandbox** and switch to live keys.
- **Check the module in your own HostBill version.** Bayarcash lists no minimum HostBill version, so test a payment before you go live.

## Common issues

### My customer sees 'Payment failed, please contact administrator'.

Check the Portal Key, Token and API Secret Key in the module settings, and that your invoice is in MYR. Bayarcash accepts MYR only.

### The payment went through but I see 'Payment callback response verification failed'.

The API Secret Key in HostBill does not match the one in your merchant dashboard. Copy it again and save.
