> For the complete documentation index, see [llms.txt](https://docs.shoppego.my/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.shoppego.my/welcome/en/settings/payment-options/payment-gateway/affanpay.md). Agents can also search and read this documentation through its [MCP server](https://docs.shoppego.my/welcome/~gitbook/mcp).

# AffanPay

To use AffanPay, please ensure that you have **first created** an **AffanPay account**.

{% hint style="success" %}
You need to make sure you have:

* Possesses SSM/TIN
* Current bank account.
  {% endhint %}

{% hint style="info" %}
**Account verification, charges, and transaction funds are managed entirely by AffanPay.**
{% endhint %}

## On This Page:

* [Settings in AffanPay](#settings-in-affanpay)
* [Settings on Shoppego](#settings-on-shoppego)

## Settings in AffanPay

{% hint style="danger" %}
**Before following this tutorial, ensure that your AffanPay account has been verified and that you are not using a test account.**
{% endhint %}

To integrate payment gateway AffanPay with Shoppego, you need to get a **Secret Key** and **API token**.\
\
If you haven't registered for an Affanpay account yet, you can use this link:\
<https://app.affanpay.my/register>

### Get Secret Key

1. Log in to your AffanPay account.

<figure><img src="https://3359028955-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lh09fNwqqta5Vj6Wr8p%2Fuploads%2FHGiWThVrpwzM0J2fUywa%2Fshoppego-x-affanpay-dashboard.jpg?alt=media&amp;token=b72d8d72-16d0-484f-b00b-3ae4b9f4a8f5" alt=""><figcaption></figcaption></figure>

2. Click on the **Settings > Developers** button/text. You will then be able to view your account's **Secret key**, which you can copy and enter into the Shoppego settings.

### Get API Token

1. Log in to your AffanPay account.

<figure><img src="https://3359028955-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lh09fNwqqta5Vj6Wr8p%2Fuploads%2FHGiWThVrpwzM0J2fUywa%2Fshoppego-x-affanpay-dashboard.jpg?alt=media&amp;token=b72d8d72-16d0-484f-b00b-3ae4b9f4a8f5" alt=""><figcaption></figcaption></figure>

2. Click on the **Settings > Developers** button/text.&#x20;
3. Under **API tokens**, **give the token a name for your own reference** and click **Generate token**.
4. You can **copy the token straight away to enter in Shoppego settings later on**. **The token is shown once and cannot be retrived again**.&#x20;

## Settings on Shoppego

1\. Log in to your Shoppego account.

![](https://3359028955-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lh09fNwqqta5Vj6Wr8p%2Fuploads%2FGTSLOQwiLEaE07Krrji2%2Fdashboard-shoppego.jpg?alt=media\&token=3b614242-6d4b-4de6-be91-c53d180ebb96)

2\. Click on **Settings**

![](https://3359028955-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lh09fNwqqta5Vj6Wr8p%2Fuploads%2FWr1XiPzwL8uj5S4gOKNs%2Fdashboard-shoppego-click-settings.jpg?alt=media\&token=5f897ce4-e475-4ff8-96dd-8c9980e6cb66)

3\. Click on **Payment options.**

![](https://3359028955-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lh09fNwqqta5Vj6Wr8p%2Fuploads%2F51VebAHJhEiMW0qARn31%2Fdashboard-shoppego-settings-click-payment-options.jpg?alt=media\&token=316fd842-7a6d-4e9a-a1a9-81a1c5bbd5c3)

4\. If you have not yet activated the payment option for AffanPay, click the "**Activate**" button under the "**Alternative Payments**" section for AffanPay. If you have already activated the payment option for AffanPay, click the "**Edit**" button.

![](https://3359028955-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lh09fNwqqta5Vj6Wr8p%2Fuploads%2FfTtrbiUPX2KSRVfolRY8%2Fdashboard-shoppego-payment-options-click-edit-affanpay.jpg?alt=media\&token=9859da34-6292-4a0f-a212-f0e2e5f18445)

5\. Next, the display shown below will appear, and you can fill in the information:

![](https://3359028955-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lh09fNwqqta5Vj6Wr8p%2Fuploads%2Fbobe3wCHmBR2652F0JRu%2Fdashboard-shoppego-affanpay.jpg?alt=media\&token=74b7e729-bfe6-4e53-82ad-ef766fe9a7ed)

* **Display name at checkout : Enter the payment name you want (Example AffanPay)**
* **API token :** **Enter the AffanPay account API token that you just obtained in the previous step.**
* **Secret Key : Enter the Secret Key for your AffanPay account that you just copied in the previous step.**

6\. After finishing, make sure you have clicked **Enable** and click the **Save** button.

![](https://3359028955-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lh09fNwqqta5Vj6Wr8p%2Fuploads%2FpknpdxEvRHajiDnytu6k%2Fdashboard-shoppego-affanpay-click-save.jpg?alt=media\&token=4150f301-d476-44b5-a7c5-5d44df9842d9)

After saving, you can attempt a purchase on your website to view the AffanPay payment option at checkout and verify the settings you just configured.
