ao link
Affino

How to set up Apple Pay & Google Pay

Overview

Apple and  Google Pay are fully compatible with Stripe’s products and features (e.g., subscriptions), allowing you to use it in place of a traditional payment form whenever possible.

 

Use it to accept payments for physical or digital goods, donations, subscriptions, and more.

 

Note: Apple Pay and Google Pay are just settings you enable on Stripe.

 

They show if you’re on an Apple device with Apple Pay enabled.

Or a Google device or Chrome with Google Pay enabled.

Otherwise they do not show, they only show if turned on on Stripe.

 

Begin Set Up

To setup your Apple Pay / Google Pay payment gateway (or view your current payment gateways) access the Payment Gateway screen:

  • Control > Commerce > Payment Gateways

 

Add Payment Gateway

  • To add the new Stripe payment gateway, click the +Add button:

 

 

Payment Gateway Selection

  • From the Payment Gateway Selection screen, choose Stripe:

 

Payment Gateway Edit

  • After this, you will be shown the Payment Gateway Edit screen:

Step 1.- Name the Payment Gateway

  • This could simply be “Apple Pay & Google Pay” or whichever you prefer:

 

 

Step 2.- Select which Run Mode is operational on this Payment Gateway

  • Choose between Live or Test Mode
  • Live makes for genuine transactions
  • Until the gateway goes Live, Test Mode should be selected

 

 

Stripe Help: stripe.com/docs/keys#test-live-modes

Step 3.- Insert the Publishable Key

  • This key comes from Stripe
  • Your publishable API key identifies your website to Stripe during communications.

 

 

 

Stripe Help: stripe.com/docs/stripe-js/v2#setting-publishable-key

Step 4.- Insert the Secret Key

  • This key comes from Stripe
  • Secret API keys should be kept confidential and only stored on your own servers
  • Your account’s secret API key can perform any API request to Stripe without restriction

 

Help on API Keys: stripe.com/docs/keys

Step 5.- Webhook URL

  • This is auto generated by Affino
  • The webhook URL is placed in Stripe

Stripe Help: stripe.com/docs/webhooks

 

Further notes >

 

Orders will be cancelled for the following events:

  • failed / subscription_schedule.canceled / customer.subscription.deleted

On Stripe, set the following Event Types:

  • subscription_schedule.created / charge.succeeded / subscription_schedule.canceled
  • customer.source.expiring / charge.failed / customer.subscription.deleted

 

Step 6.- Webhook Signing Secret

  • This is generated by Stripe
  • You need this to verify signatures

 

 

 

You can retrieve your endpoint’s secret from your Stripe Dashboard by going to Developer > Webhooks:

 

 

Add a new Endpoint:

 

 

Insert the Webhook URL into the Endpoint URL field:

 

 

Insert the Stripe generated endpoint’s secret

 

- into the Webhook Signing Secret field:

 

 

Stripe Help: stripe.com/docs/webhooks/signatures

Step 7.- Use Tax Rate For Subscription checkbox

  • When ticked, Affino will pass the Tax Rules External ID to Stripe
  • This ID needs to be same as the Tax Rate ID in Stripe

Stripe Tax Rate ID and Affino Tax Rule External ID

 

Stripe: Dashboard > Tax Rates

Affino: Control > Commerce > Tax Rules

 

If you are setting up a Subscription, then please bear in mind that you need to create a new Tax Rate in Stripe (dashboard.stripe.com/tax-rates):

 

 

- and subsequently copy and paste the Tax Rate ID from Stripe:

 

 

- to the Tax Rule External ID in Affino:

 

Stripe help: stripe.com/docs/billing/taxes/tax-rates

Affino Catalogue Item and Stripe Product integration

  • Affino: Control > Commerce > Catalogue Items
  • Stripe: Dashboard > Products

In order for you to sell a subscription in Affino with Stripe, you must first create a product in your Stripe dashboard:

 

 

After it has been created, copy and paste the product API Price ID:

 

 

- and place it in the catalogue item External ID field:

 

 

Please note: If you have catalogue items with several prices (and currencies) you will need to:

  • Use a single price/currency
  • or
  • Create a catalogue item, one for each price/currency

Currently, you will need to create a separate catalogue item, one for each price/currency (with a matching Stripe price plan) as we do not have an External ID field in the Catalogue Item for each row within the price matrix to match each Stripe Price ID.

 

Stripe help: stripe.com/docs/billing/prices-guide

Step 8.- Use Coupons For Subscriptions checkbox

  • When ticked , Affino will pass the Coupon External ID to Stripe
  • This ID needs to be same as the Coupon ID in Stripe

Step 9.- Use Renewal Catalogue Item Price And Tax

Select to pass the Renewal Catalogue Item's External ID and Tax Rule External ID to Stripe if a Renewal Catalogue Item exists.

 

If not selected, the Renewal Catalogue Item will still be used to generate the renewal order but Stripe will continue to renew on the existing price and tax rule.

 

NOTE: These ID's need to match the ones in Stripe.

Step 10.- Allow Wallet Payments

Select to use wallets (Apple Pay, Google Pay, Microsoft Pay) to pay online with a saved card or a digital wallet balance.

 

 

 

Step 11.- Account Country

The two-letter country code of your Stripe account (e.g., GB)

Setup the Domain in Stripe

For Apple pay to work, you will need to set the domain in Stripe:

 

Stripe > Dashboard > Settings > Payments > Apple Pay

 

 

 

 

 

Note: Regarding the verification file, please read the following FAQ:

 

Do I need to host the Apple Pay verification file?

 

 

Step 12.- Webhook Integration Script

You have two Integration Script Options:

  • Cookie Integration Script
  • Login Integration Script

Select one of the above if you wish to run custom code / functionality.

 

Step 13.- Start Renewal Automation (checkbox)

  • Select to initiate the renewal automation scheduled task which will check for and generate subscription renewals

Step 14.- Start Cancellation Automation

  • Select to initiate the cancellation automation scheduled task which will check for subscription cancellations and cancel the payment at the payment gateway.

Step 15.- Live (checkbox)

  • Tick this option if you wish to make this payment gateway active

Step 16.- Save the new Apple/Google (Stripe) Payment Gateway

  • After this, press the Save button:

Step 17- Create the Payment Method

Control > Commerce > Payment Methods > (Add)

 

After you have set up the Payment Gateway you will need to set up the associated Payment Method.

 

Fields:

  • Payment Method Name: Enter a Name for this Payment Method
  • Gateway: Select Payment Gateway from Options available in drop-down menu
  • Store: Select the store or stores that this payment method applies to
  • Group Options: (All Groups or Selected Groups) Select whether Payment Method can apply to All or Selected
  • Groups: Select the Groups to which this Payment Method will apply
  • Payment Method Type: (All Payments, One-off Payments Only, Renewable Payments Only or Non Renewable Payments and One-Off Payments)
    Select the payment types that this payment method supports. Default it will be presented for all products, however if it can only handle subscriptions and renewable payments then it should be selected as such. Otherwise users will select this as a payment option and then be unable to complete the transaction.
  • Geo Filter: (All countries, Selected countries or All countries except)
    Select to restrict access to the payment gateway by region
  • Geo Filter Countries: Select the countries you want to filter by
  • Geo Filter Address: (Billing Address, Shipping Address or Invoice Address)     
    Select to restrict access to the payment gateway by address. If Hide Delivery Address / Hide Delivery If Not Required is selected on the Checkout Profile, the Invoice Address is used instead
  • Currency Filter: Filter this payment method by a specific currency. This allows you to use this payment
  • Checkout Thumb: Add the thumb to be displayed in the checkout next to the payment method title
  • Payment Method Help: The Payment Method Help appears at the top of the payment method form for in-page payments and is essential for providing guidance for users entering information for the payment method, e.g. for Direct Debits.
  • Payment Method Footer: The Payment Method Footer appears at the base of the payment method form for in-page payments and is essential for providing additional notices and terms for users entering information for the payment method, e.g. for Direct Debits.
  • Publication: Live (tick to make this payment method active

Note: the Payment Method is what the customer sees and chooses when going through the Checkout.

 

 

Conclusion:

You have now added Apple Pay and Google Pay (via Stripe) as a payment gateway in Affino.

 

Customers can now purchase with ease using the Google and Apple devices.

 

 

Did you find this content useful?

Thank you for your input

Thank you for your feedback

Driving business at some of the world's most forward thinking companies

Our Chosen Charity

Humanity Direct