← ClaudeAtlas

integrate-external-serviceslisted

Use when integrating a third-party/external system — calling a vendor API (anti-corruption adapter behind your own interface, resilient HTTP with circuit breaker + retry/backoff, outbound HMAC request signing, idempotency keys), receiving inbound webhooks (raw-body capture, signature verification, idempotent fast-ack-then-enqueue, vendor→internal event mapping), or exposing a partner/public API edge (client-credentials + token introspection + scopes, API-key role guard, client→tenant mapping). NestJS/TS reference, framework-flexible. For service-to-service calls inside your own platform, see integrate-internal-services.
kennguyen887/agent-foundation · ★ 1 · Web & Frontend · score 77
Install: claude install-skill kennguyen887/agent-foundation
# Integrate external services Integrating systems you don't own — calling vendor APIs, receiving their webhooks, and exposing a partner/public edge. Examples NestJS/TS, neutral domain; vendors are "Provider A/B", "the payment gateway", "the identity provider". principle → **▸ Example** → **▸ Other stacks**. For calls between your own services (RPC, fan-out, cross-service reads), see `integrate-internal-services`. ## Core principle **An external system is untrusted and unreliable.** Wrap it behind an interface you own (so it's swappable and your domain never speaks vendor-ese), make every outbound call resilient (timeout + retry + circuit breaker), and treat every inbound call (webhook, partner request) as hostile until verified. Never let a vendor's schema, downtime, or duplicate delivery leak into your core. ## 1. Anti-corruption adapter — one interface, many providers - **Wrap each external system behind a domain interface your code owns.** Each vendor gets an impl that translates vendor schema ↔ your DTOs and vendor errors → your errors. A **factory/registry** selects the impl by provider type; callers depend on the interface, never on a vendor SDK. ```ts export interface PaymentGateway { getProvider(): ProviderType; createPayment(input: CreatePaymentInput): Promise<PaymentResult>; // your DTOs, not the vendor's refund(input: RefundInput): Promise<RefundResult>; } // providers/index.ts barrels StripeGateway, RapydGateway, CyberSourceGateway, Uo