# aforms

## General Information

aforms is a company specializing in the creation and management of digital forms for e-government and e-business applications. With the AFS software, public authorities and businesses can create multilingual, accessible, and standards-compliant forms without any programming knowledge – whether online, on mobile devices, or in PDF format.

### Links

* aforms [Website](https://www.aforms.com/)
* [Form creation](https://www.aforms.com/en/produkte/designer-formserver) with aforms

## Integration

The following guide outlines how to integrate Payrexx into the AFS Designer by aforms solutions & services.

{% hint style="info" %}
Please note that integration with aforms is only available in the Standard and Premium plans. [For more information](https://payrexx.com/en/prices)
{% endhint %}

### Configuration of Payrexx

{% hint style="info" %}
Make sure you're [logged in](https://login.payrexx.com/) to your Payrexx account before you begin. If you don’t have a Payrexx account yet, you can [register](https://signup.payrexx.com/) now.
{% endhint %}

* Navigate to the **API and Plugins** section in the main menu of your merchant administration.
* Scroll down to "Add API Integration" and click on "Add API Key":

<div align="left"><figure><img src="/files/t52RyleDsuzN17kWXaXE" alt=""><figcaption><p>Adding an API Key for integration with aforms</p></figcaption></figure></div>

* Give the integration any name you prefer, such as "aforms".
* Click on "Add":

<div align="left"><figure><img src="/files/JRjMFJhyx8WhxoFwoKAT" alt="" width="563"><figcaption><p>Click on "Add" to generate the API Key</p></figcaption></figure></div>

* You will now find the new API Key under "Active Integrations."
* Click on "Copy" to copy the API Key to your clipboard. You will need it in a later step:

<div align="left"><figure><img src="/files/R65lSXunHgL1kKc468Sl" alt=""><figcaption><p>Copying the API key to the clipboard for later use with aforms</p></figcaption></figure></div>

### Configuration of aforms

#### Form server property

* In the AFS Designer, navigate to **Administration > Resources**:

<div align="left"><figure><img src="/files/1Ck0jFqBlq6dPuvZMbbo" alt=""><figcaption><p>Starting the configuration in the AFS Designer</p></figcaption></figure></div>

* Search the resource list for a form server property or create a new one using the plus icon:

<div align="left"><figure><img src="/files/2Yy3jxmcMCXT0bjwQnXm" alt=""><figcaption><p>Creating a form server property</p></figcaption></figure></div>

* Enter your properties and save with the check mark icon:

<div align="left"><figure><img src="/files/vJvvovsci9Z0KXGXrAPI" alt=""><figcaption><p>Entering the properties</p></figcaption></figure></div>

Examples Formserver Property:

```
# Payrexx-URLcom.anecon.afs.common.extender.payrexx.url=
```

First part (up to the first dot) of the Payrexx administration URL:

```
https://aforms2web.payment...com.anecon.afs.common.extender.payrexx.instanceId=xxx
```

Default API key from the Payrexx administration:

```
com.anecon.afs.common.extender.payrexx.secret=xxx
```

{% hint style="info" %}
Replace 'xxx' with the API Key that you copied to your clipboard during the Payrexx configuration.
{% endhint %}

Currency:

```
com.anecon.afs.common.extender.payrexx.currency=xxx
```

#### Form, page, and block

* Navigate to **Forms** and create a new form using the plus icon:

<div align="left"><figure><img src="/files/t4FI1w9WHWHJ7jFaSiXM" alt=""><figcaption><p>Creating a new form</p></figcaption></figure></div>

* Enter the form name, the general ID, and the description of the form:

<div align="left"><figure><img src="/files/vzuJ5nbbSTXrn6cMc4n9" alt=""><figcaption><p>Form configuration</p></figcaption></figure></div>

* Create a new form page, fill in the corresponding fields, and save your settings:

<div align="left"><figure><img src="/files/An6NcCSDQ6zq0dcwn45r" alt=""><figcaption><p>Configuration of the new form page</p></figcaption></figure></div>

* Create a new block within the created form page:

<div align="left"><figure><img src="/files/omvh4OSNnKUGApOnmkZ5" alt=""><figcaption><p>Creating a new block</p></figcaption></figure></div>

* Add the required fields to the newly created block:

<div align="left"><figure><img src="/files/jV5BXdtA4hqubTOsBCF2" alt=""><figcaption><p>Block configuration</p></figcaption></figure></div>

* Automatically create the layout of the block by clicking the table icon, define the field names and placeholder texts for the layout, and save the block:

<div align="left"><figure><img src="/files/r6UURvS0fmwVIGQMFRrt" alt=""><figcaption><p>Creating the layout for the block</p></figcaption></figure></div>

* This is what the created block looks like:

<div align="left"><figure><img src="/files/z2poMpa6OZKTr5GVEXMx" alt=""><figcaption><p>Displaying the block</p></figcaption></figure></div>

* Place the newly created block on the first page of the form:

<div align="left"><figure><img src="/files/c6u42oFQzsrETUeMx1NZ" alt=""><figcaption><p>Placing the block</p></figcaption></figure></div>

* Save the page and form details by clicking the check mark icon. Form, page, and block are now ready for integration with Payrexx.

#### Creating and configuring the extender

{% hint style="info" %}
With the Payrexx extender, you can offer form users the option to make a payment directly upon submission. Communication between AFS and Payrexx takes place via REST web services. This function is available at the form level.
{% endhint %}

* Create a new extender at the form level by clicking the plus icon:

<div align="left"><figure><img src="/files/AvXFRax8q0X98hUOxBw5" alt=""><figcaption><p>Creating an extender</p></figcaption></figure></div>

* Select the "Form: Payrexx" option from the extender selection list:

<div align="left"><figure><img src="/files/AtxCxhkZWeTkijaWJynY" alt=""><figcaption><p>Creating an extender of type "Form: Payrexx"</p></figcaption></figure></div>

* Configure the extender according to your requirements and save it by clicking the check mark icon:

<figure><img src="/files/l1vyZTlp90eMHXl2rkyh" alt=""><figcaption><p>Extender configuration</p></figcaption></figure>

* Using the condition =#V1=="1" (SpeL expression), the extender will only be executed if the payment method "Credit Card" has been selected in the form:

<div align="left"><figure><img src="/files/H1ea3RpRVzbL91so6hnJ" alt=""><figcaption><p>Restricting extender execution to payment method "credit card"</p></figcaption></figure></div>

* This is what the payment method selection looks like in the form:

<div align="left"><figure><img src="/files/cJ0l4YeRrtpXHrykGl0U" alt="" width="239"><figcaption><p>Payment method selection</p></figcaption></figure></div>

{% hint style="info" %}
Kindly note that the purchase on invoice payment method will always be shown.
{% endhint %}

* Fields can be assigned to the extender via the form tree:

<div align="left"><figure><img src="/files/pXXiPcr8fTO7SHAy5OSw" alt=""><figcaption><p>Field assignment in the extender</p></figcaption></figure></div>

**Usage of the Fields:**

* **Payment Note:** The payment note consists of the reference ID and the form title and is used to identify the payment in the Inbox/APF.
* **Reference ID:** The reference ID is a unique ID used to identify the payment.
* **Amount:** Transaction amount
* **First Name:** First name of the applicant
* **Last Name**: Last name of the applicant
* **Email Address for Payment Confirmation:** The invoice and payment confirmation will be sent to this email address.

**Purpose of Use in the Invoice (Product Description):**

<div align="left"><figure><img src="/files/cg7ytH4YeOP7papqtvat" alt=""><figcaption><p>Invoice with purpose of use (product description)</p></figcaption></figure></div>

#### Transfer form collection

* By clicking the arrow icon, the form collection is transmitted to the form server and thus made available online:

<div align="left"><figure><img src="/files/zPalLtk40k4FPHuqCERc" alt=""><figcaption><p>Transmitting the form collection to the form server</p></figcaption></figure></div>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.payrexx.com/merchant/english/integration/business-software/aforms.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
