> For the complete documentation index, see [llms.txt](https://help.botpenguin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.botpenguin.com/bots/whatsapp-bot/3rd-party-apps-integrations/botpenguin-integrations/integrate-with-payfast-payment-method.md).

# Integrate with Payfast Payment Method

## What is PayFast Integration?

PayFast Integration allows you to connect your PayFast merchant account with BotPenguin to accept online payments directly through your chatbot.

Once connected, you can use the Payment Component inside Chatflow Builder to generate secure payment requests for your customers.

***

### Why use PayFast Integration?

* 💳 Accept secure online payments
* ⚡ Collect payments directly through your chatbot
* 🔒 Use your existing PayFast merchant account
* 🤖 Automate payment collection workflows
* 📈 Manage transactions through PayFast

***

### When should you use this?

Use PayFast Integration when you need to:

* Accept payments through WhatsApp bots
* Collect order payments
* Charge customers for products or services
* Receive booking or registration fees
* Automate payment collection

{% hint style="warning" icon="triangle-exclamation" %}
PayFast Integration is currently available only for WhatsApp Bots and Account level. Payments can only be processed in South African Rand (ZAR).
{% endhint %}

***

### Connecting PayFast

#### Step 1: Open PayFast Integration

1. Log in to your BotPenguin account.
2. Select the WhatsApp Bot you want to configure.
3. Navigate to Third Party Integrations.
4. Select PayFast.

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

***

#### Step 2: Obtain Your PayFast Credentials

Before connecting your account, you will need your PayFast merchant credentials.

1. Log in or sign-up on your PayFast Merchant Dashboard.
2. Locate the following credentials:
   1. Merchant ID
   2. Merchant Key
   3. Salt Passphrase

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

#### Step 3: Configure a Passphrase

If a passphrase has not been configured:

1. Add a secure Passphrase.

{% hint style="info" icon="lightbulb" %}
The "salt" passphrase is used in the signature generation to provide extra security. It ensures that the data being sent is accurate and has not been tampered with. The passphrase is never published or given out.
{% endhint %}

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

2. This passphrase will be required while connecting your PayFast account with BotPenguin.

***

#### Step 4: Connect Your PayFast Account

1. Return to BotPenguin and enter the following details:
   1. Merchant ID
   2. Merchant Key
   3. Passphrase

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

2. Click **Connect**.
3. After the credentials are verified successfully, your PayFast account will be connected to BotPenguin.
4. You can now use PayFast as a payment provider within your chatbot flows.

***

#### Step 5: Open Your Chatflow

1. Navigate to **Chat Flows**.

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

2. Open the chatflow where you want to collect payments.
3. You can either:
   * Open an existing chatflow, or
   * Create a new chatflow.

***

#### Step 6: Add the Payment Component

1. Add the **Payment** component onto your chatflow.

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

2. Open the component configuration.

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

***

#### Step 7: Configure the Payment Component

1. Before configuring the payment provider, enter the payment message that will be displayed to the customer.
2. This message should clearly explain what the customer is paying for before they proceed with the payment.

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

***

#### Step 8: Select PayFast as the Payment Method and add Payment Amount

1. Under **Payment Method**, open the dropdown.
2. Select **PayFast**.

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

3. Add the amount you want to collect using the link.

Once selected, the Payment component will use your connected PayFast account to process customer payments.

***

#### Step 9: Configure the Flow Logic

1. Choose what should happen after the payment attempt.

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

* **Payment Successful:** Select the next chatflow that should be displayed after the payment is completed successfully.
* **Payment Failed:** Select the next chatflow that should be displayed if the payment fails or is cancelled.
* **Go to next message:** You can define the next message the component should redirect the flow to incase the component fails to work.

This allows you to create different conversation paths based on the payment outcome.

{% hint style="info" icon="lightbulb" %}
Your chatbot is now ready to collect payments using PayFast. Publish your chatflow to make the payment experience available to your customers.
{% endhint %}

***

### Best Practices

> 💡 Always verify your Merchant ID and Merchant Key before connecting.

> 💡 Use a strong passphrase to improve account security.

> 💡 Test your integration before using it in production.

***

### Troubleshooting

<details>

<summary>Unable to connect PayFast</summary>

**Likely Cause:** The Merchant ID, Merchant Key, or Passphrase was entered incorrectly.

**Resolution:** Verify that your **Merchant ID**, **Merchant Key**, and **Passphrase** have been entered correctly, then reconnect the integration.

</details>

<details>

<summary>Authentication failed</summary>

**Likely Cause:** The configured Passphrase does not match the one configured in your PayFast Merchant Dashboard.

**Resolution:** Verify the **Passphrase** in your PayFast Merchant Dashboard, update it in BotPenguin if necessary, and reconnect the integration.

</details>

<details>

<summary>PayFast does not appear inside the Payment Component</summary>

**Likely Cause:** The PayFast integration has not been connected successfully.

**Resolution:** Confirm that the integration is connected from **Third Party Apps Integration**. Refresh the chatbot editor if required.

</details>

### FAQs

<details>

<summary>What happens if a customer abandons the payment midway?</summary>

If the customer closes or leaves the PayFast payment page before completing the transaction, the payment remains incomplete. Your chatbot will continue based on the failure path configured in the Payment Component.

</details>

<details>

<summary>Can customers attempt the payment again if their first payment fails?</summary>

Yes. You can design your chatbot flow to redirect users back to the Payment Component or another appropriate step, allowing them to retry the payment.

</details>

<details>

<summary>Will changing my PayFast credentials affect existing chatbot flows?</summary>

Existing chatflows remain unchanged. However, all future payment requests will use the updated PayFast credentials once the integration has been reconnected successfully.

</details>

<details>

<summary>Can I use the same PayFast integration across multiple chatflows?</summary>

Yes. Once connected, the PayFast integration can be selected as the payment gateway in any Payment Component within the same WhatsApp bot.

</details>

<details>

<summary>What happens if I disable or disconnect the PayFast integration after publishing my chatbot?</summary>

Any Payment Components configured to use PayFast will no longer be able to initiate payment requests until the integration is enabled or reconnected.

</details>

<details>

<summary>Can I customize what users see after a successful or failed payment?</summary>

Yes. The Payment Component allows you to configure separate chatbot paths for successful and failed payment outcomes, enabling you to tailor the customer experience.

</details>

<details>

<summary>Does BotPenguin store my customers' payment information?</summary>

No. Payment processing is handled securely by PayFast. BotPenguin only receives the payment status required to continue the chatbot flow.

</details>

<details>

<summary>Can I change the payment amount dynamically during a conversation?</summary>

Yes. The Payment Component can use values collected during the chatbot conversation, allowing payment amounts to vary based on the customer's selections or responses.

</details>

<details>

<summary>Can customers make multiple payments within the same chatbot conversation?</summary>

Yes. You can include multiple Payment Components within a chatflow if your use case requires customers to complete more than one payment during a conversation.

</details>

<details>

<summary>What happens if the customer refreshes the PayFast payment page?</summary>

The behaviour depends on the current payment state within PayFast. Customers should complete the payment using the original payment session to avoid duplicate or incomplete transactions.

</details>

<details>

<summary>Can I use PayFast alongside another payment gateway in BotPenguin?</summary>

Yes. If multiple payment gateways are configured, you can choose the appropriate gateway for each Payment Component based on your business requirements.

</details>

***

### Related Features

{% content-ref url="/pages/cmLvotoMRdKwoaeUrDz5" %}
[WhatsApp Payment Components](/bots/whatsapp-bot/manage-chatflow/components-in-chatflow/whatsapp-payment-components.md)
{% endcontent-ref %}

{% content-ref url="/pages/2Zpm8t0xDV1XalyNwckp" %}
[Manage Chatflow](/bots/whatsapp-bot/manage-chatflow.md)
{% endcontent-ref %}

***

### 🎉 Completion

🎉 You have successfully connected your PayFast account and are now ready to accept payments through BotPenguin chatbots.

***

### Support

If everything is correct and you are still unable to move forward, write to us at [**support@botpenguin.com**](mailto:support@botpenguin.com). We will respond within 48 business hours.
