Relocate the ~6k-file docs tree from the repo root into plugins/document-navigator/docs/ so the plugin is self-contained and portable. docs/superpowers/ (specs and plans) stays at the repo root. Moved via cp+rm rather than git mv because directory rename() fails with EPERM on this WSL /mnt DrvFs mount; git rename-detection pairs the identical-content files at commit time. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@suaveplan/payment-provider-adyen - Universal Adyen Checkout API v71 adapter for @suaveplan/payment. Implements the PaymentProvider interface via the slim @suaveplan/payment-providers core (httpRequest + composeAbortSignal + MerchantKeyConfig + PaymentProviderError), forwarding X-API-Key auth on every call and injecting the configured merchantAccount into capture / cancel / refund request bodies. Generates default payment references via an injectable RandomIdFn so the package stays universal and deterministic under test.
Universal Adyen Checkout API v71 adapter for @suaveplan/payment.
Implements the PaymentProvider interface via the slim
@suaveplan/payment-providers core (httpRequest,
composeAbortSignal, MerchantKeyConfig, PaymentProviderError),
forwarding X-API-Key auth on every call and injecting the configured
merchantAccount into capture / cancel / refund request bodies.
Generates default payment references via an injectable RandomIdFn
so the package stays universal and deterministic under test.
Documentation tree
- adyen — Universal adapter that implements the
PaymentProviderinterface from@suaveplan/paymentagainst Adyen's Checko… - types — Type alias exported by
@suaveplan/payment-provider-adyendescribing the constructor argument accepted by `AdyenProvid…- adyen — Type alias exported by
@suaveplan/payment-provider-adyendescribing the constructor argument accepted by `AdyenProvid…
- adyen — Type alias exported by
Install
bun add @suaveplan/payment-provider-adyen @suaveplan/payment @suaveplan/payment-providers
Quick start
import { AdyenProvider } from "@suaveplan/payment-provider-adyen";
import { ProviderRegistry } from "@suaveplan/payment-providers";
import { PaymentEngine } from "@suaveplan/payment";
const adyen = new AdyenProvider({
apiKey: process.env.ADYEN_API_KEY ?? "",
merchantAccount: "AcmeMerchantECOM",
});
const registry = new ProviderRegistry();
registry.register(adyen);
const engine = new PaymentEngine({ provider: registry.get("adyen") });
const intent = await engine.createIntent({
amount: { amount: 5_000n, currency: "USD" },
captureMethod: "automatic",
});
Features
- Full
PaymentProvidersurface —createIntent/confirmIntent/captureIntent/cancelIntent/refund/getIntent. X-API-Keyauthentication withIdempotency-Keyforwarding oncreateIntentandrefund.merchantAccountcontext injected into every modification body (/captures,/cancels,/refunds).- Injectable
RandomIdFnfor defaultreferencegeneration — withglobalThis.crypto.randomUUID()fallback at call time. - Adyen status mapping for all 10 documented v71 result codes
plus
failedfallback. - Typed errors only — every failure surfaces as
PaymentProviderError(HTTP / timeout / parse) from the slim core. - Universal tier — zero
node:/bun:/fs/path/stream/net/http/cryptoimports; runs on Node, Bun, browsers, and Web Workers. - Tree-shakeable —
sideEffects: false+ per-feature subpath exports. - 100% test coverage (Istanbul) + 100% docs coverage.
Modules
src/adyen/adyen.md— theAdyenProviderclass.src/adyen/mapping.md— pure mappers (mapStatus,mapRefundStatus,mapPaymentMethod,mapPayment).src/types/adyen.md—AdyenConfigtype alias for the slim-coreMerchantKeyConfig.
Related
@suaveplan/payment-providers— slim foundation:httpRequest,composeAbortSignal,ProviderRegistry,PaymentProviderError, shared config types.@suaveplan/payment—PaymentEngine,WebhookVerifier,PaymentProviderinterface.
License
MIT