{"_id":"@capacitor-pay/adyen","name":"@capacitor-pay/adyen","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@capacitor-pay/adyen","version":"0.0.1","description":"Capacitor plugin wrapping Adyen's Tap to Pay SDK for in-app NFC card payments. Adyen provider for capacitor-pay.","main":"dist/plugin.cjs.js","module":"dist/esm/index.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","author":{"name":"Alessio Spanu"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/capacitor-pay/capacitor-pay-adyen.git"},"keywords":["capacitor","plugin","native","adyen","tap-to-pay","payments"],"scripts":{"build":"npm run clean && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","prepublishOnly":"npm run build"},"devDependencies":{"@capacitor/core":"^8.1.0","rimraf":"^6.0.1","rollup":"^4.30.1","typescript":"~5.6.3"},"peerDependencies":{"@capacitor/core":">=7.0.0"},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"gitHead":"df7b90e45666f2f2a9b4130ef7027d64319c6777","_id":"@capacitor-pay/adyen@0.0.1","bugs":{"url":"https://github.com/capacitor-pay/capacitor-pay-adyen/issues"},"homepage":"https://github.com/capacitor-pay/capacitor-pay-adyen#readme","_nodeVersion":"25.7.0","_npmVersion":"11.10.1","dist":{"integrity":"sha512-u/GBbJZGIxjQdkD8bFA5TRE8Ngi03Dv8J1zJr+SxK91lBJwEdgsDF5G30cDRtwdEnTlfCdPiOUmhZKcbQvAWiQ==","shasum":"31b979b9bcdd1648fcff6a7dc555803c36a924e9","tarball":"https://registry.npmjs.org/@capacitor-pay/adyen/-/adyen-0.0.1.tgz","fileCount":22,"unpackedSize":54563,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDySPHNJ58icwpwweO5OAWD7jhaxAeNV5cDVqs9b4WRwAIgVErOA6wnKhn7FYh5m9UtW/01VuI8GfipoAgB2ooO3UE="}]},"_npmUser":{"name":"spanu18","email":"alessio.spanu03@gmail.com"},"directories":{},"maintainers":[{"name":"spanu18","email":"alessio.spanu03@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/adyen_0.0.1_1781530086965_0.6918240984644337"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-15T13:28:06.821Z","0.0.1":"2026-06-15T13:28:07.135Z","modified":"2026-06-15T13:28:07.321Z"},"maintainers":[{"name":"spanu18","email":"alessio.spanu03@gmail.com"}],"description":"Capacitor plugin wrapping Adyen's Tap to Pay SDK for in-app NFC card payments. Adyen provider for capacitor-pay.","homepage":"https://github.com/capacitor-pay/capacitor-pay-adyen#readme","keywords":["capacitor","plugin","native","adyen","tap-to-pay","payments"],"repository":{"type":"git","url":"git+https://github.com/capacitor-pay/capacitor-pay-adyen.git"},"author":{"name":"Alessio Spanu"},"bugs":{"url":"https://github.com/capacitor-pay/capacitor-pay-adyen/issues"},"license":"MIT","readme":"# capacitor-pay-adyen\n\nAdyen provider plugin for [`@capacitor-pay/core`](https://github.com/capacitor-pay/capacitor-pay), wrapping Adyen's **Tap to Pay** SDKs for iOS and Android. Turns the phone itself into the card terminal (NFC) - no external card reader hardware needed. Can also be used standalone without `@capacitor-pay/core`.\n\n## ⚠️ Verification status\n\nThis is the least-verified of the three `@capacitor-pay/*` plugins:\n\n- `@capacitor-pay/sumup` was compiled and verified against the real SumUp SDK (javap-checked).\n- `@capacitor-pay/stripe` was written against documented Stripe Terminal SDK patterns but not compiled (no cached artifacts available).\n- **`@capacitor-pay/adyen` was written against general Adyen Tap to Pay integration patterns** (configuration object → initialize → activate → process a Terminal API payment request → get a Terminal API response). Adyen's Tap to Pay SDKs are less consistently documented in public sources than Stripe Terminal's, so confidence in the exact native API surface is **lower** than for the Stripe plugin.\n\nWhat you can rely on as-is: the **TypeScript layer** (`src/`) builds and type-checks cleanly, and the **Terminal API (Nexo) JSON** built/parsed in the native `buildPaymentRequest`/`parsePaymentResponse` helpers - `SaleToPOIRequest`/`SaleToPOIResponse` with `MessageHeader`/`PaymentRequest`/`PaymentResponse`/`POIData` - which is a stable, documented protocol shared across all of Adyen's POS terminals and Tap to Pay SDKs.\n\nWhat needs verification against a real Adyen Tap to Pay integration (sample app / official docs), flagged with `NOTE:` comments at the top of each file:\n\n- `ios/Plugin/AdyenPlugin.swift` - the `AdyenTapToPay` import and `TapToPay.Configuration` / `TapToPay.initialize` / `TapToPay.checkAvailability` / `TapToPay.activate` / `TapToPay.processPaymentRequest` / `TapToPay.cancelCurrentPayment` / `AdyenTapToPay.Cancelable` calls are placeholders for whatever Adyen's actual iOS API is named.\n- `android/src/main/java/com/capacitorpay/adyen/AdyenPlugin.java` - the `com.adyen.tapToPay` package, `TapToPay.getInstance()`, `TapToPayConfiguration`, `TapToPayEnvironment`, `TapToPayCallback<T>` and `Cancelable` types are placeholders for whatever Adyen's actual Android API is named.\n- `CapacitorPayAdyen.podspec` - the `Adyen/TapToPay` CocoaPods subspec name/version; Adyen's iOS SDK is primarily distributed via Swift Package Manager, so Tap to Pay may need to be added as an SPM dependency in the consuming app instead.\n- `android/build.gradle` - the `com.adyen.tapToPay:tap-to-pay-android` Maven coordinates and repository; Tap to Pay artifacts are often gated behind Adyen account onboarding rather than published on Maven Central.\n\nTreat this plugin as an architectural skeleton (TS API, plugin registration, Terminal API request/response shapes, setup/activation/checkout flow) to fill in against a real Adyen test account, the same way `capacitor-pay-sumup/test-app` was used to iron out the SumUp plugin's compile errors.\n\n## How this differs from `@capacitor-pay/sumup` / `@capacitor-pay/stripe`\n\nThere's no separate \"discover/connect a reader\" step - the phone *is* the reader. The flow is:\n\n1. `setup()` - one-time SDK configuration.\n2. `activateTapToPay()` - one-time per-device activation/onboarding (analogous to Apple's \"Tap to Pay on iPhone\" setup screen).\n3. `checkTapToPay()` - check availability/activation status before showing a \"pay\" button.\n4. `checkout()` - build and process a single Terminal API payment request; the cardholder taps their card/device against the phone.\n\n## Install\n\n```bash\nnpm install @capacitor-pay/adyen\nnpx cap sync\n```\n\n## Backend requirement: Tap to Pay SDK initialization data\n\nLike Stripe's connection tokens, Adyen's Tap to Pay SDK needs to be initialized with device-specific data that must be obtained **server-side** (via Adyen's Management API, using your Adyen API key) - never embed an Adyen API key in the app.\n\nExpose a backend endpoint that performs this server-side call and returns the result as:\n\n```json\n{ \"sdkData\": \"...\" }\n```\n\nPass this endpoint's URL as `sdkDataUrl` in `setup()`. The plugin calls it itself (with any `headers` you provide, e.g. for your app's auth) whenever the SDK needs to (re)initialize.\n\n## iOS setup\n\nAdd to your `ios/App/Podfile`:\n\n```ruby\npod 'CapacitorPayAdyen', :path => '../../node_modules/@capacitor-pay/adyen'\n```\n\nThen run `pod install`. **If this fails to resolve `Adyen/TapToPay`** (see verification status above), add Adyen's iOS SDK as a Swift Package Manager dependency to your Xcode project directly instead, following Adyen's Tap to Pay on iPhone integration guide.\n\n### Tap to Pay on iPhone requirements\n\n- The `com.apple.developer.proximity-reader.payment.acceptance` entitlement (granted by Apple on request).\n- iPhone XS or later, iOS 16.7+.\n- `NSLocationWhenInUseUsageDescription` in `Info.plist` (used to verify the device is in a supported region).\n\n## Android setup\n\nThe Tap to Pay for Android SDK may require a separate Adyen-hosted Maven repository (see the `NOTE:` in `android/build.gradle`) - check Adyen's integration guide for the URL and add it to your app's repositories if `mavenCentral()` alone doesn't resolve the dependency.\n\nLike the other `@capacitor-pay/*` plugins, consuming apps need core library desugaring enabled in `android/app/build.gradle`:\n\n```groovy\nandroid {\n    compileOptions {\n        coreLibraryDesugaringEnabled true\n    }\n}\ndependencies {\n    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'\n}\n```\n\n### Tap to Pay on Android requirements\n\n- Android 11 (API 30) or later, NFC-capable device.\n- A device/account enabled for Tap to Pay by Adyen.\n\n## API\n\n<docgen-index>\n\n* [`setup(...)`](#setup)\n* [`checkTapToPay()`](#checktaptopay)\n* [`activateTapToPay()`](#activatetaptopay)\n* [`checkout(...)`](#checkout)\n* [`cancelCheckout()`](#cancelcheckout)\n\n</docgen-index>\n\n### setup(...)\n\n```ts\nsetup(options: AdyenSetupOptions) => Promise<{ success: boolean }>\n```\n\nConfigure the SDK for this device. Call once on startup, before `checkTapToPay`/`checkout`.\n\n| Param         | Type                                                        |\n| ------------- | -------------------------------------------------------------- |\n| **`options`** | <code><a href=\"#adyensetupoptions\">AdyenSetupOptions</a></code> |\n\n---\n\n### checkTapToPay()\n\n```ts\ncheckTapToPay() => Promise<AdyenTapToPayStatus>\n```\n\nCheck whether Tap to Pay is available on this device and whether it's been activated.\n\n---\n\n### activateTapToPay()\n\n```ts\nactivateTapToPay() => Promise<{ success: boolean }>\n```\n\nRun the one-time Tap to Pay activation flow (device registration plus OS-level onboarding, e.g. Apple's \"Tap to Pay on iPhone\" setup screen). Only needs to succeed once per device.\n\n---\n\n### checkout(...)\n\n```ts\ncheckout(options: AdyenCheckoutOptions) => Promise<AdyenCheckoutResult>\n```\n\nBuild a Terminal API payment request for `amount`/`currency`/`reference` and process it via Tap to Pay - the cardholder taps their card or device against the phone to complete the payment. Requires `activateTapToPay` to have completed previously on this device.\n\n| Param         | Type                                                            |\n| ------------- | ------------------------------------------------------------------ |\n| **`options`** | <code><a href=\"#adyencheckoutoptions\">AdyenCheckoutOptions</a></code> |\n\n---\n\n### cancelCheckout()\n\n```ts\ncancelCheckout() => Promise<{ success: boolean }>\n```\n\nCancel an in-progress `checkout` (e.g. while waiting for a card tap).\n\n---\n\n### Interfaces\n\n#### AdyenSetupOptions\n\n| Prop                 | Type                                                  | Description                                                                                                                                  |\n| -------------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **`environment`**    | <code><a href=\"#adyenenvironment\">AdyenEnvironment</a></code> | \"test\" or \"live\" - which Adyen environment Tap to Pay payments are processed against.                                              |\n| **`merchantAccount`** | <code>string</code>                                  | The Adyen merchant account that will receive these payments.                                                                                |\n| **`sdkDataUrl`**     | <code>string</code>                                  | URL of your backend endpoint that returns Tap to Pay SDK initialization data, e.g. `{ \"sdkData\": \"...\" }`.                                  |\n| **`headers`**        | <code>Record&lt;string, string&gt;</code>            | Optional extra headers sent with the sdkData request, e.g. for your app's auth.                                                             |\n\n#### AdyenTapToPayStatus\n\n| Prop            | Type                  | Description                                                              |\n| --------------- | --------------------- | --------------------------------------------------------------------------- |\n| **`available`** | <code>boolean</code> | Whether this device supports Tap to Pay (NFC, OS version, registration). |\n| **`activated`** | <code>boolean</code> | Whether the one-time Tap to Pay activation flow has completed.           |\n\n#### AdyenCheckoutOptions\n\n| Prop            | Type                 | Description                                                                                          |\n| --------------- | -------------------- | --------------------------------------------------------------------------------------------------------- |\n| **`amount`**    | <code>number</code> | Amount to charge, in the major currency unit (e.g. 12.50 for €12.50).                               |\n| **`currency`**  | <code>string</code> | ISO 4217 currency code, e.g. \"EUR\".                                                                  |\n| **`reference`** | <code>string</code> | Unique reference for this transaction (Terminal API `SaleData.SaleTransactionID.TransactionID`), used to reconcile the payment later. |\n\n#### AdyenCheckoutResult\n\n| Prop              | Type                                | Description                                                                          |\n| ----------------- | ------------------------------------ | ------------------------------------------------------------------------------------------- |\n| **`success`**     | <code>boolean</code>                |                                                                                       |\n| **`pspReference`** | <code>string</code>                | Adyen's PSP reference for this payment (`POIData.POITransactionID.TransactionID`).  |\n| **`resultCode`**  | <code>string</code>                | Result of the Terminal API `PaymentResponse.Response.Result`, e.g. \"Success\" or \"Failure\". |\n| **`response`**   | <code>Record&lt;string, unknown&gt;</code> | Full Terminal API `SaleToPOIResponse` JSON returned by the SDK.                      |\n\n### Type Aliases\n\n#### AdyenEnvironment\n\nWhich Adyen environment to process Tap to Pay payments against.\n\n<code>'test' | 'live'</code>\n","readmeFilename":"README.md","_rev":"1-6f06006d1b1a0725a8e82b7aff31f5f6"}