> For the complete documentation index, see [llms.txt](https://docs.navigaglobal.com/naviga-subscribe/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.navigaglobal.com/naviga-subscribe/subscribe-features/payment-features/apple-pay-ncs-circ-and-payway.md).

# Apple Pay: NCS Circ, Payway & Braintree

## Goal

Apple Pay offers the possibility to have an electronic wallet under Apple platform during Subscribe checkout flow. The goal of this guide is to help you understand Apple Payments integration in Subscribe for the NCS Circ and Payway clients.

## Before you start

Make sure you meet the following pre-requisites:

* Minimum NCS Circ version required is 2020.2
* Minimum Subscribe version required is 3.13.1
* Subscribe must use PaywayWS to support Apple Pay. This service is a wrapper of EccoWS and PW\_Web services
* Every Payway request needs to go through PaywayWS
* Client have to use Naviga Pay
* For Braintree, the Minimum Subscribe version required is 3.15.1

## Business Flow

![Apple Pay Business Flow](/files/-MZDfkdYRsVFETtZ_ado)

**Front end:** Subscription Panel via Apple Pay JS and Payway

**Back end:** Subscribe APIs, NCS Circ, Naviga Pay

## Functional Details

### CMS setup&#xD;

Subscription Panel interacts with an Apple Pay JS library. Subscription Panel offers the possibility to use ApplePay for Billing if a client is using Apple device. A user can select one of the two available options:&#x20;

1. Apple Pay option within the checkout pages - is supported in frictionless checkout starting from 3.15.0
2. Apple Pay option as part of offer selector - Please note that this option is not supported in [frictionless checkout](https://docs.navigaglobal.com/subscribe/subscribe-features/new-starts-and-restarts/new-starts-in-ncs-circ#frictionless-checkout-for-payway-ncs-circ-clients)

You can find the CMS set up details and screenshots of the flow in the table below for each of these two options

{% tabs %}
{% tab title="Apple Pay option within the checkout pages" %}
From the CMS dashboard:

1. Select **subscription panel** then **presentations**.&#x20;
2. Choose your desired presentation from the drop-down menu.
3. Add the **ApplePay V3** as a child component to the **PaymentMethods V3** component.
4. Select **save** and clear your app's cache by selecting the manage cache button, then the relevant app.

For this type of setup the end-user will have to fill delivery and billing address and user information

The way payment option is displayed can also be changed via CMS by using there is a property called `PaymentMethodSelectorStyle` property of **PaymentMethods V3**

Please see the example of the payment step at the screenshot below

![Payment step with ApplePay example](/files/-MZDkRc3zlLuIo26L7-k)
{% endtab %}

{% tab title="Apple Pay option as part of offer selector" %}
From the CMS dashboard:

1. Select **subscription panel** then **presentations**.&#x20;
2. Choose your desired presentation from the drop-down menu.
3. Add the **Offer Selector - ApplePay V3** as a child component to the checkout **Page** **V3** component.
4. Select **save** and clear your app's cache by selecting the manage cache button, then the relevant app.

Please note that this option is not supported in [frictionless checkout](https://docs.navigaglobal.com/subscribe/subscribe-features/new-starts-and-restarts/new-starts-in-ncs-circ#frictionless-checkout-for-payway-ncs-circ-clients).

{% hint style="warning" %}
Note:

1. This option skips steps like filling up billing address and user information. By clicking on ‘Buy with Apple Pay’ data would come from Apple Pay;
2. All the steps within check out flow including registration are skipped and user sees confirmation page. You can show an option to register on the confirmation screen;
3. Data stored in Subscribe/NCS circ if we use Apple pay start as part of offer selector: it depends on user’s wallet settings in Apple. Some fields are optional. A fully set up apple pay account provides the same set of data as collected within subscription panel.
   {% endhint %}

**Offer selector screen**

![](/files/-MZDmV0EDBryt0_EsuUL)

\
**Screen after ‘Buy with Apple Pay’ click:**

![](/files/-MZDnQJR6VxgTkZP13kC)

**CMS Set up:**

![](/files/-MZDngQCm_5vsXz4E7RA)
{% endtab %}
{% endtabs %}

### Solicitor Concierge setup

\
From the Solicitor Concierge dashboard:

1. Select **offer groups** from the left sidebar. Your offer groups will appear in a list to the right.
2. Select an offer group from the list, or create a new offer group.
3. Select the **additional options** category, then select the **payment method** drop-down menu.
4. Check the *Apple Pay* box. For Braintree, please select the *Apple Pay - Braintree* checkbox.
5. Select **update** or **save as new**.

![Payment method -> Apple Pay](/files/-Mbb75BDugYq-8l5cDLn)

![Payment method -> Apple Pay - Braintree](/files/KNFeyBcB2v9teMmoSbgF)

## Apple Pay Start in Classic CSR Portal

When you're viewing a Subscription purchased with ApplePay in Classic CSR Portal you will be able to see a corresponding mark.&#x20;

![](/files/-MZDpgkSgcP19F_9oVfz)

## Technical Details

* A huge Payload is sent to the Subscribe API, which is responsible of decrypting it. For doing so, an algorithm was included as part of the **Encryption Library** NuGet package.
* To decrypt the value, the API provides the NuGet package with the **MID** and **Private Key** to be used. These are stored in MG2 Control just like any other setting.
* The Encryption Library generates a Shared Secret with the Private Key (provided by API) and the Public Key (**payload.Token.PaymentData.Header.EphemeralPublicKey** from the Payload).
* Then, the **symmetric key** gets generated by using the secret key and the MID. This is used to decrypt the **payload.Token.PaymentData.Data** (after a Base64 decode).
* Once the data is decrypted, the API performs the regular Newstart flow: Authorization, Create Subscription, Capture Funds, Payment in Circ, Update Transaction. Refer to the sections Circ System and Payment Gateway for more information.

## Apple Pay Certificates

{% hint style="success" %}
Please input a Salesforce case requesting the Naviga team to setup ApplePay Certificates on your behalf.

<mark style="background-color:red;">**Note updated on 04-Jul-23.**</mark>
{% endhint %}

## Notes From the Payway Team

* You can use existing merchant ids on Payway. All GPAY and ApplePay leverage your existing merchant accounts at TSYS unlike PayPal or Amazon Pay;
* All transactions are identified on Payway through the virtual terminal as a Credit Card, ACH, ApplePay, GPAY, etc. for all research inquiries (reports, etc). Note that we have engineered the virtual terminal to operate like credit cards on wallet transactions. That is, you can perform a SALE, CREDIT or VOID on GPAY or ApplePay accounts like you can do with credit cards from within the payway virtual terminal;
* Disputes would be handled similarly but with one caveat for ApplePay transactions. The last four and expiry date that NCS receives and also assigned in payway for ApplePay transactions is not the customer’s actual credit card but rather the DPAN or device account number assigned to the customer’s card in the phone/IOS device. So, if there is a dispute, the CSR needs to ask the customer what the last four of the device account number is in their wallet on their device. That is just how applePay works.
* From a recurring model, payway assigns our standard token to all transactions for recurring processing.
* Management of CC update/expiry etc. in Apple: There is no communication with Apple. The token is valid in Payway if that device account number is valid. If a customer removes that card from their wallet, the token is invalid, and it would get declined.

#### More developer documentation can be found [here](https://developer.paypal.com/braintree/docs/guides/paypal/overview).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.navigaglobal.com/naviga-subscribe/subscribe-features/payment-features/apple-pay-ncs-circ-and-payway.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
