# Payment Service Provider

Saaster makes use of the payment service provider [Payrexx](https://www.payrexx.com/?ref=paweco). At the moment, integration of other payment provides is not planned.

Payrexx is a [Swiss Payment Service Provider](https://www.payrexx.com/?ref=paweco) and is subject to Swiss quality control. And anyone who knows Switzerland knows how important that is.

But this is not the only reason why we decided to work with [Payrexx](https://www.payrexx.com/?ref=paweco). Another reason is that [Payrexx ](https://www.payrexx.com/?ref=paweco)has already integrated tons of other payment service providers in the system, so that every SaaS provider can probably find their desired PSP in it.

<figure><img src="https://4165049393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuUY7tl3j0xMLQbwSQOYv%2Fuploads%2Fn1CTLBwA8hyuCaiww83e%2Fimage.png?alt=media&#x26;token=62561e75-c4bc-4b35-9226-8662b4fc21ed" alt=""><figcaption></figcaption></figure>

The following chapters will guide you through the configuration and integration of Payrexx in saaster.

## Create an account

First you need an account with Payrexx. [Click here to register](https://www.payrexx.com/?ref=paweco).\
Enter your company name or a part of it here:

<figure><img src="https://4165049393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuUY7tl3j0xMLQbwSQOYv%2Fuploads%2FMJlPQnrWSlRU6e4oYXgf%2Fimage.png?alt=media&#x26;token=98c36a3e-456a-4d48-a51e-9e03ed58aa50" alt=""><figcaption></figcaption></figure>

After you have created your login, you will find yourself in the [Payrexx ](https://www.payrexx.com/?ref=paweco)account.

## Create an API key

Now you need to create an API key. To do this, navigate to **API & Plugins** on the left-hand side.

<figure><img src="https://4165049393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuUY7tl3j0xMLQbwSQOYv%2Fuploads%2FyvLGGFz1jobEnMcNVvOn%2Fimage.png?alt=media&#x26;token=acdc9386-5a93-4b78-9362-4601da82529c" alt=""><figcaption></figcaption></figure>

Click the button "Add API Key" and assign a meaningful name to the new key. It is best to choose the name of your project:

<figure><img src="https://4165049393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuUY7tl3j0xMLQbwSQOYv%2Fuploads%2FpraKcUXzqTOY7KDWRCAR%2Fimage.png?alt=media&#x26;token=19a0c923-01c4-45e3-b62a-25cf3e6088f2" alt=""><figcaption></figcaption></figure>

Keep the API key you received safe. You will need this key in the further steps.

## Create a webhook

Now you create a webhook. This is used to store payment methods and to charge them repeatedly later. To do this, navigate to **Webhooks** on the left-hand side.

<figure><img src="https://4165049393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuUY7tl3j0xMLQbwSQOYv%2Fuploads%2FYwtCmiyTHJbaVnfyqcSH%2Fimage.png?alt=media&#x26;token=38a18e26-0502-421f-81b1-18bc99963346" alt=""><figcaption></figcaption></figure>

You need two webhooks, one for the *development environment* and one for the *production environment*.

### Development environment

You will find a file called "payrexx\_webhook\_dev.cfm" in the saaster file structure in the "frontend" folder. You must now upload this file to any server that can be reached from the internet.&#x20;

*Example:*

`https://your-domain.com/frontend/core/handler/payrexx_webhook_dev.cfm`

This is also the path that you must enter as the webhook.\
Click "Add webhook". Give the webhook a unique name and write the path to the file you just uploaded in the field:

<figure><img src="https://4165049393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuUY7tl3j0xMLQbwSQOYv%2Fuploads%2FzM8u42dqg9djqRbsAKq1%2Fimage.png?alt=media&#x26;token=cc18fe8d-cd80-41af-b3ac-e92a4903afc5" alt=""><figcaption></figcaption></figure>

Configure your webhook exactly as shown above.

### **Production environment**

For the productive environment you can add a webhook and specify the file "payrexx\_webhook.cfm" also in the folder "frontend". Everything else remains the same.

**Note: You must add a password defined in a url variable:**\
`https://your-domain.com/frontend/core/handler/payrexx_webhook.cfm?pass=xxx`

The password is defined in config.cfm

## Create a payment page design

To ensure that your payment page matches your design, you can create a corresponding design in [Payrexx](https://www.payrexx.com/?ref=paweco).

Click on "Settings" on the left, then on "Look & Feel":

<figure><img src="https://4165049393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuUY7tl3j0xMLQbwSQOYv%2Fuploads%2FOX21O5UCHY1yn3dtbmG8%2Fimage.png?alt=media&#x26;token=a249b8eb-4f30-4689-a741-af61805c1766" alt=""><figcaption></figcaption></figure>

Click the green button "Add a new profile" at the top right and fill this form according to your wishes:

<figure><img src="https://4165049393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuUY7tl3j0xMLQbwSQOYv%2Fuploads%2FQOHY8S1t0Z6qWKFmiA5h%2Fimage.png?alt=media&#x26;token=03e0d3b9-a6d2-4661-8e1a-7fde859f7dfa" alt=""><figcaption></figcaption></figure>

Save the new profile at the bottom. You will now get a unique ID for your design.&#x20;

<figure><img src="https://4165049393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuUY7tl3j0xMLQbwSQOYv%2Fuploads%2FgWELhvZ2qHZRYTycljFr%2Fdesign_payrex.png?alt=media&#x26;token=9d0f6fd1-5531-4a3c-8531-ebee71466bce" alt=""><figcaption></figcaption></figure>

Please copy this ID into the config.cfm of your project. Read more about the configuration / config.cfm here:

{% content-ref url="../getting-started/installation" %}
[installation](https://docs.saaster.io/getting-started/installation)
{% endcontent-ref %}

## Payment providers

In this menu you can configure your payment methods and choose the payment provider.

Please follow the instructions from [Payrexx](https://www.payrexx.com/?ref=paweco), as this configuration can be very extensive. You will also have to provide [Payrexx ](https://www.payrexx.com/?ref=paweco)with some confirmations in order to activate certain payment methods.

Docuementation related to [Payrexx ](https://www.payrexx.com/?ref=paweco)payment providers:

{% embed url="<https://docs.payrexx.com/merchant/payment-priovder/payrexx-direct>" %}

For more information about [Payrexx ](https://www.payrexx.com/?ref=paweco)we recommendreading the official documentation:

{% embed url="<https://docs.payrexx.com/merchant/>" %}
