Payhawk - AFAS - Connect with AFAS manual

Payhawk - AFAS - Connect with AFAS manual

This guide explains how to set up an App Connector in AFAS to connect with Payhawk. AFAS uses a unique connector system, so proper setup is essential for the integration to work.

1. Access AFAS Environment 🔑

Screenshot 2025-04-02 at 08.03.41.png

2. Navigate to App Connector Section 📂

  • Go to: General > Management > App Connector

3. Create a New App Connector 🛠️

  1. Click New.

  2. Fill in the following details:

    • Description: Enter a clear name (e.g., "Databrydge - Payhawk AFAS connection").

    • Generate token automatically: Enable this option.

    • Create a new user group: Select this to assign permissions.

    • Create a new user: Assign a dedicated user for the connector.

  3. Click Next.

Screenshot 2025-11-07 at 13.52.58.png

 

Adding GetConnectors and UpdateConnectors 🔗

Adding GetConnectors 📥

  1. In the App Connector assistant, click Actions > Import.

  2. Select the required GetConnector file and complete the import process.

Adding UpdateConnectors 📤

  1. Click New under the UpdateConnectors tab.

  2. Select the appropriate connectors from the list.

  3. Click Next.

✅ Required GetConnectors (Fetch Data)

  • Profit_Administrations: Fetches administrations.

  • Profit_Journals: Fetches journals.

  • Profit_VAT_Code: Fetches VAT codes.

  • Profit_Employees: Fetches Employees.

  • Profit_Functions: Fetches Functions.

  • Databrydge_allocation_codes: Allocation codes* (cost centers and projects)

  • databrydge_creditors: Creditors*

  • databrydge_period_table: Periods*

  • Databrydge_Profit_Accounts: General Ledger Accounts*

  • databrydge_Profit_Employees: Employees*

  • Databrydge_Profit_Periods: Financial Periods*

⚠️ Note: All connectors marked with * must be imported manually. See the section below.

Screenshot 2025-04-02 at 16.47.23.png

Importing the Custom Connector

Most connectors are available in the standard connectors list. However, the following are custom connectors and must be imported manually:

  • Databrydge_allocation_codes

  • databrydge_creditors

  • databrydge_period_table

  • Databrydge_Profit_Accounts

  • databrydge_Profit_Employees

  • Databrydge_Profit_Periods

 

To import it, follow these steps:

  1. Download the custom connector file.

  2. Go to the connectors screen and click the Actions button.

  3. In the displayed menu, select Import.

  4. Click the File button and select the downloaded file.

  5. Complete the import process.

Screenshot 2025-04-02 at 15.06.03.png
Screenshot 2025-04-02 at 16.42.55.png

✅ Required UpdateConnectors (Modify Data)

  • KnDimCode: Saves cost centers and projects.

  • FiEntries: Saves transactions (purchase and journal transactions).

  • KnSalesRelationOrg: Saves debtors/customers.

  • KnPurchaseRelationOrg: Saves creditors/suppliers.

  • KnSubject: Saves Subject (upload PDF attachment to the transactions).

Screenshot 2025-04-02 at 10.20.02.png

Generating and Storing the API Token 🔐

  1. Once the assistant is completed, AFAS will generate an API token.

  2. ⚠️ Important: This token is displayed only once. Copy and store it securely.

Screenshot 2025-04-02 at 10.21.16.png

Configuring Permissions & Authorizations🔒

To ensure the App Connector only accesses necessary data, follow these steps:

1. Access the Authorization Tool

  • Go to: General > Management > Authorization Tool

2. Assign User to the Correct Group

  1. In the User Maintenance tab, select the user you created for the connector.

  2. Switch to the Member Group tab.

  3. Click New and add the ADM record.

Screenshot 2025-04-02 at 17.49.38.png

Testing the Connection 🧪

You can test the connection using tools like Postman, a script, or the AFAS Connection Test site.

  1. Visit the AFAS Connection Test site:
    AFAS Connection Test

  2. Enter your AFAS Online member number (your ID).

  3. Select the appropriate environment type.

  4. Enter the token you saved when you created the connection.

  5. Press “Login with token”

Screenshot 2025-09-23 at 09.05.54.png
Screenshot 2025-09-22 at 23.45.04.png

 

Verify that the App Connector can:

Read the necessary data.

Post transactions to AFAS for the selected administration.

This is done by checking if the configured GetConnectors and UpdateConnectors are in the list of available connectors. If any issues arise, ensure the correct connectors are assigned and that permissions are configured properly.


Final Checks ✅

  • Ensure all required GetConnectors and UpdateConnectors are included.

  • Validate that the connector works correctly by testing with real data.