Feature flags
Configure account-level feature-flag preferences for supported providers.
Configure account-level feature-flag preferences to select or avoid supported providers for your account.
Prerequisites
- Store an API key that can access the account.
- Identify the account ID you want to configure.
- Complete any endorsement required by the provider before setting a preference.
How feature flags apply
Feature flags are stored in the account owner's feature-flag preferences. Use the feature-flags endpoint to set preferences for one account at a time.
Due can also apply a flag at the platform level. When Due flags a platform, all accounts on that platform inherit the flag automatically. Contact Due to request a platform-level change; you cannot set it through this endpoint.
A platform-wide provider change can affect existing accounts because they may need to complete an endorsement before they can use the provider.
Available flags and values
Use one of these values for each supported flag:
| Value | Meaning |
|---|---|
prefer | Prefer the flagged provider when selecting a provider. |
forbid | Do not use the flagged provider. |
The currently supported flags are:
| Flag | Description |
|---|---|
named | Controls the named provider preference for EUR Virtual Accounts (named VS non-named VA). |
row-erebor | Controls the rest-of-world (non-US) residents Erebor provider preference. |
Check a channel's feature-flag requirements
Before setting an account preference, retrieve the available channels and inspect each channel's featureFlags and endorsementsRequired fields. A channel's featureFlags array lists the flag that applies to that provider, while endorsementsRequired lists endorsements the account must complete to use it.
curl --request GET \
--url 'https://api.due.network/v1/channels?onlyAvailable=true' \
--header 'Authorization: Bearer <API_KEY>' \
--header 'Due-Account-Id: <ACCOUNT_ID>' \
--header 'accept: application/json'For example, a USD wire channel can identify the Erebor provider with row-erebor and require the usd_bank_erebor_v1 endorsement:
{
"rail": "wire",
"type": "static_deposit",
"currencyCode": "USD",
"feeBps": 25,
"limitMax": "5000000",
"endorsementsRequired": ["usd_bank_erebor_v1"],
"featureFlags": ["row-erebor"]
}Set a preference only for a flag returned by the channel you intend to use. A prefer value does not bypass the channel's residency, permission, or endorsement requirements.
1. Retrieve the account preferences
Retrieve the feature-flag preferences currently configured for an account.
curl -X GET "https://api.due.network/accounts/acct_abc123/feature_flags" \
-H "Due-Account-Id: acct_abc123"The response returns the account's current feature-flag preferences.
2. Update account preferences
Send a featureFlags map with the flags you want to set. Each map value must be prefer or forbid.
curl -X POST "https://api.due.network/accounts/acct_abc123/feature_flags" \
-H "Due-Account-Id: acct_abc123" \
-H "Content-Type: application/json" \
-d '{"featureFlags": {"row-erebor": "prefer"}}'The API returns the updated preference set.
Provider-routing behavior
Operations that require a GET channel use the flagged provider by default when the channel's feature-flag requirements and account eligibility are satisfied. This includes creating new virtual accounts and initiating transfers.
Transactions for virtual accounts that already use an older provider continue to be processed by that provider. Changing an account preference does not move an existing virtual account to a different provider.
Troubleshooting
The account cannot use the preferred provider
Check whether the account has completed the endorsement required by that provider. A provider preference does not replace its eligibility or endorsement requirements.
Existing virtual-account transactions use a different provider
Existing virtual accounts continue to use their current provider. Create a new virtual account after updating the preference to use the flagged provider for eligible new operations.
Updated about 7 hours ago