# Configure the app

Configure the app for Oracle Opera

After you [install](https://docs.stripe.com/use-stripe-apps/oracle/opera/installation.md) the Stripe app for Oracle Opera, you can configure the settings to use the app with your Stripe Terminal integration.

## Share information with Oracle

Your Oracle consultant configures the Oracle Payment Interface (OPI) to communicate with the app. Before this occurs, contact your Stripe account executive or Stripe Support to enable the [required account features](https://docs.stripe.com/use-stripe-apps/oracle/opera/overview.md#enable-required-stripe-account-features). During the call, exchange the following information with Oracle.

| Direction | Information |
| --- | --- |
| Oracle needs from you | - Your hotel property code. Oracle uses this to build the Site ID for the [Merchant Management page](https://docs.stripe.com/use-stripe-apps/oracle/opera/web-interface.md#manage-merchants), in the format `STRIPE|xxxxxx`, where `STRIPE` is Stripe’s chain code.
- The Terminal ID for each Terminal reader, as named in Oracle Opera. You enter this value as the [Workstation ID](https://docs.stripe.com/use-stripe-apps/oracle/opera/web-interface.md#manage-readers) in the web interface dashboard (16-character limit). |
| You need from Oracle | - Transactional port: `8999`
- Tokenization port: `8990`
- Chain code: `STRIPE`
- Primary and failover host: `https://127.0.0.1:8999` |

## Configure the app parameters

Use Windows File Explorer to go to the installation path. Then, edit the `appsettings.json` file to configure the following app parameters. “Stanza” is the Oracle term for parameter categories.

| Stanza | Description |
| --- | --- |
| AllowedHosts | The list of IP addresses allowed to listen for the services in this app. |
| Listen | - **Host**: The IP address used to access the web interface.
- **Port**: The port used to access the web interface.
- **ServerCertificatePath**: The path to the certificate used to access the site securely. The default certificate is a self-signed certificate for the IP address 127.0.01.
- **ServerCertificatePassword**: The password used to access the certificate file. |
| Transactional | - **Host**: The IP address used by the app to access the middleware.
- **Port**: The port used by the app to access the web interface.
- **ServerCertificatePath**: The path to the certificate used to access the site securely. The default certificate is a self-signed certificate for the IP address 127.0.01.
- **ServerCertificatePassword**: The password used to access the certificate file. |
| Token | These settings apply to Opera installations that occur on-premises.
- **Host**: The IP address used to access the web interface.
- **Port**: The port used to access the web interface.
- **ServerCertificatePath**: The path to the certificate used to access the site securely. The default certificate is a self-signed certificate for the IP address 127.0.01.
- **ClientCertiticateAuth**: A value of `true` or `false`, with a `false` value signifying that `ClientCertificateAuth` isn’t enabled on TPS.
- **ClientCertificatePath**: The path to the certificate used to access the site securely. The default certificate is a self-signed certificate for the IP address 127.0.01.
- **ClientCertificatePassword**: The password used to access the certificate file.
- **ServerCertificatePath**: The path to the signing certificate used to sign the client certificate.
- **ServerCertificatePassword**: The password used to access the certificate file. |
| Serilog | These settings apply to the log level.
- **Default**: The default log level is `Debug`. You can change this setting to `Verbose`, `Debug`, `Information`, `Warning`, `Error`, or `Fatal`.
- **Override**: Override the default log level for module-specific logging: `Microsoft`, `Microsoft.Hosting.Lifetime`, or `System.Net.Http.HttpClient`. |
| Using | Don’t change the values for these system modules that the middleware uses. |

## Verify the sample file

Verify that your `appsettings.json` file looks similar to the following sample:

```json
{
  "AllowedHosts": "*",
  "Listen": {
    "Dashboard": {
      "Host": "127.0.0.1",
      "Port": "8081",
      "ServerCertificatePath": "certificate.pfx",
      "ServerCertificatePassword": "1234"
    },
    "Transactional": {
      "Host": "127.0.0.1",
      "Port": "8999",
      "ServerCertificatePath": "certificate.pfx",
      "ServerCertificatePassword": "1234"
    },
    "Token": {
      "Host": "127.0.0.1",
      "Port": "8990",
      "ClientCertificateAuth": false,
      "ClientCertificatePath": "../data/sslcerts/cert.pfx",
      "ClientCertificatePassword": "1111",
      "ServerCertificatePath": "certificate.pfx",
      "ServerCertificatePassword": "1234"
    }
  },
  "Serilog": {
    "MinimumLevel": {
      "Default": "Debug",
      "Override": {
        "Microsoft": "Warning",
        "Microsoft.Hosting.Lifetime": "Information",
        "System.Net.Http.HttpClient": "Warning"
      }
    },
    "Using": [
      "Serilog.Sinks.Console",
      "Serilog.Sinks.File"
    ]
  }
}
```

## Restart the Windows service

After you edit the `appsettings.json` file, restart the Windows service by doing the following:

1. Press the **Windows** key on your keyboard.
2. Type `services` to open the Services app.
3. Select **Services** in the left pane, and then go to **Stripe OPI App Service** in the right pane.
4. Click **Restart** to restart the service and allow you to [access the web interface](https://docs.stripe.com/use-stripe-apps/oracle/opera/web-interface.md).

## Configure refunds

By default, Opera sends a reference to only the most recent charge on a guest’s booking when you request a refund, regardless of which charge you’re refunding. To refund a specific, earlier charge on a booking, ask your Oracle representative to do the following:

1. Confirm that disabling Rebate Validation Check is supported for your property.
2. Disable **Rebate Validation Check** in Opera Cloud.
3. Clear the Opera Cloud cache.

With Rebate Validation Check disabled, the app uses the `AlternateTransRef` value in the refund request to identify the specific Stripe PaymentIntent, and therefore the specific charge, to refund. Process refunds per charge instead of per booking total: if a booking has two separate charges that both need refunds, submit two separate refunds, one against each charge, instead of a single refund for the combined amount.

> Stripe rejects a refund request that exceeds the refundable balance of the referenced charge, even if other charges on the same booking have funds available. Before you go live, test a full refund against an earlier charge, a partial refund, a second partial refund against the same charge, and a refund that exceeds the charge’s refundable balance to confirm it’s rejected.

## See also

- [Access the web interface](https://docs.stripe.com/use-stripe-apps/oracle/opera/web-interface.md)
- [Troubleshoot the app](https://docs.stripe.com/use-stripe-apps/oracle/opera/troubleshooting.md)
