# Getting Started

<figure><img src="https://539304174-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-McsA9Ay7RplF5hVbrkE%2Fuploads%2Fgit-blob-d512a756877d8b872dc2a979b443280a2c38be2b%2FtapToPayPayment.jpg?alt=media" alt="Terminal Payment"><figcaption></figcaption></figure>

## Resources

### 1. Payrexx Tap to Pay App

This app is required on the device to process payments.

* [**Download on Google Play**](https://play.google.com/store/apps/details?id=com.payrexx.taptopay)

### 2. Tap to Pay SDK

The SDK contains the core logic for communication between your cash register app and the Payrexx Tap to Pay app. Here you will find the technical documentation for integrating the library.

* [**Go to repository: Payrexx TapToPay SDK**](https://github.com/payrexx/TapToPaySDK)

### 3. ECR Demo App

This demo application shows a complete implementation of the SDK. It serves as a practical example (best practice) of how to address the interface and process callbacks.

* [**Go to repository: Payrexx TapToPay ECR Demo**](https://github.com/payrexx/TapToPayECRDemo)

## How it works

The solution is based on secure App-to-App communication using Android Intents. This ensures that your cash register application never has to handle sensitive card data directly, as the actual transaction processing is delegated to the certified Payrexx Tap to Pay app.

1. **Initiation:** Your cash register app initializes the payment request via the SDK.
2. **Switch:** The Android OS brings the Payrexx Tap to Pay app to the foreground.
3. **Processing:** The customer taps their card or phone on the device. The Payrexx app handles the NFC communication and authorization.
4. **Return:** Upon completion, the Payrexx app closes, and control is returned to your cash register app along with the transaction result.

{% @mermaid/diagram content="sequenceDiagram
participant POS as Your Cash Register App
participant TTP as Payrexx Tap to Pay App

```
Note over POS: Merchant enters amount
POS->>TTP: 1. Initiate Payment (Intent with JSON Bundle)
activate TTP
Note over TTP: Application Switch
Note over TTP: 2. Process Payment<br/>(NFC Interaction)
TTP-->>POS: 3. Return Result (JSON)
deactivate TTP
Note over POS: 4. Handle Callback<br/>(Success/Error)" %}
```

Please refer to the `readme.md` files in the linked repositories for detailed documentations and system requirements.

Supported payment methods:

* Contactless cards payment (Visa, Mastercard)
* Twint
