> For the complete documentation index, see [llms.txt](https://docs.rafflex.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rafflex.io/getting-started/payment-gateway.md).

# 5️⃣ Payment Gateway

Apply for a Cashflows merchant account, add your Cashflows details to Rafflex, and choose how customers can pay at checkout.

A payment gateway is the service that takes your customers' card payments and sends the money to your business bank account. Rafflex uses **Cashflows** for this. Once it is set up, customers can pay for their tickets with a debit or credit card, Apple Pay or Google Pay.

Your Cashflows merchant account is your own. Cashflows pays your takings into your business bank account, and Rafflex does not hold your money at any point. If Cashflows holds back funds on a new account, or reviews your account before paying out, that is set by Cashflows, so speak to them about it.

There are two parts to getting payments working:

1. **Apply to Cashflows** and get your merchant account approved.
2. **Add your Cashflows details to Rafflex** and switch on live payments.

***

### Before You Apply

Cashflows will review your business and your website before they approve you, so it helps to have these ready first:

* **A registered business.** Your company needs to be set up as either a limited company (LTD) or a sole trader. See [Creating Your Company](https://docs.rafflex.io/getting-started/creating-your-company.md).
* **A business bank account.** Most of our customers use [Zempler Bank](https://www.zemplerbank.com/).
* **Your Terms and Conditions.** These need to be written and added to your site. See the page below.
* **Your first competition.** Add the first competition you plan to launch with. Make sure the pricing, prize and maximum number of tickets are all correct, because Cashflows will look at it as part of their review.
* **A site Cashflows can see.** If you have a site password switched on, send it to your Cashflows contact, or remove it while they review your site. See [Hide Your Site Before Launch](https://docs.rafflex.io/getting-started/hide-your-site-before-launch.md).

{% content-ref url="/pages/YBc5yTV28B6x64B6C21v" %}
[4️⃣ Adding Your Terms](https://docs.rafflex.io/getting-started/adding-your-terms.md)
{% endcontent-ref %}

{% hint style="info" %}
You do not need to wait for Cashflows before you start building your site. Your site can take **test** card payments straight away, so you can try the whole checkout before you are approved. See [Test and Live Card Payments](https://docs.rafflex.io/getting-started/payment-gateway/test-and-live-card-payments.md).
{% endhint %}

***

### Step 1: Apply to Cashflows

To get going, fill in this form: <https://relay.rafflex.io/cashflows>

This will put you in touch directly with either Alex or Victor at Cashflows, who will guide you through the application.

After you send the form you also get a confirmation email with Cashflows' contact details. Cashflows then contact you directly. Your Cashflows dashboard login comes from Cashflows once your account is set up, not from Rafflex.

{% hint style="info" %}
**Not heard from Cashflows?** If a week has passed since you sent the form and nobody has been in touch, contact Rafflex support and we will chase Cashflows for you. You do not need to apply again.
{% endhint %}

Once Cashflows approve your account, you will have access to the Cashflows merchant dashboard. This is where you will find the two details Rafflex needs:

* your **Configuration ID**
* your **API Key**

You will find both in the Cashflows merchant dashboard under **Cashflows GO**, then **Configurations**, then **API Data**. If nothing shows there, contact Cashflows, because these details are issued on their side.

{% hint style="warning" %}
Treat your API Key like a password. Only paste it into your Rafflex admin panel, and never share it in emails, social media posts or screenshots.
{% endhint %}

***

### Step 2: Add Your Cashflows Details to Rafflex

{% stepper %}
{% step %}

#### Open the Payments settings

1. Log in to your **admin panel**.
2. In the left-hand menu, find the **Content** group and click **Settings**.
3. In the settings menu, click **Payments**.

You will see a page called **Payments** with two sections: **Card Provider** and **Cashflows Configuration**.
{% endstep %}

{% step %}

#### Check the Card Provider section

* **Payment Gateways** is a list of tick boxes that controls which ways customers can pay at checkout. For most sites, leave all three ticked:
  * **Cards, Apple & Google Pay**
  * **Wallet**
  * **Partial Wallet + Card**
* **Card Payment Provider** should be set to **Cashflows**. Leave it as it is.

There is more detail on each option in [How Customers Pay at Checkout](#how-customers-pay-at-checkout) below.
{% endstep %}

{% step %}

#### Enter your Cashflows details

In the **Cashflows Configuration** section:

1. Delete what is already in **Cashflows Config ID** and paste in the Configuration ID from your Cashflows dashboard.
2. Delete what is already in **Cashflows API Key** and paste in the API Key from your Cashflows dashboard.

Both fields must be filled in. You will not be able to save the page if either one is empty.

<figure><img src="https://1199660663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr8qKq7FrwgsgVkUWodGm%2Fuploads%2Fgit-blob-3d4f7d49be3a9cff1200be445edca69b4a9f54ca%2Fpayment-gateway-cashflows-settings.png?alt=media" alt="The Payments settings page with the Card Provider section (all three payment gateways ticked, Cashflows selected) and the Cashflows Configuration section (Config ID, API Key, and the Live Payments and Webhook-Only Mode toggles switched off)" width="560"><figcaption><p>The Payments settings, with example details in place of real ones</p></figcaption></figure>

{% hint style="info" %}
**Why is there already something in these boxes?** New sites come with test details filled in, so that you can try checkout in test mode before Cashflows approves you. Replace them with your own details once you have them.
{% endhint %}
{% endstep %}

{% step %}

#### Switch on live payments

Turn on the **Cashflows Live Payments** toggle. This tells your site to take real payments using your live Cashflows account.

Only do this once you have entered your **live** Cashflows details. Until it is on, your site stays in test mode and no real money is taken.

Leave **Cashflows Webhook-Only Mode** switched off unless Rafflex support asks you to turn it on.
{% endstep %}

{% step %}

#### Save your settings

Click **Save Settings** at the bottom of the page. You will see a green message saying **Payment settings saved successfully**.

Now place one small real order on your own site to check everything is working, then cancel it. The full walkthrough is in [Test and Live Card Payments](https://docs.rafflex.io/getting-started/payment-gateway/test-and-live-card-payments.md).
{% endstep %}
{% endstepper %}

{% hint style="info" %}
**Want to know more about test mode?** Our guide to [Test and Live Card Payments](https://docs.rafflex.io/getting-started/payment-gateway/test-and-live-card-payments.md) explains the testing banner customers see, how to place a safe test order, and exactly what to check before and after you go live.
{% endhint %}

***

### What Each Setting Does

| Setting                         | Where                   | What it does                                                                                                                              |
| ------------------------------- | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **Card Payment Provider**       | Card Provider           | Chooses which company processes your card payments. Leave this on **Cashflows**.                                                          |
| **Payment Gateways**            | Card Provider           | Tick boxes for the payment options offered at checkout: **Cards, Apple & Google Pay**, **Wallet** and **Partial Wallet + Card**.          |
| **Cashflows Config ID**         | Cashflows Configuration | Your Configuration ID from the Cashflows dashboard (Cashflows GO, then Configurations, then API Data).                                    |
| **Cashflows API Key**           | Cashflows Configuration | Your API Key from the same place in the Cashflows dashboard.                                                                              |
| **Cashflows Live Payments**     | Cashflows Configuration | Off by default. When off, card payments are in test mode and no real money is taken. Turn it on when you are ready to take real payments. |
| **Cashflows Webhook-Only Mode** | Cashflows Configuration | Off by default. Leave it off unless Rafflex support advises otherwise.                                                                    |

***

### How Customers Pay at Checkout

The **Payment Gateways** tick boxes decide which payment options appear on your checkout page. Here is what each one means for your customers:

* **Cards, Apple & Google Pay.** Customers pay with a debit or credit card, Apple Pay or Google Pay. After clicking the **Pay** button they are taken to a secure Cashflows payment page, and then brought back to your site once they have paid.
* **Wallet.** Customers who are signed in and have enough site credit in their wallet to cover the whole order can pay with their balance. This shows at checkout as **Wallet**, with their balance next to it.
* **Partial Wallet + Card.** Customers who are signed in and have some site credit, but not enough for the whole order, can use their balance and pay the rest by card. This shows at checkout as **Wallet + Card**, with a note explaining how much comes from their site credit and how much is paid by card.

{% hint style="warning" %}
If you untick **Cards, Apple & Google Pay**, customers will not be able to pay by card at all. Only untick it if you have a very good reason.
{% endhint %}

The wallet options only appear for customers who are signed in and have money in their wallet. A signed in customer with no site credit sees a greyed out **Wallet** box that cannot be selected, so they simply pay by card. To learn how customers get site credit, see [Site Credit and Wallets](https://docs.rafflex.io/additional-settings/wallet-and-withdrawals/site-credit-and-wallets.md).

***

### Choosing Your Currency

Your site's currency is not set on the Payments page. You will find it on the Checkout page instead:

1. In the **admin panel**, click **Settings** in the left-hand menu.
2. Click **Checkout** in the settings menu.
3. Find the **Payment Methods** section.
4. Choose **£ GBP** or **€ EUR** from the **Currency** drop-down. The default is **£ GBP**.
5. Click **Save Settings**.

Choose the currency your Cashflows account was approved for. If you are not sure which one that is, check with your Cashflows contact before you change it.

The Checkout page also holds other settings that affect orders, such as the **Minimum Cart Value**. See [Order & Cart Settings](https://docs.rafflex.io/additional-settings/settings/order-and-cart-settings.md).

***

### Common Questions

<details>

<summary>I cannot see Settings in my admin panel</summary>

If you are logged in as a staff member rather than the site owner, your account may have the **Restrict Settings** restriction. Ask the site owner to check your user account in the admin panel and remove that restriction.

</details>

<details>

<summary>My checkout says "Card Payment Testing ENABLED. Real Money not taken."</summary>

Your site is still in test mode. Go to **Settings**, then **Payments**, turn on **Cashflows Live Payments**, and click **Save Settings**. Make sure your live Cashflows Config ID and API Key are entered first.

</details>

<details>

<summary>Customers see "An error has occurred connecting to our payment provider"</summary>

This message appears when your site could not start the payment with Cashflows. A common cause is details that do not match the mode you are in, for example test details with **Cashflows Live Payments** turned on, or live details with it turned off. Copy your Config ID and API Key from the Cashflows dashboard again, paste them in carefully with no extra spaces, and click **Save Settings**.

If the details are definitely correct, wait a few minutes and try again. If it keeps happening, contact Rafflex support.

</details>

<details>

<summary>I am moving to a new Cashflows account</summary>

You can swap the details yourself, for example when your business moves from a partnership to a limited company.

1. Copy the **Configuration ID** and **API Key** for the new account from your Cashflows dashboard.
2. Go to **Settings**, then **Payments**, and replace both values in the **Cashflows Configuration** section, with no spaces before or after.
3. Leave **Cashflows Live Payments** switched on and click **Save Settings**.
4. Place one small real order to check it works, then cancel and refund it (see [Test and Live Card Payments](https://docs.rafflex.io/getting-started/payment-gateway/test-and-live-card-payments.md)).
5. Contact Rafflex support and let us know you have moved account.

{% hint style="warning" %}
Returning customers' saved card details belong to your old Cashflows account and will not work with the new one. Until Rafflex support clears them, some returning customers may see payment errors while new customers pay normally. Do the swap at a quiet time and tell support straight away.
{% endhint %}

</details>

<details>

<summary>The card payment option is missing from my checkout</summary>

Go to **Settings**, then **Payments**, and check that **Cards, Apple & Google Pay** is ticked under **Payment Gateways**. Click **Save Settings** after making any change.

Remember that the payment options are only shown when the order costs something. A free order goes straight through with a **Place Free Order** button instead.

</details>

<details>

<summary>Can I use Stripe or another payment provider?</summary>

Card, Apple Pay and Google Pay payments on Rafflex go through Cashflows, so you need your own Cashflows merchant account to take payments.

* You cannot connect a different card provider (for example Stripe, Worldpay, Trust Payments, SumUp or GoCardless), even if you already have an account with them. A custom integration with your own provider is not possible either.
* Stripe and many other mainstream providers do not accept raffle and competition businesses, and may close an account once they see what it is used for.
* Paying with mobile phone credit, or with buy now pay later, is not available.
* Checkout accepts billing addresses in the United Kingdom and Ireland only.

If Cashflows turns down your application, asks for more documents, or queries a type of prize, speak to Cashflows directly. Moving to another provider is not an option.

</details>

<details>

<summary>Are Cashflows fees included in my Rafflex fees?</summary>

No. Cashflows charges its own fees, such as a one off setup fee and a charge on each card payment. These are agreed between you and Cashflows, are separate from your Rafflex fees, and are paid on top of them. Rafflex does not set or see your Cashflows pricing, so ask Cashflows about anything to do with their fees.

{% hint style="info" %}
Card fees are charged per payment, not per ticket. To keep them a small share of each order, set a **Minimum Cart Value**. See [Order & Cart Settings](https://docs.rafflex.io/additional-settings/settings/order-and-cart-settings.md).
{% endhint %}

</details>

***

### How to Integrate Your Cashflows Account

{% embed url="<https://youtu.be/y-XdsmOQbx4>" %}

The card payment page your customers see is run by Cashflows, so its logo and colours are set in your Cashflows dashboard, not in your Rafflex admin panel. Changing the logo in your Rafflex settings only changes your own site. The video above covers the Cashflows side of the setup. If your changes do not show on the payment page, contact Cashflows.

***

### Next Step: Your PCI Compliance Scan

Once your Cashflows account is live, Cashflows will ask you to complete a regular PCI compliance scan. This is a standard security check for every business that takes card payments online.

{% content-ref url="/pages/nr9VPDCvi35CM9s9s1Ll" %}
[PCI Compliance Scan](https://docs.rafflex.io/getting-started/payment-gateway/pci-compliance-scan.md)
{% endcontent-ref %}
