Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(warehouse_sources): support flutterwave API version v4 (#119201)

Tom Owers82e40a200e20
diff --git a/.agents/skills/warehouse-source-new-version/SKILL.md b/.agents/skills/warehouse-source-new-version/SKILL.md
index 5204e25b1f4f..913c67a8a9b1 100644
--- a/.agents/skills/warehouse-source-new-version/SKILL.md
+++ b/.agents/skills/warehouse-source-new-version/SKILL.md
@@ -106,6 +106,8 @@ The opposite gap also occurs: a reference rendered from one version-blind OpenAP
- When a versioned source sends the pin on any vendor call — discovery _or_ sync (a static endpoint catalog doesn't consume it at discovery, but `get_rows` still sends the version header) — add the vendor's version-rejection error signature (e.g. `406`/`410`) to `get_non_retryable_errors`, otherwise a retired pin turns the retry cadence into a permanent error loop with no user-facing surface.
- A vendor that falls forward on a retired pin — serving the oldest accessible version instead of rejecting the request — has no rejection signature to add. Its sunset still needs the repin migration: the pin silently stops being honored, with no failed sync to surface it.
- A version bump can change the auth scheme, not just the wire format. Then the source config needs both credential shapes as optional fields, auth construction dispatches on the resolved version, and `validate_credentials` enforces the pair that version needs — form-level `required` can't express "depends on the pin".
+- When the new auth scheme is OAuth client credentials, build the sync auth from the framework's `oauth2` auth config, which re-mints an expired token mid-sync. Vendor tokens can live only minutes, so a token minted once per sync expires during a long one.
+- When the docs say a missing version header resolves to "latest" but print no accepted header value anywhere, do not guess one: a rejected guess fails every request on the new default. Send no header and flag the unpinned drift in the PR for a reviewer to resolve.
- A new version can page a horizon the old one returned whole (a fixed record cap plus `next`/`prev` links). For a snapshot-polling source, keep one request per sync rather than following the links — vendors bill each page — and state the resulting horizon in each table's description, since it can be shorter than the old version's.
- A version that drops the sort parameters the old request path used to order rows by the incremental field (for example a fixed newest-first order) breaks the per-batch watermark checkpoint that `sort_mode="asc"` implies. Report `sort_mode="desc"` for those endpoints under the new pin, so the pipeline persists the watermark only when a sync completes, and stop sending the sort params the new version rejects.
- When the new version's list endpoint cannot filter on the table's existing incremental field (it filters only on a different timestamp, or not at all), make those tables full refresh under the new pin by returning version-specific incremental fields from `get_schemas`. Filtering on a substitute timestamp silently skips rows that change or arrive late.
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/flutterwave/flutterwave.py b/products/warehouse_sources/backend/temporal/data_imports/sources/flutterwave/flutterwave.py
index 4670454464b3..7ec63a6a6a70 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/flutterwave/flutterwave.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/flutterwave/flutterwave.py
@@ -10,18 +10,34 @@ from products.warehouse_sources.backend.temporal.data_imports.sources.common.res
rest_api_resource,
)
from products.warehouse_sources.backend.temporal.data_imports.sources.common.rest_source.paginators import (
+ JSONResponseCursorPaginator,
PageNumberPaginator,
)
from products.warehouse_sources.backend.temporal.data_imports.sources.common.rest_source.typing import (
BearerTokenAuthConfig,
+ OAuth2AuthConfig,
ResponseAction,
)
from products.warehouse_sources.backend.temporal.data_imports.sources.common.resumable import ResumableSourceManager
from products.warehouse_sources.backend.temporal.data_imports.sources.common.source_helpers import validate_via_probe
from products.warehouse_sources.backend.temporal.data_imports.sources.common.typings import SourceResponse
-from products.warehouse_sources.backend.temporal.data_imports.sources.flutterwave.settings import FLUTTERWAVE_ENDPOINTS
+from products.warehouse_sources.backend.temporal.data_imports.sources.flutterwave.settings import (
+ FLUTTERWAVE_API_V4,
+ FLUTTERWAVE_ENDPOINTS,
+ FLUTTERWAVE_V4_ENDPOINTS,
+ FlutterwaveV4EndpointConfig,
+)
FLUTTERWAVE_API_HOST = "https://api.flutterwave.com"
+# v4 is served from its own production host with no version path segment.
+FLUTTERWAVE_V4_API_HOST = "https://f4bexperience.flutterwave.com"
+FLUTTERWAVE_V4_TOKEN_URL = "https://idp.flutterwave.com/realms/flutterwave/protocol/openid-connect/token"
+
+MISSING_V3_CREDENTIALS_ERROR = "Flutterwave API v3 needs a secret key"
+MISSING_V4_CREDENTIALS_ERROR = "Flutterwave API v4 needs a client ID and client secret"
+NOT_ON_V4_ERROR = "This Flutterwave table is not available on API v4"
+
+VALIDATE_TIMEOUT = 10
# Floor of the mandatory date window on /transactions. Flutterwave has no merchant records that
# predate the platform, so this pulls the full history on every sync without having to guess when the
@@ -44,17 +60,58 @@ _NO_RECORDS_RESPONSE_ACTIONS: list[ResponseAction] = [
]
[email protected](frozen=False)
class FlutterwaveResumeConfig:
# 1-based page number to resume pagination from. 1 means "start from the beginning".
next_page: int = 1
+ # Opaque `next` cursor for the v4 cursor-paginated endpoints. A separate field so a page number
+ # saved by a page-numbered endpoint is never sent as a cursor, and the reverse.
+ next_cursor: Optional[str] = None
+
+
+class FlutterwaveCursorPaginator(JSONResponseCursorPaginator):
+ def __init__(self) -> None:
+ super().__init__(cursor_path="data.cursor.next", cursor_param="next", raise_on_repeated_cursor=True)
+
+ def update_state(self, response: Any, data: Optional[list[Any]] = None) -> None:
+ # v4 reports `has_more_items` next to the cursor. Check it first, so a last page that
+ # repeats or still carries a cursor ends the list instead of tripping the repeat guard.
+ try:
+ has_more = response.json()["data"]["cursor"].get("has_more_items")
+ except Exception:
+ has_more = None
+ if has_more is False:
+ self._has_next_page = False
+ return
+ super().update_state(response, data)
def base_url(api_version: str) -> str:
+ if api_version == FLUTTERWAVE_API_V4:
+ return FLUTTERWAVE_V4_API_HOST
return f"{FLUTTERWAVE_API_HOST}/{api_version}"
-def _auth_config(secret_key: str) -> BearerTokenAuthConfig:
+def _secret_values(secret_key: Optional[str], client_secret: Optional[str]) -> tuple[str, ...]:
+ return tuple(value for value in (secret_key, client_secret) if value)
+
+
+def _auth_config(
+ api_version: str, secret_key: Optional[str], client_id: Optional[str], client_secret: Optional[str]
+) -> BearerTokenAuthConfig | OAuth2AuthConfig:
+ if api_version == FLUTTERWAVE_API_V4:
+ if not client_id or not client_secret:
+ raise ValueError(MISSING_V4_CREDENTIALS_ERROR)
+ # v4 tokens live for ten minutes; the framework's OAuth2 auth re-mints them during a sync.
+ return {
+ "type": "oauth2",
+ "token_url": FLUTTERWAVE_V4_TOKEN_URL,
+ "client_id": client_id,
+ "client_secret": client_secret,
+ "grant_type": "client_credentials",
+ }
+ if not secret_key:
+ raise ValueError(MISSING_V3_CREDENTIALS_ERROR)
return {"type": "bearer", "token": secret_key}
@@ -62,7 +119,56 @@ def _window_end() -> str:
return (datetime.now(UTC).date() + timedelta(days=WINDOW_END_PADDING_DAYS)).isoformat()
-def validate_credentials(secret_key: str, api_version: str) -> tuple[bool, str | None]:
+def _mint_v4_access_token(client_id: str, client_secret: str) -> Optional[str]:
+ # capture=False keeps the token response out of HTTP samples; allow_redirects=False so a 3xx
+ # cannot send the client secret to another host.
+ session = make_tracked_session(redact_values=(client_secret,), capture=False, allow_redirects=False)
+ response = session.post(
+ FLUTTERWAVE_V4_TOKEN_URL,
+ data={"client_id": client_id, "client_secret": client_secret, "grant_type": "client_credentials"},
+ timeout=VALIDATE_TIMEOUT,
+ )
+ if response.status_code != 200:
+ return None
+ token = response.json().get("access_token")
+ return token if isinstance(token, str) and token else None
+
+
+def _validate_v4_credentials(client_id: Optional[str], client_secret: Optional[str]) -> tuple[bool, str | None]:
+ if not client_id or not client_secret:
+ return False, "Enter your Flutterwave v4 client ID and client secret."
+ invalid = "Invalid Flutterwave client ID or client secret. Check your v4 API keys in your Flutterwave dashboard and try again."
+ try:
+ token = _mint_v4_access_token(client_id, client_secret)
+ except Exception:
+ return False, "Could not reach the Flutterwave API. Try again in a few minutes."
+ if token is None:
+ return False, invalid
+ # /settlements needs no required params, so it confirms the token can read account data.
+ ok, status = validate_via_probe(
+ lambda: make_tracked_session(redact_values=(client_secret, token), capture=False),
+ f"{FLUTTERWAVE_V4_API_HOST}/settlements",
+ headers={"Authorization": f"Bearer {token}", "Accept": "application/json"},
+ )
+ # The token mint already proved the credentials, so a 403 only means these keys cannot read
+ # settlements. That must not block connecting the tables they can read.
+ if ok or status == 403:
+ return True, None
+ if status == 401:
+ return False, invalid
+ return False, "Could not reach the Flutterwave API. Try again in a few minutes."
+
+
+def validate_credentials(
+ secret_key: Optional[str],
+ api_version: str,
+ client_id: Optional[str] = None,
+ client_secret: Optional[str] = None,
+) -> tuple[bool, str | None]:
+ if api_version == FLUTTERWAVE_API_V4:
+ return _validate_v4_credentials(client_id, client_secret)
+ if not secret_key:
+ return False, "Enter your Flutterwave secret key."
# /subaccounts is the cheapest authenticated probe: no required params, a small body, and it only
# needs the account's secret key. Its response also carries subaccount bank details, so keep it
# out of the HTTP diagnostic sample store (capture=False).
@@ -82,16 +188,7 @@ def validate_credentials(secret_key: str, api_version: str) -> tuple[bool, str |
return False, "Could not reach the Flutterwave API. Try again in a few minutes."
-def get_rows(
- secret_key: str,
- endpoint: str,
- team_id: int,
- job_id: str,
- api_version: str,
- resumable_source_manager: ResumableSourceManager[FlutterwaveResumeConfig],
- should_use_incremental_field: bool = False,
- db_incremental_field_last_value: Any = None,
-) -> Iterator[list[dict[str, Any]]]:
+def _v3_endpoint_config(endpoint: str) -> Endpoint:
config = FLUTTERWAVE_ENDPOINTS[endpoint]
params: dict[str, Any] = {}
@@ -111,28 +208,87 @@ def get_rows(
"paginator": PageNumberPaginator(base_page=1, total_path="meta.page_info.total_pages"),
"response_actions": _NO_RECORDS_RESPONSE_ACTIONS,
}
+ return endpoint_config
+
+
+def _v4_endpoint_config(config: FlutterwaveV4EndpointConfig) -> Endpoint:
+ params: dict[str, Any] = {}
+ if config.page_size is not None:
+ params["size"] = config.page_size
+
+ if config.cursor_data_key is not None:
+ return {
+ "path": config.path,
+ "params": params,
+ "data_selector": f"data.{config.cursor_data_key}",
+ "paginator": FlutterwaveCursorPaginator(),
+ }
+ # v4 has no required date window and documents its empty results as an empty `data` array, so
+ # neither v3 workaround applies.
+ return {
+ "path": config.path,
+ "params": params,
+ "data_selector": "data",
+ "paginator": PageNumberPaginator(base_page=1, total_path="meta.page_info.total_pages"),
+ }
+
+
+def _v4_config(endpoint: str) -> FlutterwaveV4EndpointConfig:
+ config = FLUTTERWAVE_V4_ENDPOINTS.get(endpoint)
+ if config is None:
+ raise ValueError(f"{NOT_ON_V4_ERROR}: {endpoint}")
+ return config
+
+
+def get_rows(
+ secret_key: Optional[str],
+ endpoint: str,
+ team_id: int,
+ job_id: str,
+ api_version: str,
+ resumable_source_manager: ResumableSourceManager[FlutterwaveResumeConfig],
+ should_use_incremental_field: bool = False,
+ db_incremental_field_last_value: Any = None,
+ client_id: Optional[str] = None,
+ client_secret: Optional[str] = None,
+) -> Iterator[list[dict[str, Any]]]:
+ is_cursor_endpoint = False
+ if api_version == FLUTTERWAVE_API_V4:
+ v4_config = _v4_config(endpoint)
+ endpoint_config = _v4_endpoint_config(v4_config)
+ is_cursor_endpoint = v4_config.cursor_data_key is not None
+ else:
+ endpoint_config = _v3_endpoint_config(endpoint)
rest_config: RESTAPIConfig = {
"client": {
"base_url": base_url(api_version),
"headers": {"Accept": "application/json"},
- "auth": _auth_config(secret_key),
+ "auth": _auth_config(api_version, secret_key, client_id, client_secret),
# These bodies carry bank account numbers and transaction metadata, so keep them out of
# the HTTP diagnostic sample store (requests are still metered and logged).
- "session": make_tracked_session(redact_values=(secret_key,), capture=False),
+ "session": make_tracked_session(redact_values=_secret_values(secret_key, client_secret), capture=False),
},
"resources": [{"name": endpoint, "endpoint": endpoint_config}],
}
resume = resumable_source_manager.load_state() if resumable_source_manager.can_resume() else None
initial_paginator_state: Optional[dict[str, Any]] = None
- if resume is not None and resume.next_page > 1:
- initial_paginator_state = {"page": resume.next_page}
+ if resume is not None:
+ if is_cursor_endpoint:
+ if resume.next_cursor:
+ initial_paginator_state = {"cursor": resume.next_cursor}
+ elif resume.next_page > 1:
+ initial_paginator_state = {"page": resume.next_page}
def save_checkpoint(state: Optional[dict[str, Any]]) -> None:
# The framework calls this AFTER a page is yielded and only while a next page remains, so a
# crash re-yields the next page rather than skipping it (the merge dedupes on primary key).
- if state and state.get("page") is not None:
+ if not state:
+ return
+ if state.get("cursor") is not None:
+ resumable_source_manager.save_state(FlutterwaveResumeConfig(next_cursor=str(state["cursor"])))
+ elif state.get("page") is not None:
resumable_source_manager.save_state(FlutterwaveResumeConfig(next_page=int(state["page"])))
yield from rest_api_resource(
@@ -146,7 +302,7 @@ def get_rows(
def flutterwave_source(
- secret_key: str,
+ secret_key: Optional[str],
endpoint: str,
team_id: int,
job_id: str,
@@ -154,8 +310,16 @@ def flutterwave_source(
resumable_source_manager: ResumableSourceManager[FlutterwaveResumeConfig],
should_use_incremental_field: bool = False,
db_incremental_field_last_value: Optional[Any] = None,
+ client_id: Optional[str] = None,
+ client_secret: Optional[str] = None,
) -> SourceResponse:
- config = FLUTTERWAVE_ENDPOINTS[endpoint]
+ if api_version == FLUTTERWAVE_API_V4:
+ primary_keys = ["id"]
+ partition_key = _v4_config(endpoint).partition_key
+ else:
+ v3_config = FLUTTERWAVE_ENDPOINTS[endpoint]
+ primary_keys = v3_config.primary_keys
+ partition_key = v3_config.partition_key
return SourceResponse(
name=endpoint,
@@ -168,11 +332,13 @@ def flutterwave_source(
resumable_source_manager=resumable_source_manager,
should_use_incremental_field=should_use_incremental_field,
db_incremental_field_last_value=db_incremental_field_last_value,
+ client_id=client_id,
+ client_secret=client_secret,
),
- primary_keys=config.primary_keys,
+ primary_keys=primary_keys,
partition_count=1,
partition_size=1,
- partition_mode="datetime" if config.partition_key else None,
- partition_format="month" if config.partition_key else None,
- partition_keys=[config.partition_key] if config.partition_key else None,
+ partition_mode="datetime" if partition_key else None,
+ partition_format="month" if partition_key else None,
+ partition_keys=[partition_key] if partition_key else None,
)
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/flutterwave/settings.py b/products/warehouse_sources/backend/temporal/data_imports/sources/flutterwave/settings.py
index 8410f533dc76..e33eacf87562 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/flutterwave/settings.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/flutterwave/settings.py
@@ -3,13 +3,17 @@ from typing import Optional
from products.warehouse_sources.backend.types import IncrementalField
+FLUTTERWAVE_API_V3 = "v3"
+FLUTTERWAVE_API_V4 = "v4"
+
# Flutterwave v3's only server-side timestamp filter is the `from`/`to` window over each record's
# `created_at`, and the API exposes no `updated_at` cursor. Transactions, settlements, refunds,
# transfers, chargebacks, and payment plans all keep mutating after they are created (statuses flip,
# refunds and chargebacks resolve, plans get cancelled), so a `created_at` watermark would advance
# past those rows and never reread the later lifecycle change, leaving the warehouse permanently
# stale. Until Flutterwave exposes an update cursor, every endpoint here syncs as full refresh so the
-# merge always sees each record's current state.
+# merge always sees each record's current state. v4 keeps the same `created_at`-style window (now
+# `created_datetime`) and adds no update cursor, so the same holds there.
@dataclass
@@ -51,6 +55,35 @@ FLUTTERWAVE_ENDPOINTS: dict[str, FlutterwaveEndpointConfig] = {
ENDPOINTS = tuple(FLUTTERWAVE_ENDPOINTS.keys())
-# No endpoint syncs incrementally (see the module comment above), so the schema builder receives an
+
+@dataclass(frozen=True)
+class FlutterwaveV4EndpointConfig:
+ path: str
+ partition_key: Optional[str] = "created_datetime"
+ # v4 lists transfers and recipients behind a `next` cursor and nests the rows under this key of
+ # `data`; every other list is page-numbered with the rows directly in `data`.
+ cursor_data_key: Optional[str] = None
+ # Sent only where the reference allows it for both the `size` parameter and the response array.
+ page_size: Optional[int] = None
+
+
+# Table names stay identical to v3 so a table keeps its name across versions; only the vendor path
+# differs. v4 has no payment plan, subscription, or subaccount endpoints, so those tables exist only
+# on v3.
+FLUTTERWAVE_V4_ENDPOINTS: dict[str, FlutterwaveV4EndpointConfig] = {
+ "transactions": FlutterwaveV4EndpointConfig(path="/charges"),
+ "settlements": FlutterwaveV4EndpointConfig(path="/settlements"),
+ "refunds": FlutterwaveV4EndpointConfig(path="/refunds"),
+ "transfers": FlutterwaveV4EndpointConfig(path="/transfers", cursor_data_key="transfers", page_size=50),
+ "chargebacks": FlutterwaveV4EndpointConfig(path="/chargebacks"),
+ # A v4 recipient carries no creation timestamp, so the table is not partitioned.
+ "beneficiaries": FlutterwaveV4EndpointConfig(
+ path="/transfers/recipients", partition_key=None, cursor_data_key="recipients"
+ ),
+}
+
+V4_ENDPOINTS = tuple(FLUTTERWAVE_V4_ENDPOINTS.keys())
+
+# No endpoint syncs incrementally on either version (see the module comment above), so the schema builder receives an
# empty map and advertises every table as full-refresh.
INCREMENTAL_FIELDS: dict[str, list[IncrementalField]] = {}
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/flutterwave/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/flutterwave/source.py
index 570493bf6cde..470e053414e1 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/flutterwave/source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/flutterwave/source.py
@@ -13,6 +13,9 @@ from products.warehouse_sources.backend.temporal.data_imports.sources.common.can
CanonicalDescriptions,
)
from products.warehouse_sources.backend.temporal.data_imports.sources.common.registry import SourceRegistry
+from products.warehouse_sources.backend.temporal.data_imports.sources.common.rest_source.auth import (
+ OAUTH2_PERMANENT_ERROR_MARKER,
+)
from products.warehouse_sources.backend.temporal.data_imports.sources.common.resumable import ResumableSourceManager
from products.warehouse_sources.backend.temporal.data_imports.sources.common.schema import (
SourceSchema,
@@ -20,13 +23,19 @@ from products.warehouse_sources.backend.temporal.data_imports.sources.common.sch
)
from products.warehouse_sources.backend.temporal.data_imports.sources.common.typings import SourceInputs, SourceResponse
from products.warehouse_sources.backend.temporal.data_imports.sources.flutterwave.flutterwave import (
+ MISSING_V3_CREDENTIALS_ERROR,
+ MISSING_V4_CREDENTIALS_ERROR,
+ NOT_ON_V4_ERROR,
FlutterwaveResumeConfig,
flutterwave_source,
validate_credentials as validate_flutterwave_credentials,
)
from products.warehouse_sources.backend.temporal.data_imports.sources.flutterwave.settings import (
ENDPOINTS,
+ FLUTTERWAVE_API_V3,
+ FLUTTERWAVE_API_V4,
INCREMENTAL_FIELDS,
+ V4_ENDPOINTS,
)
from products.warehouse_sources.backend.temporal.data_imports.sources.generated_configs.flutterwave import (
FlutterwaveSourceConfig,
@@ -50,12 +59,12 @@ class FlutterwaveSource(ResumableSource[FlutterwaveSourceConfig, FlutterwaveResu
rubygems=("flutterwave_sdk",),
)
- # v3 is Flutterwave's generally available API and the version every request below calls (the
- # `/v3` base-URL segment). v4 exists but is still a public beta on a separate host with a
- # different OAuth flow, so it is not what a new source should land customers on.
- supported_versions = ("v3",)
- default_version = "v3"
- api_docs_url = "https://developer.flutterwave.com/docs/versioning"
+ # v3 authenticates with a secret key against api.flutterwave.com/v3. v4 runs on its own host with
+ # OAuth client credentials, renames some collections, and drops others, so each pin keeps its
+ # own credentials, paths, and table set.
+ supported_versions = (FLUTTERWAVE_API_V3, FLUTTERWAVE_API_V4)
+ default_version = FLUTTERWAVE_API_V4
+ api_docs_url = "https://developer.flutterwave.com/v4.0.0/docs/versioning"
lists_tables_without_credentials = True # static endpoint catalog — safe for public docs
@@ -70,19 +79,38 @@ class FlutterwaveSource(ResumableSource[FlutterwaveSourceConfig, FlutterwaveResu
category=DataWarehouseSourceCategory.PAYMENTS___BILLING,
label="Flutterwave",
releaseStatus=ReleaseStatus.ALPHA,
- caption="""Enter your Flutterwave secret key to sync your payments data into the PostHog Data warehouse.
+ caption="""Enter your Flutterwave v4 client ID and client secret to sync your payments data into the PostHog Data warehouse.
-You can find your secret key under Settings > API in the [Flutterwave dashboard](https://app.flutterwave.com/dashboard/settings/apis). Test keys only return sandbox records, so use your live secret key to sync live data.""",
+You can find them under Settings > API Keys in the [Flutterwave dashboard](https://app.flutterwave.com/dashboard/settings/apis). If the page shows a public key, secret key, and encryption key, you are on v3 keys: click **Switch to v4 live API keys** to see your client ID and client secret. Sources connected before v4 support keep using their v3 secret key.""",
iconPath="/static/services/flutterwave.png",
docsUrl="https://posthog.com/docs/cdp/sources/flutterwave",
fields=cast(
list[FieldType],
[
+ # Every field is optional because the pair a source needs depends on its API
+ # version pin; validate_credentials enforces it.
+ SourceFieldInputConfig(
+ name="client_id",
+ label="Client ID",
+ type=SourceFieldInputConfigType.TEXT,
+ required=False,
+ placeholder="",
+ secret=False,
+ ),
+ SourceFieldInputConfig(
+ name="client_secret",
+ label="Client secret",
+ type=SourceFieldInputConfigType.PASSWORD,
+ required=False,
+ placeholder="",
+ secret=True,
+ ),
SourceFieldInputConfig(
name="secret_key",
- label="Secret key",
+ label="Secret key (v3 only)",
+ caption="Only needed for sources connected with v3 keys.",
type=SourceFieldInputConfigType.PASSWORD,
- required=True,
+ required=False,
placeholder="FLWSECK-...",
secret=True,
),
@@ -101,6 +129,14 @@ You can find your secret key under Settings > API in the [Flutterwave dashboard]
return {
"401 Client Error: Unauthorized for url: https://api.flutterwave.com": "Your Flutterwave secret key is invalid or has been rotated. Copy the current key from your Flutterwave dashboard, then reconnect.",
"403 Client Error: Forbidden for url: https://api.flutterwave.com": "Your Flutterwave secret key does not have access to this data. Check the key's permissions in your Flutterwave dashboard, then reconnect.",
+ "401 Client Error: Unauthorized for url: https://f4bexperience.flutterwave.com": "Flutterwave rejected your client ID and client secret. Copy your current v4 API keys from your Flutterwave dashboard, then reconnect.",
+ "403 Client Error: Forbidden for url: https://f4bexperience.flutterwave.com": "Your Flutterwave v4 API keys do not have access to this data. Check the keys' permissions in your Flutterwave dashboard, then reconnect.",
+ # The framework's OAuth2 auth stamps this marker on token failures retrying can't fix
+ # (invalid_client and other non-429 4xx from the v4 token endpoint).
+ OAUTH2_PERMANENT_ERROR_MARKER: "Flutterwave rejected your client ID and client secret. Copy your current v4 API keys from your Flutterwave dashboard, then reconnect.",
+ MISSING_V3_CREDENTIALS_ERROR: "This source uses Flutterwave API v3, which needs a secret key. Add your v3 secret key to the source, then reconnect.",
+ MISSING_V4_CREDENTIALS_ERROR: "This source uses Flutterwave API v4, which needs a client ID and client secret. Add your v4 API keys to the source, then reconnect.",
+ NOT_ON_V4_ERROR: "Flutterwave API v4 has no endpoint for this table. Switch the table back to API v3 to keep syncing it.",
}
def get_schemas(
@@ -112,7 +148,8 @@ You can find your secret key under Settings > API in the [Flutterwave dashboard]
force_refresh: bool = False,
api_version: str | None = None,
) -> list[SourceSchema]:
- return build_endpoint_schemas(ENDPOINTS, INCREMENTAL_FIELDS, names)
+ endpoints = V4_ENDPOINTS if self.resolve_api_version(api_version) == FLUTTERWAVE_API_V4 else ENDPOINTS
+ return build_endpoint_schemas(endpoints, INCREMENTAL_FIELDS, names)
def validate_credentials(
self,
@@ -121,7 +158,12 @@ You can find your secret key under Settings > API in the [Flutterwave dashboard]
schema_name: Optional[str] = None,
api_version: str | None = None,
) -> tuple[bool, str | None]:
- return validate_flutterwave_credentials(config.secret_key, self.resolve_api_version(api_version))
+ return validate_flutterwave_credentials(
+ config.secret_key,
+ self.resolve_api_version(api_version),
+ client_id=config.client_id,
+ client_secret=config.client_secret,
+ )
def get_resumable_source_manager(self, inputs: SourceInputs) -> ResumableSourceManager[FlutterwaveResumeConfig]:
return ResumableSourceManager[FlutterwaveResumeConfig](inputs, FlutterwaveResumeConfig)
@@ -134,6 +176,8 @@ You can find your secret key under Settings > API in the [Flutterwave dashboard]
) -> SourceResponse:
return flutterwave_source(
secret_key=config.secret_key,
+ client_id=config.client_id,
+ client_secret=config.client_secret,
endpoint=inputs.schema_name,
team_id=inputs.team_id,
job_id=inputs.job_id,
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/flutterwave/tests/test_flutterwave.py b/products/warehouse_sources/backend/temporal/data_imports/sources/flutterwave/tests/test_flutterwave.py
index 4bebc2993525..5acae1737662 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/flutterwave/tests/test_flutterwave.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/flutterwave/tests/test_flutterwave.py
@@ -8,23 +8,56 @@ from products.warehouse_sources.backend.temporal.data_imports.sources.common.res
RESTClientRetryableError,
)
from products.warehouse_sources.backend.temporal.data_imports.sources.common.testing import (
+ DriveResult,
ScriptedResponse,
SourceDriver,
always,
+ route,
scripted_network,
)
from products.warehouse_sources.backend.temporal.data_imports.sources.flutterwave.flutterwave import (
+ NOT_ON_V4_ERROR,
FlutterwaveResumeConfig,
validate_credentials,
)
+from products.warehouse_sources.backend.temporal.data_imports.sources.flutterwave.settings import (
+ FLUTTERWAVE_API_V3,
+ FLUTTERWAVE_API_V4,
+)
from products.warehouse_sources.backend.temporal.data_imports.sources.flutterwave.source import FlutterwaveSource
from products.warehouse_sources.backend.temporal.data_imports.sources.generated_configs.flutterwave import (
FlutterwaveSourceConfig,
)
+TOKEN_PATH = "/realms/flutterwave/protocol/openid-connect/token"
+
def _driver() -> SourceDriver:
- return SourceDriver(FlutterwaveSource(), FlutterwaveSourceConfig(secret_key="FLWSECK-test"))
+ return SourceDriver(
+ FlutterwaveSource(),
+ FlutterwaveSourceConfig(secret_key="FLWSECK-test", client_id="client-test", client_secret="secret-test"),
+ )
+
+
+def _run_v3(endpoint: str, script: Any, **inputs: Any) -> DriveResult:
+ return _driver().run(endpoint, script, api_version=FLUTTERWAVE_API_V3, **inputs)
+
+
+def _token() -> ScriptedResponse:
+ return ScriptedResponse(json={"access_token": "minted-token", "expires_in": 600, "token_type": "Bearer"})
+
+
+def _cursor_page(key: str, rows: list[dict[str, Any]], next_cursor: str | None, has_more: bool) -> ScriptedResponse:
+ return ScriptedResponse(
+ json={
+ "status": "success",
+ "message": "fetched",
+ "data": {
+ "cursor": {"next": next_cursor, "limit": 50, "total": 3, "has_more_items": has_more},
+ key: rows,
+ },
+ }
+ )
def _page(rows: list[dict[str, Any]], total_pages: int = 1) -> ScriptedResponse:
@@ -40,7 +73,7 @@ def _page(rows: list[dict[str, Any]], total_pages: int = 1) -> ScriptedResponse:
class TestPagination:
def test_resumes_from_saved_page(self) -> None:
- result = _driver().run(
+ result = _run_v3(
"subaccounts", [_page([{"id": 7}], total_pages=4)], resume_state=FlutterwaveResumeConfig(next_page=4)
)
@@ -49,7 +82,7 @@ class TestPagination:
assert result.params("page") == ["4"]
def test_saves_page_after_yielding_and_only_while_pages_remain(self) -> None:
- result = _driver().run(
+ result = _run_v3(
"subaccounts",
[_page([{"id": 1}], total_pages=2), _page([{"id": 2}], total_pages=2)],
)
@@ -73,7 +106,7 @@ class TestDateWindow:
)
def test_optional_window_endpoints_send_no_window_on_full_refresh(self, endpoint: str) -> None:
# A full refresh must pull the whole history; a stray `from` would silently truncate it.
- result = _driver().run(
+ result = _run_v3(
endpoint,
[_page([{"id": 1}])],
should_use_incremental_field=False,
@@ -93,7 +126,7 @@ class TestDateWindow:
)
def test_endpoints_without_a_window_never_send_one(self, endpoint: str) -> None:
# These endpoints do not accept `from`/`to`; sending them risks 4xxing the whole run.
- result = _driver().run(endpoint, [_page([{"id": 1}])], should_use_incremental_field=False)
+ result = _run_v3(endpoint, [_page([{"id": 1}])], should_use_incremental_field=False)
assert result.raised is None
assert result.requests[0].param("from") is None
@@ -110,14 +143,14 @@ class TestNoRecordsResponses:
def test_empty_range_400_reads_as_an_empty_table(self, _name: str, body: dict[str, Any]) -> None:
# v3 answers "no records in this range" with a 400 on some list endpoints; a merchant with an
# empty table must sync zero rows rather than fail the job.
- result = _driver().run("settlements", [ScriptedResponse(status=400, json=body)])
+ result = _run_v3("settlements", [ScriptedResponse(status=400, json=body)])
assert result.raised is None
assert result.rows == []
assert len(result.requests) == 1
def test_genuine_parameter_error_still_raises(self) -> None:
- result = _driver().run(
+ result = _run_v3(
"settlements",
[
ScriptedResponse(
@@ -135,7 +168,7 @@ class TestErrorHandling:
def test_credential_errors_surface_the_matchable_message(self, _name: str, status: int, reason: str) -> None:
# get_non_retryable_errors matches on this exact status text plus host, so it must not be
# swallowed or retried.
- result = _driver().run("transactions", [ScriptedResponse(status=status, json={"status": "error"})])
+ result = _run_v3("transactions", [ScriptedResponse(status=status, json={"status": "error"})])
assert isinstance(result.raised, requests.HTTPError)
assert f"{status} Client Error" in str(result.raised)
@@ -145,14 +178,14 @@ class TestErrorHandling:
@parameterized.expand([("rate_limited", 429, "Too Many Requests"), ("server_error", 503, "Service Unavailable")])
def test_transient_statuses_are_retried_by_the_transport(self, _name: str, status: int, _reason: str) -> None:
- result = _driver().run("transactions", [ScriptedResponse(status=status, json={}), _page([{"id": 1}])])
+ result = _run_v3("transactions", [ScriptedResponse(status=status, json={}), _page([{"id": 1}])])
assert result.raised is None
assert [row["id"] for row in result.rows] == [1]
assert len(result.requests) == 2
def test_persistent_rate_limit_raises_retryable(self) -> None:
- result = _driver().run("transactions", always(ScriptedResponse(status=429, json={})))
+ result = _run_v3("transactions", always(ScriptedResponse(status=429, json={})))
assert isinstance(result.raised, RESTClientRetryableError)
@@ -172,7 +205,7 @@ class TestSourceResponseMetadata:
]
)
def test_every_endpoint_partitions_on_created_at(self, endpoint: str) -> None:
- result = _driver().run(endpoint, [_page([])])
+ result = _run_v3(endpoint, [_page([])])
assert result.raised is None
assert result.response is not None
@@ -184,6 +217,26 @@ class TestSourceResponseMetadata:
assert result.response.partition_mode == "datetime"
assert result.response.partition_keys == ["created_at"]
+ @parameterized.expand(
+ [
+ ("transactions", "/charges", ["created_datetime"]),
+ ("settlements", "/settlements", ["created_datetime"]),
+ ("refunds", "/refunds", ["created_datetime"]),
+ ("chargebacks", "/chargebacks", ["created_datetime"]),
+ ("transfers", "/transfers", ["created_datetime"]),
+ ("beneficiaries", "/transfers/recipients", None),
+ ]
+ )
+ def test_v4_endpoints_partition_on_their_v4_timestamp(
+ self, endpoint: str, path: str, partition_keys: list[str] | None
+ ) -> None:
+ empty = _cursor_page(endpoint, [], None, False) if path.startswith("/transfers") else _page([])
+ result = _driver().run(endpoint, route({TOKEN_PATH: [_token()], path: [empty]}), api_version=FLUTTERWAVE_API_V4)
+
+ assert result.response is not None
+ assert result.response.primary_keys == ["id"]
+ assert result.response.partition_keys == partition_keys
+
class TestValidateCredentials:
@parameterized.expand(
@@ -203,3 +256,126 @@ class TestValidateCredentials:
assert valid is expected
assert (message is None) is expected
assert {request.path for request in network.requests_log} == {"/v3/subaccounts"}
+
+ @parameterized.expand(
+ [
+ ("ok", 200, 200, True),
+ ("rejected_client", 401, None, False),
+ ("token_cannot_read", 200, 401, False),
+ ("token_lacks_settlements_access", 200, 403, True),
+ ("server_error", 200, 500, False),
+ ]
+ )
+ def test_v4_mints_a_token_then_probes_with_it(
+ self, _name: str, token_status: int, probe_status: int | None, expected: bool
+ ) -> None:
+ token = (
+ _token() if token_status == 200 else ScriptedResponse(status=token_status, json={"error": "invalid_client"})
+ )
+ script: dict[str, list[ScriptedResponse]] = {TOKEN_PATH: [token]}
+ if probe_status is not None:
+ script["/settlements"] = [ScriptedResponse(status=probe_status, json={"status": "success", "data": []})]
+
+ with scripted_network(route(script)) as network:
+ valid, message = validate_credentials(None, FLUTTERWAVE_API_V4, "client-test", "secret-test")
+
+ assert valid is expected
+ assert (message is None) is expected
+ token_request = network.requests_log[0]
+ assert token_request.origin == "https://idp.flutterwave.com"
+ assert b"client_id=client-test" in (token_request.body or b"")
+ if probe_status is not None:
+ probe = network.requests_log[1]
+ assert probe.origin == "https://f4bexperience.flutterwave.com"
+ assert probe.headers["authorization"] == "Bearer minted-token"
+
+ @parameterized.expand(
+ [
+ ("v3_without_secret_key", FLUTTERWAVE_API_V3, None, "client-test", "secret-test"),
+ ("v4_without_client_secret", FLUTTERWAVE_API_V4, "FLWSECK-test", "client-test", None),
+ ]
+ )
+ def test_missing_credentials_for_the_pin_fail_without_a_request(
+ self, _name: str, api_version: str, secret_key: str | None, client_id: str | None, client_secret: str | None
+ ) -> None:
+ with scripted_network(route({})) as network:
+ valid, message = validate_credentials(secret_key, api_version, client_id, client_secret)
+
+ assert valid is False
+ assert message
+ assert network.requests_log == []
+
+
+class TestV4:
+ def test_cursor_endpoint_follows_next_until_has_more_is_false(self) -> None:
+ result = _driver().run(
+ "transfers",
+ route(
+ {
+ TOKEN_PATH: [_token()],
+ "/transfers": [
+ _cursor_page("transfers", [{"id": "trf_1"}], "cursor-2", True),
+ # The last page repeats the cursor; has_more_items ends the list before the
+ # repeat guard sees it.
+ _cursor_page("transfers", [{"id": "trf_2"}], "cursor-2", False),
+ ],
+ }
+ ),
+ api_version=FLUTTERWAVE_API_V4,
+ )
+
+ assert result.raised is None
+ assert [row["id"] for row in result.rows] == ["trf_1", "trf_2"]
+ listed = [request for request in result.requests if request.path == "/transfers"]
+ assert [request.param("next") for request in listed] == [None, "cursor-2"]
+ assert {request.param("size") for request in listed} == {"50"}
+ assert {request.headers["authorization"] for request in listed} == {"Bearer minted-token"}
+ assert result.saved_states == [FlutterwaveResumeConfig(next_cursor="cursor-2")]
+
+ def test_cursor_endpoint_resumes_from_saved_cursor_not_page(self) -> None:
+ result = _driver().run(
+ "beneficiaries",
+ route(
+ {
+ TOKEN_PATH: [_token()],
+ "/transfers/recipients": [_cursor_page("recipients", [{"id": "rcp_9"}], None, False)],
+ }
+ ),
+ api_version=FLUTTERWAVE_API_V4,
+ resume_state=FlutterwaveResumeConfig(next_page=3, next_cursor="cursor-9"),
+ )
+
+ assert result.raised is None
+ listed = [request for request in result.requests if request.path == "/transfers/recipients"]
+ assert [request.param("next") for request in listed] == ["cursor-9"]
+ assert listed[0].param("page") is None
+
+ def test_page_endpoint_reads_v4_host_without_the_v3_window_or_empty_400_workaround(self) -> None:
+ result = _driver().run(
+ "transactions",
+ route(
+ {
+ TOKEN_PATH: [_token()],
+ "/charges": [
+ ScriptedResponse(
+ status=400,
+ json={"status": "failed", "error": {"type": "REQUEST_NOT_VALID", "message": "Not found"}},
+ )
+ ],
+ }
+ ),
+ api_version=FLUTTERWAVE_API_V4,
+ )
+
+ listed = [request for request in result.requests if request.path == "/charges"]
+ assert listed[0].origin == "https://f4bexperience.flutterwave.com"
+ assert listed[0].param("from") is None
+ assert listed[0].param("to") is None
+ assert isinstance(result.raised, requests.HTTPError)
+
+ def test_v3_only_table_under_a_v4_pin_fails_clearly(self) -> None:
+ result = _driver().run("payment_plans", route({}), api_version=FLUTTERWAVE_API_V4)
+
+ assert result.raised is not None
+ assert NOT_ON_V4_ERROR in str(result.raised)
+ assert result.requests == []
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/flutterwave/tests/test_flutterwave_source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/flutterwave/tests/test_flutterwave_source.py
index 94ccadd311d7..7c8be3a6c42a 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/flutterwave/tests/test_flutterwave_source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/flutterwave/tests/test_flutterwave_source.py
@@ -5,6 +5,11 @@ from parameterized import parameterized
from products.warehouse_sources.backend.temporal.data_imports.sources.common.testing import (
ScriptedResponse,
SourceDriver,
+ route,
+)
+from products.warehouse_sources.backend.temporal.data_imports.sources.flutterwave.settings import (
+ FLUTTERWAVE_API_V3,
+ FLUTTERWAVE_API_V4,
)
from products.warehouse_sources.backend.temporal.data_imports.sources.flutterwave.source import FlutterwaveSource
from products.warehouse_sources.backend.temporal.data_imports.sources.generated_configs.flutterwave import (
@@ -13,26 +18,45 @@ from products.warehouse_sources.backend.temporal.data_imports.sources.generated_
class TestGetSchemas:
+ @parameterized.expand([(FLUTTERWAVE_API_V3,), (FLUTTERWAVE_API_V4,)])
+ def test_every_endpoint_is_full_refresh(self, api_version: str) -> None:
+ # Flutterwave has no update cursor on either version and its records mutate after creation, so
+ # no endpoint may advertise incremental sync (a created_at watermark would strand later status
+ # changes).
+ for schema in FlutterwaveSource().get_schemas(MagicMock(), team_id=1, api_version=api_version):
+ assert schema.supports_incremental is False
+ assert schema.supports_append is False
+ assert schema.incremental_fields == []
+
@parameterized.expand(
[
- ("transactions",),
- ("settlements",),
- ("refunds",),
- ("transfers",),
- ("chargebacks",),
- ("payment_plans",),
- ("subscriptions",),
- ("subaccounts",),
- ("beneficiaries",),
+ (
+ "v3",
+ FLUTTERWAVE_API_V3,
+ {
+ "transactions",
+ "settlements",
+ "refunds",
+ "transfers",
+ "chargebacks",
+ "payment_plans",
+ "subscriptions",
+ "subaccounts",
+ "beneficiaries",
+ },
+ ),
+ (
+ "v4",
+ FLUTTERWAVE_API_V4,
+ {"transactions", "settlements", "refunds", "transfers", "chargebacks", "beneficiaries"},
+ ),
+ # An unpinned call (the creation wizard) discovers the default version's tables.
+ ("unpinned", None, {"transactions", "settlements", "refunds", "transfers", "chargebacks", "beneficiaries"}),
]
)
- def test_every_endpoint_is_full_refresh(self, endpoint: str) -> None:
- # Flutterwave v3 has no update cursor and its records mutate after creation, so no endpoint
- # may advertise incremental sync (a created_at watermark would strand later status changes).
- schemas = {s.name: s for s in FlutterwaveSource().get_schemas(MagicMock(), team_id=1)}
- assert schemas[endpoint].supports_incremental is False
- assert schemas[endpoint].supports_append is False
- assert schemas[endpoint].incremental_fields == []
+ def test_table_set_follows_the_pin(self, _name: str, api_version: str | None, expected: set[str]) -> None:
+ schemas = FlutterwaveSource().get_schemas(MagicMock(), team_id=1, api_version=api_version)
+ assert {s.name for s in schemas} == expected
class TestNonRetryableErrors:
@@ -43,6 +67,15 @@ class TestNonRetryableErrors:
"401 Client Error: Unauthorized for url: https://api.flutterwave.com/v3/transactions?page=1",
),
("forbidden", "403 Client Error: Forbidden for url: https://api.flutterwave.com/v3/settlements"),
+ (
+ "v4_unauthorized",
+ "401 Client Error: Unauthorized for url: https://f4bexperience.flutterwave.com/charges?page=1",
+ ),
+ ("v4_forbidden", "403 Client Error: Forbidden for url: https://f4bexperience.flutterwave.com/settlements"),
+ (
+ "v4_token_rejected",
+ "HTTP 401 from the OAuth2 token endpoint: invalid_client [oauth2_token_config_error]",
+ ),
]
)
def test_credential_errors_are_non_retryable(self, _name: str, observed: str) -> None:
@@ -63,15 +96,30 @@ class TestNonRetryableErrors:
class TestSourceForPipeline:
- def test_threads_credentials_endpoint_and_api_version(self) -> None:
- result = SourceDriver(FlutterwaveSource(), FlutterwaveSourceConfig(secret_key="FLWSECK-test")).run(
+ @parameterized.expand(
+ [
+ ("v3_pin", FLUTTERWAVE_API_V3, "https://api.flutterwave.com/v3/transactions", "Bearer FLWSECK-test"),
+ # An unset pin must resolve to default_version (v4), not fall through as None and break the URL.
+ ("unpinned", None, "https://f4bexperience.flutterwave.com/charges", "Bearer minted-token"),
+ ("v4_pin", FLUTTERWAVE_API_V4, "https://f4bexperience.flutterwave.com/charges", "Bearer minted-token"),
+ ]
+ )
+ def test_threads_credentials_endpoint_and_api_version(
+ self, _name: str, api_version: str | None, url: str, authorization: str
+ ) -> None:
+ empty = ScriptedResponse(json={"status": "success", "meta": {"page_info": {"total_pages": 1}}, "data": []})
+ token = ScriptedResponse(json={"access_token": "minted-token", "expires_in": 600})
+ config = FlutterwaveSourceConfig(
+ secret_key="FLWSECK-test", client_id="client-test", client_secret="secret-test"
+ )
+ result = SourceDriver(FlutterwaveSource(), config).run(
"transactions",
- [ScriptedResponse(json={"status": "success", "meta": {"page_info": {"total_pages": 1}}, "data": []})],
+ route({"/openid-connect/token": [token], "/transactions": [empty], "/charges": [empty]}),
should_use_incremental_field=False,
+ api_version=api_version,
)
assert result.raised is None
- assert result.requests[0].headers["authorization"] == "Bearer FLWSECK-test"
- assert result.requests[0].path == "/v3/transactions"
- # An unset pin must resolve to default_version, not fall through as None and break the URL.
- assert result.requests[0].url.startswith("https://api.flutterwave.com/v3/transactions")
+ data_request = result.requests[-1]
+ assert data_request.url.startswith(url)
+ assert data_request.headers["authorization"] == authorization
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/generated_configs/flutterwave.py b/products/warehouse_sources/backend/temporal/data_imports/sources/generated_configs/flutterwave.py
index 4d9a84e195ea..6325459e15d2 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/generated_configs/flutterwave.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/generated_configs/flutterwave.py
@@ -6,4 +6,6 @@ from products.warehouse_sources.backend.temporal.data_imports.sources.common imp
@config.config
class FlutterwaveSourceConfig(config.Config):
- secret_key: str
+ client_id: str | None = None
+ client_secret: str | None = None
+ secret_key: str | None = None
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/tests/test_source_catalog_invariants.py b/products/warehouse_sources/backend/temporal/data_imports/sources/tests/test_source_catalog_invariants.py
index 2a009f60f6da..eebd673a82d4 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/tests/test_source_catalog_invariants.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/tests/test_source_catalog_invariants.py
@@ -39,6 +39,7 @@ DESCRIPTIONS_NOT_IN_SCHEMAS = {
"BrowserUse",
"CheckoutCom",
"EZOfficeInventory",
+ "Flutterwave",
"Giphy",
"GoogleSearchConsole",
"Langfuse",