- Sandbox Testing
- Sandbox
- Getting Started
- Developer Account and Website
- Create a Sandbox Tester Account
- Adding a Test Card Number
- Testing Apple Pay on Your Apps and Websites
- Test Cards for Apps and the Web
- Test Cards for Apps and Websites in China Mainland
- Test Cards for Point of Sale Systems
- Feedback and Questions
- Implementing Apple Pay
- Build your app and website.
- Developer Account Setup
- Apple Pay for Apps
- Apple Pay on the Web
- Apple Pay in Messages
- Integrate, test, and verify.
- E-Commerce Platforms and Payment Service Providers
- Sandbox Testing
- Check the guidelines.
- App Store Review Guidelines
- Apple pay on the Web Acceptable Use Guidelines
- Can we test Apple pay in simulator
- 4 Answers 4
- Planning for Apple Pay
- Presenting the Option to Buy with Apple Pay
- Presenting the Payment Sheet
- Processing the Payment Token
- Make the Most of Apple Pay
- Choose the Most Relevant Button Type
- Implement Express Checkout
- Simplify Payment Method Selection
- Use Information Provided by Apple Pay
- Offer the Ability to Register Only After Purchase
- Offer new commerce experiences with App Clips and Apple Pay
- Supporting Apple Pay
- Countries and Regions
- Cards and Banks
- E-Commerce Platforms and Payment Service Providers
- Donations
- Web Views within Your App
- Transaction Types
- Guidelines and Documentation
Sandbox Testing
The sandbox environment is a great way to test offline implementation of Apple Pay for apps, websites, and point of sale systems. This document provides an overview of the sandbox environment, details on how to get started, and general support to test your Apple Pay transactions.
Sandbox
The Apple Pay sandbox environment allows merchants and developers to test their implementation of Apple Pay with test credit and debit cards. Currently the sandbox supports Apple Pay testing for:
- Australia
- Canada
- China mainland
- Hong Kong
- Taiwan
- France
- Ireland
- Italy
- Japan
- New Zealand
- Russia
- Singapore
- Spain
- United Kingdom
- United States
Note: It is also important to test Apple Pay in your production environment. Real cards must be used in the production environment. Test cards will not work.
Getting Started
You’ll need the following to test Apple Pay in the sandbox:
- iPhone 6 or later, iPad mini 3 or later, iPad Air 2, iPad Pro, or Apple Watch
- App Store Connect sandbox tester account
- Supported test credentials
Developer Account and Website
To successfully establish an Apple Pay session with Apple Pay servers, your Apple Developer account needs to be configured for Apple Pay. This includes registering a merchant ID, creating certificates, and verifying your website domain if you plan to implement Apple Pay for the web. Make sure to complete the steps below before testing your Apple Pay implementation with Apple Pay servers.
Learn more about configuring your environment
- Register a Merchant ID in your developer account.
- Create your Payment Processing Certificate or obtained a CSR from your PSP.
- Create your Merchant Identity Certificate (Apple Pay for web only).
- Register and verify a Merchant Domain (Apple Pay for web only).
- Verify that all webpages hosting an Apple Pay button are HTTPS and your web server supports TLS 1.2.
Create a Sandbox Tester Account
To create a sandbox tester account, follow these steps:
- Sign in to App Store Connect.
- On the homepage, click Users and Access.
- Under Sandbox, click Testers.
- Click “+” to set up your tester accounts.
- Complete the tester information form and click Invite.
- Sign out of your Apple ID on all testing devices and sign back in with your new sandbox tester account.
For more information on how to create a sandbox tester account, see App Store Connect Help: Create a sandbox tester account.
Important: If you mistakenly use a sandbox tester account to sign in to a production environment, like iTunes, on your test device instead of your test environment, the sandbox account becomes invalid and can’t be used again. If this happens, create a new sandbox tester account with a new email address.
Adding a Test Card Number
To get started, add a test card to Wallet:
- Make sure to sign out of iCloud and sign into your test device with your sandbox tester account.
- Go to Wallet and tap Add Credit or Debit Card.
- Using your test credential, follow the steps to add a new card using manual entry.
- After your card has been added, you may begin testing.
Note: To provision test cards on your device and use the sandbox, you will need to make sure that your device’s region is set to a country or region that supports Apple Pay.
Testing Apple Pay on Your Apps and Websites
With your iPhone, iPad, or Apple Watch, you can use the Apple Pay sandbox to pay within your app and website. The Apple Pay sandbox environment allows merchants and developers to test Apple Pay before or after implementation. Developers don’t have to use their personal production cards for testing. Merchants or your PSP can test whether they’re able to decrypt the transaction-specific payment load.
Note: Your sandbox test transaction will decline pre-fulfillment as the test key will not match your production key.
Test Cards for Apps and the Web
Test card numbers (FPAN, CVV, CVC, Expiration Date) from the payment networks are listed below and can be used on supported devices to test within the Apple Pay sandbox environment.
Note:
- FPAN and DPAN expiration dates do not need to match.
- American Express test cards can only support device regions that are set to the United States.
Test Cards for Apps and Websites in China Mainland
Test card details (FPAN, CVV, Expiry, OTP) for China UnionPay cards are listed below and can be used on supported devices to test your Apple Pay implementation.
Note:
- China UnionPay test cards can only support device regions that are set to China mainland.
- You will be prompted to enter a One Time Password (OTP) during provisioning. You should enter the value 123456.
- China UnionPay test debit cards do not require CVV or expiry date.
- China UnionPay test cards may require a PIN when making an Apple Pay test transaction. The PIN is 939393.
- In China mainland, Apple Pay for websites is available only on Safari on iOS devices that are compatible with Apple Pay and running iOS 11.2 or later.
Test Cards for Point of Sale Systems
Retailers can use the sandbox to do simple terminal offline tests to make sure Apple Pay transactions are working in their PoS terminals before they enable NFC functionality.
Test card numbers (FPAN, CVV, CVC, Expiration Date) from the payment networks are listed below so you can test within the Apple Pay sandbox environment.
Note: This does not replace Payment Network contactless certification. These FPANs can only be used for terminal offline beep tests using Apple Pay after completing Payment Network certification.
Network | FPANs | MagStripe Contactless | EMV Contactless |
---|---|---|---|
Amex | 3499 562866 52212 Exp Date: 11/2022 CID: 1111 | ● | |
3499 567268 99159 Exp Date: 11/2022 CID: 1111 | ● | ||
Discover | 6011 0009 9606 5037 Exp Date: 11/2022 CID: 111 | ● | ● |
6011 0009 9631 8741 Exp Date: 11/2022 CID: 111 | ● | ● | |
MasterCard | 5204 2477 5000 1471 Exp Date: 11/2022 CVC: 111 | ● | ● |
5204 2452 5000 1488 Exp Date: 11/2022 CVC: 111 | ● | ● |
Feedback and Questions
Have feedback? Send it to Apple Pay Support. Have additional questions? Join the conversation. Post questions and search for answers at Apple Developer Forums.
Design guidelines
Learn how to optimize the design and checkout experience for Apple Pay.
Payment service providers
Support Apple Pay quickly and reliably with an SDK or API from a payment service provider (PSP).
View payment service providers
Contact us
Have a question or request? We can help by phone or email.
Источник
Implementing Apple Pay
Discover how to set up your developer account to support Apple Pay, verify that transactions are completed successfully, and make sure your implementation of Apple Pay follows guidelines for apps and the web.
Build your app and website.
Developer Account Setup
Learn about the identifiers and certificates in your Apple Developer account that are needed to implement Apple Pay for apps and websites. If you’re supporting Apple Pay in your app and website, we recommend using the same Merchant ID and certificate for both. Contact your payment service provider to confirm any additional transaction requirements applicable to your region.
Apple Pay for Apps
Get APIs for payment sheet interactions, authorization, updates, errors, and more.
Apple Pay on the Web
Safari supports two JavaScript APIs that let you accept Apple pay payments from customers on your website.
Apple Pay in Messages
Allow customers to pay quickly and easily with Apple Pay in an iMessage app or directly in a Messages for Business session.
Integrate, test, and verify.
E-Commerce Platforms and Payment Service Providers
The most popular e-commerce platforms and payment service providers support Apple Pay within apps and on the web. Use an Apple Pay SDK from a payment service provider to integrate Apple Pay in your app or website.
Apple Pay Web Merchant Registration API
Approved e-commerce platform and payment service providers can use the Apple Pay Web Merchant Registration API, along with their merchant IDs, to register and unregister their merchants’ websites for Apple Pay.
Sandbox Testing
The Apple Pay sandbox environment allows you test your implementation of Apple Pay with test credit and debit cards.
Check the guidelines.
App Store Review Guidelines
Before submitting your app for review, make sure it follows these guidelines to help progress smoothly through the review process.
Apple pay on the Web Acceptable Use Guidelines
Before deploying Apple Pay on your website, make sure your implementation follows these guidelines.
Design guidelines
Learn how to optimize the design and checkout experience for Apple Pay.
Payment service providers
Support Apple Pay quickly and reliably with an SDK or API from a payment service provider (PSP).
View payment service providers
Contact us
Have a question or request? We can help by phone or email.
Источник
Can we test Apple pay in simulator
I know that Apple pay testing we use Apple pay stubs in iOS 8, but please let me know how to use Apple pay without ApplePayStubs in iOS 9 in simulator.
Thanks in advance
4 Answers 4
Yes. You can test apple pay using iOS 9 simulator. So you don’t need to add any testing sheet instead PKPaymentAuthorizationViewController. It’s working on iOS 9 simulator. Make sure your app run on iPhone 6, iPhone 6 plus or latest version of simulator.
Yes it is working in Simulator with Xcode 7 and iOS 9.
No need for bio metric thumb scanning.
In Xcode 12.5 and iOS 14.5 you can do that using
In Xcode 7.0 or later, you can test the payment authorization view controller in the simulator. It provides simulated cards for all the supported payment networks and returns dummy payment data in plain text. On a device, this data is encrypted with your merchant identifier and must be decrypted either on your server or by your payment processor.
Use the Apple Pay Sandbox environment to test your app on a device with test cards.
Although these techniques provide fast and convenient ways to test your code, you still need to thoroughly test Apple Pay on actual, physical devices with production cards.
Источник
Planning for Apple Pay
Provide a fast, easy, and secure way for users to buy goods and services in your app or on your website. Developers that implemented Apple Pay using best practices have substantially increased checkout conversion rates, customer loyalty and purchase frequency, and reduced checkout time.
Presenting the Option to Buy with Apple Pay
Apple Pay is compatible with most active Apple devices and is used by hundreds of millions around the world. We recommend adding Apple Pay to product detail pages, the cart, checkout page, in payment settings, or anywhere else a user can choose a payment method or initiate a purchase.
Apple Pay APIs provide several types of buttons you can use in your app or website. Each button displays an Apple-approved caption, font, color, and style and maintains ideal proportions when scaled for various interfaces layouts. You can configure the button’s corner radius to match the style of your UI. And support for localization and accessibility are built in.
Presenting the Payment Sheet
When a user chooses Apple Pay as the payment method, a payment request is created. The payment sheet must be presented immediately after the user taps the Apple Pay button, without any interim screens or pop-ups except to prompt for necessary product details, such as size or quantity.
The payment sheet can include the user’s name, billing address, shipping address, shipping method, phone number, and email address. When deciding what information to display, remember to show only what’s necessary to process and service the transaction. You can configure line items to add relevant information such as shipping cost, taxes and discount.
Processing the Payment Token
Once the user has authenticated to confirm purchase intent, you don’t need to handle their actual credit or debit card numbers. Instead, your app or website receives a payment object containing an encrypted payment token. This token encapsulates the information needed to complete a payment transaction, including the device-specific account number, the amount, and a unique, one-time-use cryptogram. The token can be decrypted by the merchant with the certificate private key or by the Payment Service Provider (PSP) on behalf of the merchant. Once decrypted, the token needs to be passed to the payment service provider for processing.
Customer
Transaction includes unencrypted billing and shipping contacts, and encrypted payment token.
Merchant
Decrypts payment token. This can also be done by a payment service provider.
Payment Service Provider
Uses token to run an eCom credit/debit card authorization, which includes a one-time cryptogram.
Card Network
Validates token, translates it into the debit/credit account, and submits to issuer for confirmation.
Bank Issuer
Receives payment request and can either approve or decline.
If you already work with an e-commerce platform or Payment Service Provider (PSP) supporting Apple Pay, they can simplify and shorten your integration effort. Alternatively, you can develop your own solution to receive and decrypt the Apple Pay payment tokens from your app or website and submit it for regular processing. Contact your platform or PSP to ensure that it supports Apple Pay, or view our list of platforms and providers.
Make the Most of Apple Pay
Apple Pay lets you accelerate checkout and create great new customer experiences. Follow these best practices and increase checkout conversion rates, customer loyalty, and purchase frequency.
Choose the Most Relevant Button Type
Make sure that the call to action in the button is aligned with the action the user needs to take. The system provides several Apple Pay button types and styles you can use in your app or website, and the Human Interface Guidelines provide options for further customization. Display the Apple Pay button prominently and above the fold.
Implement Express Checkout
Offer express checkout by displaying the Apple Pay button on the product or cart page. Users can select shipping options and addresses directly in the payment sheet and check out without any typing, which leads to decreased cart abandonment and increased overall conversion rates.
Simplify Payment Method Selection
Leverage PassKit APIs for apps and Javascript-based APIs in Safari for websites to identify users with a card in Wallet and preselect Apple Pay as the payment method to accelerate checkout.
Use Information Provided by Apple Pay
The Apple Pay sheet can include the user’s name, billing address, shipping address, shipping method, phone number, and email address needed to complete the transaction. Consider using the information provided by the payment sheet for check out and avoid asking the user to enter any of these fields, as doing so increases purchase abandonment.
Offer the Ability to Register Only After Purchase
Requiring users to register for an account before purchase is a leading cause of checkout abandonment. Apple Pay allows users to easily check out as a guest. After the purchase is complete, you can provide the option to set up an account with their Apple ID using Sign in with Apple.
Offer new commerce experiences with App Clips and Apple Pay
App Clips provide streamlined, in-the-moment experiences that help users perform specific tasks without downloading a full app. By combining Apple Pay with App Clips, you can enable exciting new omnichannel commerce experiences that delight customers while increasing sales and conversion.
App Clips enable experiences like:
- Ship to home. Customers can purchase a product in store and have it delivered.
- Pay at the table. Guests can order, view, and pay their bill instantly and with no assistance.
- Ride. Riders can tap to ride scooters, bikes, and more.
- Self checkout. Users can skip the line and pay in stores.
- Donate. Users can donate digitally with just a tap.
Supporting Apple Pay
Countries and Regions
Apple Pay is available for consumers to use in many countries and regions. Merchants in any country or region can accept payments with Apple Pay, as long as their payment service provider supports Apple Pay. In China mainland, Apple Pay on the web is supported in Safari on iOS only.
Cards and Banks
Users need to add a card in Apple Wallet to pay with Apple Pay. Apple Pay supports many of the major credit, debit, and prepaid cards from top banks and card issuers around the world.
E-Commerce Platforms and Payment Service Providers
The most popular e-commerce platforms and payment service providers support Apple Pay in apps and on the web. Using an Apple Pay SDK or JavaScript API from a payment provider is the quickest and most reliable way to support Apple Pay in your app or on your website.
Apple Pay Web Merchant Registration API
Approved e-commerce platform and payment service providers can use the Apple Pay Web Merchant Registration API, along with their merchant IDs, to register and unregister their merchants’ websites for Apple Pay.
Donations
Similar to using Apple Pay to buy goods and services, users can enjoy the convenience and security of Apple Pay when donating money to their favorite charities online. Registered nonprofit organizations that would like to accept donations in their app or website must be approved by Apple.
Web Views within Your App
If your app uses a web-based interface for purchasing goods and services, you can support Apple Pay by moving the request to your app’s native code. If your app uses Safari View Controller to display third-party web content that has integrated Apple Pay, the user will have an opportunity to use Apple Pay as if the content is viewed in Safari.
To integrate Apple Pay into an app that has a web checkout experience, follow these steps.
Transaction Types
Apple Pay supports most E-Commerce transaction types and offers the flexibility to accommodate simple to complex business models. Your payment service provider can help you define the best Apple Pay implementation method to support your business model.
Below are examples of transaction types supported by Apple Pay. Ask your payment service provider which transaction types they support.
Transaction type
Description
Example
Reserve funds on a customer’s account and transfer money to your bank
Online shopping where merchandise is readily available for shipping
Authorization & delayed capture
Reserve funds on a customer’s account and transfer money to your bank later
Pre-order, delivery service with tip, or order online to pick up in store
Authorization & capture with different amount
Reserve funds on a customer’s account and transfer money to your bank once an order is successfully completed for an amount higher or lower than authorized
Divide a purchase into multiple payments for goods that are not shipped together
Multi-item purchase with more than one delivery
Handle repeating payments at a regular frequency and with a fixed amount
Monthly gym membership
Flexible frequency subscription
Handle payments for services where frequency is inconsistent or the user has a choice to vary frequency
Meal subscriptions, where user can skip deliveries, reschedule delivery dates, and change frequency of deliveries
Flexible amount subscription
Handle payments for services where price varies based on consumption
Utility bill, or subscription with a promotion on the first month
Handle payments for services where the user can vary frequency and amount of services received
Meal delivery service with high flexibility
Reverse money for canceled, reimbursed, or disputed transactions
Chargeback, voided transaction, or refund
Verify that the selected card is associated with a cardholder account that is valid and in good standing
$0 or $1 authorizations
Guidelines and Documentation
Design guidelines
Learn how to optimize the design and checkout experience for Apple Pay.
Payment service providers
Support Apple Pay quickly and reliably with an SDK or API from a payment service provider (PSP).
View payment service providers
Contact us
Have a question or request? We can help by phone or email.
Источник