{"id":13800928,"url":"https://github.com/fresha/capacitor-plugin-applepay","last_synced_at":"2025-05-13T10:30:35.335Z","repository":{"id":43664737,"uuid":"511470835","full_name":"fresha/capacitor-plugin-applepay","owner":"fresha","description":"Capacitor plugin for Apple Pay payments","archived":true,"fork":false,"pushed_at":"2023-07-27T14:47:15.000Z","size":205,"stargazers_count":16,"open_issues_count":4,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-28T09:31:20.440Z","etag":null,"topics":["applepay","capacitor","capacitor-community","capacitor-ios","capacitor-plugin","capacitorjs"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fresha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-07-07T09:49:13.000Z","updated_at":"2024-04-24T14:37:21.000Z","dependencies_parsed_at":"2024-01-02T23:09:37.742Z","dependency_job_id":"8e22fc8c-8bb2-4d5d-b538-95a2b8744079","html_url":"https://github.com/fresha/capacitor-plugin-applepay","commit_stats":{"total_commits":16,"total_committers":3,"mean_commits":5.333333333333333,"dds":0.25,"last_synced_commit":"74602631b815238a34cd167cecf7dee398e115cf"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fresha%2Fcapacitor-plugin-applepay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fresha%2Fcapacitor-plugin-applepay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fresha%2Fcapacitor-plugin-applepay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fresha%2Fcapacitor-plugin-applepay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fresha","download_url":"https://codeload.github.com/fresha/capacitor-plugin-applepay/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225198942,"owners_count":17437002,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["applepay","capacitor","capacitor-community","capacitor-ios","capacitor-plugin","capacitorjs"],"created_at":"2024-08-04T00:01:17.707Z","updated_at":"2024-11-18T15:31:23.054Z","avatar_url":"https://github.com/fresha.png","language":"Swift","funding_links":[],"categories":["Other plugins"],"sub_categories":["Specialized Hardware"],"readme":"# @fresha/capacitor-plugin-applepay\n\n[![npm version](https://badge.fury.io/js/@fresha%2Fcapacitor-plugin-applepay.svg)](https://www.npmjs.com/package/@fresha/capacitor-plugin-applepay)\n\nThis Apple Pay plugin provides interfaces that allow you to initiate an Apple Pay payment sheet based on provided PaymentRequest.\nWhen transaction is authorized, Payment response is returned along with payment details and more importantly- a payment token that you should pass to your backend.\n\nFor Capacitor 4 please use version 4.0.0+\nFor Capacitor 3 please use lower versions.\n\n## Install\n\n```bash\nnpm install @fresha/capacitor-plugin-applepay\nnpx cap sync\n```\n\n## Configuration\n\nBefore using this plugin, make sure that your project is correctly configured. Usually your Payment Services Processor will provide detailed instructions, so please read their docs first.\n\n### Apple Developer Portal:\n\n- Add your Merchant identifier\n- Contact with your PSP who will generate CSR that you should pass into `Apple Pay Payment Processing Certificate`\n- Send the generated certificate to your PSP\n- Edit your App Identifier, add Apple Pay Payment Processing capability, select previously created merchant ID.\n- Renew your provisioning profiles\n\n### Xcode\n\n- Add Apple Pay capability\n- Select previously created merchant identifier\n- Make sure you are using renewed provisioning profiles\n\n## API\n\n\u003cdocgen-index\u003e\n\n* [`canMakePayments()`](#canmakepayments)\n* [`canMakePayments(...)`](#canmakepayments)\n* [`initiatePayment(...)`](#initiatepayment)\n* [`completeLastPayment(...)`](#completelastpayment)\n* [Interfaces](#interfaces)\n* [Type Aliases](#type-aliases)\n\n\u003c/docgen-index\u003e\n\n\u003cdocgen-api\u003e\n\u003c!--Update the source file JSDoc comments and rerun docgen to update the docs below--\u003e\n\n### canMakePayments()\n\n```typescript\ncanMakePayments() =\u003e Promise\u003cCanMakePaymentsResponse\u003e\n```\n\nIndicates whether the device supports Apple Pay.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#canmakepaymentsresponse\"\u003eCanMakePaymentsResponse\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### canMakePayments(...)\n\n```typescript\ncanMakePayments(options: CanMakePaymentsRequest) =\u003e Promise\u003cCanMakePaymentsResponse\u003e\n```\n\nIndicates whether the device supports Apple Pay and whether the user has an active card.\nThis allows more granular control than regular `canMakePayments()`\n\n| Param         | Type                                                                      | Description                           |\n| ------------- | ------------------------------------------------------------------------- | ------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#canmakepaymentsrequest\"\u003eCanMakePaymentsRequest\u003c/a\u003e\u003c/code\u003e | - Supported networks and capabilities |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#canmakepaymentsresponse\"\u003eCanMakePaymentsResponse\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### initiatePayment(...)\n\n```typescript\ninitiatePayment(request: InitiatePaymentRequest) =\u003e Promise\u003cInitiatePaymentResponse\u003e\n```\n\nInitiates a payment base on PaymentRequest object.\n\n| Param         | Type                                                                      | Description                                                |\n| ------------- | ------------------------------------------------------------------------- | ---------------------------------------------------------- |\n| **`request`** | \u003ccode\u003e\u003ca href=\"#initiatepaymentrequest\"\u003eInitiatePaymentRequest\u003c/a\u003e\u003c/code\u003e | - PaymentRequest object that will be used for the payment. |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#initiatepaymentresponse\"\u003eInitiatePaymentResponse\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### completeLastPayment(...)\n\n```typescript\ncompleteLastPayment(request: CompletePaymentRequest) =\u003e Promise\u003cvoid\u003e\n```\n\nCompletes current payment\n\n| Param         | Type                                                                      | Description                                                                             |\n| ------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |\n| **`request`** | \u003ccode\u003e\u003ca href=\"#completepaymentrequest\"\u003eCompletePaymentRequest\u003c/a\u003e\u003c/code\u003e | - \u003ca href=\"#completepaymentrequest\"\u003eCompletePaymentRequest\u003c/a\u003e object containing status |\n\n--------------------\n\n\n### Interfaces\n\n\n#### CanMakePaymentsResponse\n\n| Prop                  | Type                 |\n| --------------------- | -------------------- |\n| **`canMakePayments`** | \u003ccode\u003eboolean\u003c/code\u003e |\n\n\n#### CanMakePaymentsRequest\n\n| Prop               | Type                              |\n| ------------------ | --------------------------------- |\n| **`networks`**     | \u003ccode\u003ePaymentNetwork[]\u003c/code\u003e     |\n| **`capabilities`** | \u003ccode\u003eMerchantCapability[]\u003c/code\u003e |\n\n\n#### InitiatePaymentResponse\n\n| Prop                  | Type                                                                                                                                                                                                                                                                                                                                                 |\n| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **`token`**           | \u003ccode\u003e{ paymentData?: string; transactionIdentifier: string; paymentMethod: { displayName?: string; secureElementPass?: { deviceAccountNumberSuffix: string; deviceAccountIdentifier: string; primaryAccountIdentifier: string; primaryAccountNumberSuffix: string; devicePassIdentifier?: string; pairedTerminalIdentifier?: string; }; }; }\u003c/code\u003e |\n| **`billingContact`**  | \u003ccode\u003e\u003ca href=\"#paymentcontact\"\u003ePaymentContact\u003c/a\u003e\u003c/code\u003e                                                                                                                                                                                                                                                                                            |\n| **`shippingContact`** | \u003ccode\u003e\u003ca href=\"#paymentcontact\"\u003ePaymentContact\u003c/a\u003e\u003c/code\u003e                                                                                                                                                                                                                                                                                            |\n\n\n#### PaymentContact\n\n| Prop                | Type                                                                                                                                                                   |\n| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **`emailAddress`**  | \u003ccode\u003estring\u003c/code\u003e                                                                                                                                                    |\n| **`phoneNumber`**   | \u003ccode\u003estring\u003c/code\u003e                                                                                                                                                    |\n| **`name`**          | \u003ccode\u003e\u003ca href=\"#personnamecomponents\"\u003ePersonNameComponents\u003c/a\u003e\u003c/code\u003e                                                                                                  |\n| **`postalAddress`** | \u003ccode\u003e{ street?: string; city?: string; postalCode?: string; country?: string; isoCountryCode?: string; subAdministrativeArea?: string; subLocality?: string; }\u003c/code\u003e |\n\n\n#### PersonNameComponents\n\n| Prop             | Type                |\n| ---------------- | ------------------- |\n| **`familyName`** | \u003ccode\u003estring\u003c/code\u003e |\n| **`givenName`**  | \u003ccode\u003estring\u003c/code\u003e |\n| **`namePrefix`** | \u003ccode\u003estring\u003c/code\u003e |\n| **`middleName`** | \u003ccode\u003estring\u003c/code\u003e |\n| **`nameSuffix`** | \u003ccode\u003estring\u003c/code\u003e |\n| **`nickname`**   | \u003ccode\u003estring\u003c/code\u003e |\n\n\n#### InitiatePaymentRequest\n\n| Prop                                | Type                                                      |\n| ----------------------------------- | --------------------------------------------------------- |\n| **`merchantIdentifier`**            | \u003ccode\u003estring\u003c/code\u003e                                       |\n| **`countryCode`**                   | \u003ccode\u003estring\u003c/code\u003e                                       |\n| **`currencyCode`**                  | \u003ccode\u003estring\u003c/code\u003e                                       |\n| **`supportedCountries`**            | \u003ccode\u003estring[]\u003c/code\u003e                                     |\n| **`supportedNetworks`**             | \u003ccode\u003ePaymentNetwork[]\u003c/code\u003e                             |\n| **`summaryItems`**                  | \u003ccode\u003ePaymentSummaryItem[]\u003c/code\u003e                         |\n| **`requiredShippingContactFields`** | \u003ccode\u003eContactField[]\u003c/code\u003e                               |\n| **`requiredBillingContactFields`**  | \u003ccode\u003eContactField[]\u003c/code\u003e                               |\n| **`merchantCapabilities`**          | \u003ccode\u003eMerchantCapability[]\u003c/code\u003e                         |\n| **`billingContact`**                | \u003ccode\u003e\u003ca href=\"#paymentcontact\"\u003ePaymentContact\u003c/a\u003e\u003c/code\u003e |\n| **`shippingContact`**               | \u003ccode\u003e\u003ca href=\"#paymentcontact\"\u003ePaymentContact\u003c/a\u003e\u003c/code\u003e |\n\n\n#### PaymentSummaryItem\n\n| Prop         | Type                                                                      |\n| ------------ | ------------------------------------------------------------------------- |\n| **`label`**  | \u003ccode\u003estring\u003c/code\u003e                                                       |\n| **`amount`** | \u003ccode\u003estring\u003c/code\u003e                                                       |\n| **`type`**   | \u003ccode\u003e\u003ca href=\"#paymentsummaryitemtype\"\u003ePaymentSummaryItemType\u003c/a\u003e\u003c/code\u003e |\n\n\n#### CompletePaymentRequest\n\n| Prop         | Type                                                                        |\n| ------------ | --------------------------------------------------------------------------- |\n| **`status`** | \u003ccode\u003e\u003ca href=\"#paymentcompletionstatus\"\u003ePaymentCompletionStatus\u003c/a\u003e\u003c/code\u003e |\n\n\n### Type Aliases\n\n\n#### PaymentNetwork\n\n\u003ccode\u003e'amex' | 'chinaUnionPay' | 'cartesBancaires' | 'discover' | 'eftpos' | 'electron' | 'idCredit' | 'interac' | 'JCB' | 'maestro' | 'masterCard' | 'privateLabel' | 'quicPay' | 'suica' | 'visa' | 'vPay'\u003c/code\u003e\n\n\n#### MerchantCapability\n\n\u003ccode\u003e'capability3DS' | 'capabilityCredit' | 'capabilityDebit' | 'capabilityEMV'\u003c/code\u003e\n\n\n#### PaymentSummaryItemType\n\n\u003ccode\u003e'pending' | 'final'\u003c/code\u003e\n\n\n#### ContactField\n\n\u003ccode\u003e'emailAddress' | 'name' | 'phoneNumber' | 'phoneticName' | 'postalAddress'\u003c/code\u003e\n\n\n#### PaymentCompletionStatus\n\n\u003ccode\u003e'success' | 'failure'\u003c/code\u003e\n\n\u003c/docgen-api\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffresha%2Fcapacitor-plugin-applepay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffresha%2Fcapacitor-plugin-applepay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffresha%2Fcapacitor-plugin-applepay/lists"}