> For the complete documentation index, see [llms.txt](https://docs.optty.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.optty.com/partner-onboarding-docs/onboarding-api/provider-visibility.md).

# Provider Visibility

Provider visibility decides which payment providers a merchant is allowed to activate. It is separate from configuration.

* **Visibility**: can the merchant see and activate this provider and currency?
* **Configuration**: the credentials and settings used once it is activated (see [Merchant Payment Method Configuration](/partner-onboarding-docs/onboarding-api/merchant-payment-method-configuration.md)).

{% hint style="info" %}
Visibility only controls new activations. A provider and currency that is already active keeps working.
{% endhint %}

## How visibility is decided

* `isAllOptIn` is a boolean on the parent and on each merchant. `true` means every provider is visible.
* If a merchant's `isAllOptIn` is `false`, it can only see the providers you opt in, either for that merchant or for all merchants under your parent.
* A merchant created without `isAllOptIn` takes its parent's value.

## Permissions

Use a parent (or grandparent) token. Portal users need the `manage_provider_visibility` permission. `get-available-payment-providers` can also be called with a merchant token.

## Opt in for all merchants

Omit `ringfencedFor` to apply the opt-in to every merchant under your parent, including merchants you create later.

```bash
curl -X POST https://api.qa.optty.com/ringfenced-provider/ringfence-payment-provider \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"provider": "KLARNA_AU", "currency": "AUD"}'
```

## Opt in for one merchant

```bash
curl -X POST https://api.qa.optty.com/ringfenced-provider/ringfence-payment-provider \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"provider": "KLARNA_AU", "currency": "AUD", "ringfencedFor": "<merchantId>"}'
```

## Opt in several providers at once

`ringfencedFor` is required on the bulk call.

```bash
curl -X POST https://api.qa.optty.com/ringfenced-provider/ringfence-payment-providers \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "ringfencedFor": "<merchantId>",
    "payload": [
      {"provider": "KLARNA_AU", "currencies": ["AUD"]},
      {"provider": "VOLT_AU", "currencies": ["AUD"]}
    ]
  }'
```

## Check what a merchant can see

```bash
curl "https://api.qa.optty.com/ringfenced-provider/get-available-payment-providers?currency=AUD&ringfencedFor=<merchantId>" \
  -H "Authorization: Bearer $TOKEN"
```

To list the opt-ins you have created:

```bash
curl "https://api.qa.optty.com/ringfenced-provider/get-ringfenced-payment-providers" \
  -H "Authorization: Bearer $TOKEN"
```

`currency` and `ringfencedFor` are optional filters.

## Remove an opt-in

`revert-ringfenced-provider` takes the same body as the single opt-in call, and `revert-ringfenced-providers` takes the same body as the bulk call.

```bash
curl -X POST https://api.qa.optty.com/ringfenced-provider/revert-ringfenced-provider \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"provider": "KLARNA_AU", "currency": "AUD", "ringfencedFor": "<merchantId>"}'
```

{% hint style="warning" %}
Removing an opt-in blocks new activations only. A provider the merchant has already activated stays active until it is deactivated separately.
{% endhint %}

## Portal

The portal's Payments Management page manages visibility for one selected merchant at a time, and is only editable while that merchant's `isAllOptIn` is `false`. To opt in all merchants at once, use the API.
