{"title":"Apple Pay express checkout","category":"default","creationDate":1796385374,"content":"<p>You can configure the Apple Pay Component for <a href=\"\/payment-methods\/express-checkout\">express checkout<\/a> to offer your shoppers the option to pay with fewer steps. In the express checkout flow, you request the shopper's billing and shipping information from the Apple Pay sheet, which speeds up the checkout process.<\/p>\n<h2>Requirements<\/h2>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Requirement<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><strong>Integration type<\/strong><\/td>\n<td style=\"text-align: left;\">An Advanced flow <a href=\"\/online-payments\/build-your-integration\/advanced-flow?platform=React%20Native&amp;integration=Components\">React Native Components integration<\/a>, v2.11.0 or later.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Limitations<\/strong><\/td>\n<td style=\"text-align: left;\"><ul><li markdown=\"1\">Apple Pay express checkout is available on iOS only.<\/li><li markdown=\"1\">Coupon codes require iOS 15 or later.<\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Setup steps<\/strong><\/td>\n<td style=\"text-align: left;\">Before you begin, make sure that you have: <ul><li markdown=\"1\">Set up your <a href=\"\/payment-methods\/apple-pay\/react-native-component\">Apple Pay Component integration<\/a>.<\/li><li markdown=\"1\"><a href=\"\/payment-methods\/apple-pay\/apple-pay-certificate\/ios\">Set up Apple Pay with your own certificate<\/a>.<\/li><\/ul><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>How it works<\/h2>\n<p>For express checkout, the shopper completes the payment inside the Apple Pay sheet. You configure the Apple Pay Component with the callbacks that update the sheet as the shopper makes their selections.<\/p>\n<h3>Integration steps<\/h3>\n<p>To offer express checkout with Apple Pay:<\/p>\n<ol>\n<li><a href=\"#configure-apple-pay\">Configure the Apple Pay sheet<\/a>.<\/li>\n<li><a href=\"#shipping-contact-changes\">Configure the callback to handle shipping contact changes<\/a>.<\/li>\n<li><a href=\"#shipping-method-changes\">Configure the callback to handle shipping method changes<\/a>.<\/li>\n<li><a href=\"#coupon-code-changes\">Configure the callback to handle coupon code changes<\/a>.<\/li>\n<li><a href=\"#validate-payment\">Configure the callback to validate the payment<\/a>.<\/li>\n<li><a href=\"#show-button\">Show the Apple Pay button<\/a> on your product or cart screen.<\/li>\n<\/ol>\n<h3>Shopper checkout experience<\/h3>\n<p>When the shopper checks out with Apple Pay:<\/p>\n<ol>\n<li>The shopper selects the Apple Pay button, and the Apple Pay sheet opens.<\/li>\n<li>The shopper selects a shipping contact, selects a shipping method, or enters a coupon code. The Component calls the matching callback each time.<\/li>\n<li>In the callback, you call <code>resolve<\/code> with updated summary items, updated shipping methods, or errors. The Apple Pay sheet shows what you pass.<\/li>\n<li>The shopper authorizes the payment with Face ID or Touch ID. The Component calls <code>onAuthorize<\/code> before the payment is submitted, so that you can run your own checks.<\/li>\n<li>You submit the payment from your server.<\/li>\n<\/ol>\n<div id=\"mermaid-6b12af0747635-wrapper\"><div id=\"mermaid-6b12af0747635\" class=\"mermaid-shortcode loading\">CnNlcXVlbmNlRGlhZ3JhbQogICAgcGFydGljaXBhbnQgU2hvcHBlcgogICAgcGFydGljaXBhbnQgU2hlZXQgYXMgQXBwbGUgUGF5IHNoZWV0CiAgICBwYXJ0aWNpcGFudCBDb21wb25lbnQgYXMgQXBwbGUgUGF5IENvbXBvbmVudAogICAgcGFydGljaXBhbnQgQXBwIGFzIFlvdXIgYXBwCiAgICBwYXJ0aWNpcGFudCBTZXJ2ZXIgYXMgWW91ciBzZXJ2ZXIKICAgIHBhcnRpY2lwYW50IEFkeWVuCgogICAgU2hvcHBlci0+PkFwcDogMS4gU2VsZWN0IHRoZSBBcHBsZSBQYXkgYnV0dG9uCiAgICBBcHAtPj5Db21wb25lbnQ6IFN0YXJ0IHRoZSBDb21wb25lbnQKICAgIENvbXBvbmVudC0+PlNoZWV0OiBPcGVuIHRoZSBBcHBsZSBQYXkgc2hlZXQKICAgIGxvb3AgRWFjaCB0aW1lIHRoZSBzaG9wcGVyIGNoYW5nZXMgYSBzZWxlY3Rpb24KICAgICAgICBTaG9wcGVyLT4+U2hlZXQ6IDIuIFNlbGVjdCBhIHNoaXBwaW5nIGNvbnRhY3Qgb3Igc2hpcHBpbmcgbWV0aG9kLCBvciBlbnRlciBhIGNvdXBvbiBjb2RlCiAgICAgICAgQ29tcG9uZW50LT4+QXBwOiBDYWxsIHRoZSBtYXRjaGluZyBjYWxsYmFjawogICAgICAgIEFwcC0tPj5Db21wb25lbnQ6IDMuIENhbGwgcmVzb2x2ZSB3aXRoIHVwZGF0ZWQgc3VtbWFyeSBpdGVtcywgc2hpcHBpbmcgbWV0aG9kcywgb3IgZXJyb3JzCiAgICAgICAgQ29tcG9uZW50LT4+U2hlZXQ6IFNob3cgdGhlIHVwZGF0ZQogICAgZW5kCiAgICBTaG9wcGVyLT4+U2hlZXQ6IDQuIEF1dGhvcml6ZSB0aGUgcGF5bWVudCB3aXRoIEZhY2UgSUQgb3IgVG91Y2ggSUQKICAgIENvbXBvbmVudC0+PkFwcDogQ2FsbCBvbkF1dGhvcml6ZQogICAgQXBwLS0+PkNvbXBvbmVudDogQ2FsbCBhY3Rpb25zLnJlc29sdmUoKSBvciBhY3Rpb25zLnJlamVjdCgpCiAgICBDb21wb25lbnQtPj5BcHA6IFBheW1lbnQgZGF0YQogICAgQXBwLT4+U2VydmVyOiBQYXltZW50IGRhdGEKICAgIFNlcnZlci0+PkFkeWVuOiA1LiBTdWJtaXQgdGhlIHBheW1lbnQK<\/div><\/div>\n<h2 id=\"configure-apple-pay\">Configure the Apple Pay sheet<\/h2>\n<p>Configure the line items, the shipping methods that you offer, and the shopper details that you require:<\/p>\n<ol>\n<li>\n<p>Create the shipping methods that you offer. Each shipping method is an <code>ApplePayShippingMethod<\/code>:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter<\/th>\n<th style=\"text-align: center;\">Required<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><code>label<\/code><\/td>\n<td style=\"text-align: center;\"><span class=\"hint--bottom\" data-hint=\"Required\" markdown=\"1\"><img style=\"width: 25px;\" alt=\"Required\" src=\"\/media\/732127089c689593ccb0331d565e5773bed94e60145cae96672212374facb8c6.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/span><\/td>\n<td style=\"text-align: left;\">The name of the shipping method that the Apple Pay sheet shows, for example <span translate=\"no\"><strong>Standard shipping<\/strong><\/span>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>amount<\/code><\/td>\n<td style=\"text-align: center;\"><span class=\"hint--bottom\" data-hint=\"Required\" markdown=\"1\"><img style=\"width: 25px;\" alt=\"Required\" src=\"\/media\/732127089c689593ccb0331d565e5773bed94e60145cae96672212374facb8c6.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/span><\/td>\n<td style=\"text-align: left;\">The cost of this shipping method.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>identifier<\/code><\/td>\n<td style=\"text-align: center;\"><span class=\"hint--bottom\" data-hint=\"Recommended\" markdown=\"1\"><img style=\"width: 25px;\" alt=\"Recommended\" src=\"\/media\/51cfe94e37a7426974002173390b3c7807ac234e65206fe14ed9fbdd45fb958e.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/span><\/td>\n<td style=\"text-align: left;\">Your own identifier for this shipping method. The Component returns this value to you in <code>onShippingMethodChange<\/code>, so set it if you need to tell your shipping methods apart.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>detail<\/code><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">A description that the Apple Pay sheet shows under the label, for example the carrier or the delivery time.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>startDate<\/code><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">The earliest delivery date, in ISO 8601 date format.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>endDate<\/code><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">The latest delivery date, in ISO 8601 date format.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>\n<p>Add the following to the <code>applepay<\/code> object in your <code>AdyenCheckout<\/code> configuration, in addition to the <a href=\"\/payment-methods\/apple-pay\/react-native-component\">parameters that every Apple Pay integration needs<\/a>:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter<\/th>\n<th style=\"text-align: center;\">Required<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><a href=\"https:\/\/developer.apple.com\/documentation\/passkit\/pkpaymentrequest\/paymentsummaryitems\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">\n  <code>summaryItems<\/code>\n<\/a><\/td>\n<td style=\"text-align: center;\"><span class=\"hint--bottom\" data-hint=\"Required\" markdown=\"1\"><img style=\"width: 25px;\" alt=\"Required\" src=\"\/media\/732127089c689593ccb0331d565e5773bed94e60145cae96672212374facb8c6.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/span><\/td>\n<td style=\"text-align: left;\">The items that make up the payment. The last item is the total that the Apple Pay sheet shows to the shopper.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><a href=\"https:\/\/developer.apple.com\/documentation\/passkit\/pkpaymentrequest\/shippingmethods\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">\n  <code>shippingMethods<\/code>\n<\/a><\/td>\n<td style=\"text-align: center;\"><span class=\"hint--bottom\" data-hint=\"Required\" markdown=\"1\"><img style=\"width: 25px;\" alt=\"Required\" src=\"\/media\/732127089c689593ccb0331d565e5773bed94e60145cae96672212374facb8c6.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/span><\/td>\n<td style=\"text-align: left;\">The shipping methods that you created in step 1.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><a href=\"https:\/\/developer.apple.com\/documentation\/passkit\/pkpaymentrequest\/requiredshippingcontactfields\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">\n  <code>requiredShippingContactFields<\/code>\n<\/a><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">The shipping fields that you need from the shopper to fulfill the order. Possible values: <span translate=\"no\"><strong>postalAddress<\/strong><\/span>, <span translate=\"no\"><strong>name<\/strong><\/span>, <span translate=\"no\"><strong>phoneticName<\/strong><\/span>, <span translate=\"no\"><strong>phone<\/strong><\/span>, <span translate=\"no\"><strong>email<\/strong><\/span>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>supportsCouponCode<\/code><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">Set to <span translate=\"no\"><strong>true<\/strong><\/span> to show the coupon code field in the Apple Pay sheet. Requires iOS 15 or later.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>couponCode<\/code><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">A coupon code to prefill in the coupon code field.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"notices yellow\">\n<p>Apple Pay amounts are not in minor units. Adyen uses integer minor units, and Apple uses decimal values. Make sure that the last summary item matches the amount that you submit to Adyen.<\/p>\n<\/div>\n<\/li>\n<li>\n<p>Add the callbacks that you want to handle.<\/p>\n<\/li>\n<\/ol>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Configure the Apple Pay sheet'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;ts&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;const applePayConfiguration: ApplePayConfiguration = {\\n  merchantID: 'merchant.com.example',\\n  merchantName: 'Example Store',\\n  summaryItems: [\\n    { label: 'Subtotal', amount: '10.00' },\\n    { label: 'Shipping', amount: '2.00' },\\n    { label: 'Example Store', amount: '12.00' },\\n  ],\\n  shippingMethods: [\\n    { label: 'Standard Shipping', amount: '2.00', identifier: 'standard' },\\n    { label: 'Express Shipping', amount: '5.00', identifier: 'express' },\\n  ],\\n  requiredShippingContactFields: ['postalAddress', 'name', 'email'],\\n  supportsCouponCode: true,\\n  \\\/\\\/ Add the callbacks from the following sections.\\n};\\n\\nconst configuration: Configuration = {\\n  \\\/\\\/ ...Other parameters.\\n  amount: {\\n    currency: 'EUR',\\n    value: 1200 \\\/\\\/ In minor units. Matches the last summary item.\\n  },\\n  applepay: applePayConfiguration\\n};&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2 id=\"shipping-contact-changes\">Configure the callback to handle shipping contact changes<\/h2>\n<p>If the shopper selects or changes their shipping address, offer the shipping methods that you support for that address and recalculate the total:<\/p>\n<ol>\n<li>\n<p>Implement the <code>onShippingContactChange<\/code> callback. It receives the shopper's <code>ApplePayPaymentContact<\/code> and a <code>resolve<\/code> function.<\/p>\n<\/li>\n<li>\n<p>Call <code>resolve<\/code> with an <code>ApplePayShippingContactUpdateRequest<\/code> that contains the following:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter<\/th>\n<th style=\"text-align: center;\">Required<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><code>paymentSummaryItems<\/code><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">The updated summary items. If you omit this, the Component keeps the current items.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>shippingMethods<\/code><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">The shipping methods that you offer for this address. If you omit this, the Component keeps the current methods.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>errors<\/code><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">The <a href=\"#sheet-errors\">errors<\/a> to show in the Apple Pay sheet. The sheet stays open so that the shopper can correct the address.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>To reject an address that you cannot ship to, pass an error instead of new shipping methods.<\/p>\n<\/li>\n<\/ol>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Handle shipping contact changes'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;ts&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;const applePayConfiguration: ApplePayConfiguration = {\\n  \\\/\\\/ ...Other parameters.\\n  onShippingContactChange: (contact, resolve) =&gt; {\\n    if (contact.countryCode !== 'NL') {\\n      resolve({\\n        errors: [\\n          {\\n            type: 'shippingAddress',\\n            field: 'countryCode',\\n            message: 'Shipping is only available in the Netherlands.',\\n          },\\n        ],\\n      });\\n      return;\\n    }\\n\\n    resolve({\\n      paymentSummaryItems: [\\n        { label: 'Subtotal', amount: '10.00' },\\n        { label: 'Shipping', amount: '2.00' },\\n        { label: 'Example Store', amount: '12.00' },\\n      ],\\n      shippingMethods: [\\n        { label: 'Standard Shipping', amount: '2.00', identifier: 'standard' },\\n      ],\\n    });\\n  },\\n};&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2 id=\"shipping-method-changes\">Configure the callback to handle shipping method changes<\/h2>\n<p>If the shopper selects a different shipping method, add the cost of that method to the total:<\/p>\n<ol>\n<li>\n<p>Implement the <code>onShippingMethodChange<\/code> callback. It receives the selected <code>ApplePayShippingMethod<\/code> and a <code>resolve<\/code> function.<\/p>\n<\/li>\n<li>\n<p>Call <code>resolve<\/code> with an <code>ApplePayShippingMethodUpdateRequest<\/code> that contains the following:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter<\/th>\n<th style=\"text-align: center;\">Required<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><code>paymentSummaryItems<\/code><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">The updated summary items, including the cost of the selected shipping method. If you omit this, the Component keeps the current items.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<\/ol>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Handle shipping method changes'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;ts&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;const applePayConfiguration: ApplePayConfiguration = {\\n  \\\/\\\/ ...Other parameters.\\n  onShippingMethodChange: (shippingMethod, resolve) =&gt; {\\n    resolve({\\n      paymentSummaryItems: [\\n        { label: 'Subtotal', amount: '10.00' },\\n        { label: shippingMethod.label, amount: shippingMethod.amount },\\n        { label: 'Example Store', amount: (10 + Number(shippingMethod.amount)).toFixed(2) },\\n      ],\\n    });\\n  },\\n};&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2 id=\"coupon-code-changes\">Configure the callback to handle coupon code changes<\/h2>\n<p>If the shopper enters or changes a coupon code, apply a discount or tell the shopper that the code is not valid:<\/p>\n<ol>\n<li>\n<p>Set <code>supportsCouponCode<\/code> to <span translate=\"no\"><strong>true<\/strong><\/span> to show the coupon code field.<\/p>\n<\/li>\n<li>\n<p>Implement the <code>onCouponCodeChange<\/code> callback. It receives the coupon code and a <code>resolve<\/code> function.<\/p>\n<\/li>\n<li>\n<p>Call <code>resolve<\/code> with an <code>ApplePayCouponCodeUpdateRequest<\/code> that contains the following:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter<\/th>\n<th style=\"text-align: center;\">Required<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><code>paymentSummaryItems<\/code><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">The updated summary items, including the discount. If you omit this, the Component keeps the current items.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>shippingMethods<\/code><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">The shipping methods that you offer with this coupon code applied. If you omit this, the Component keeps the current methods.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>errors<\/code><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">The <a href=\"#sheet-errors\">errors<\/a> to show in the Apple Pay sheet. The sheet stays open so that the shopper can correct the code.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>To reject a code that is not valid, pass an error instead of a discount.<\/p>\n<\/li>\n<\/ol>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Handle coupon code changes'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;ts&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;const applePayConfiguration: ApplePayConfiguration = {\\n  \\\/\\\/ ...Other parameters.\\n  onCouponCodeChange: (couponCode, resolve) =&gt; {\\n    if (couponCode !== 'DISCOUNT10') {\\n      resolve({\\n        errors: [\\n          {\\n            type: 'couponCode',\\n            message: 'Enter a valid coupon code.',\\n          },\\n        ],\\n      });\\n      return;\\n    }\\n\\n    \\\/\\\/ Assumes Standard Shipping. Use the shipping method that the shopper selected.\\n    resolve({\\n      paymentSummaryItems: [\\n        { label: 'Subtotal', amount: '10.00' },\\n        { label: 'Shipping', amount: '2.00' },\\n        { label: 'Discount', amount: '-1.00' },\\n        { label: 'Example Store', amount: '11.00' },\\n      ],\\n    });\\n  },\\n};&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2 id=\"validate-payment\">Configure the callback to validate the payment<\/h2>\n<p>Before the payment is submitted, run your own checks on the shopper details that you collected in the Apple Pay sheet:<\/p>\n<ol>\n<li>\n<p>Implement the <code>onAuthorize<\/code> callback. It receives an <code>ApplePayPaymentAuthorization<\/code>, which contains the billing contact, the shipping contact, and the shipping method that the shopper selected, plus an <code>actions<\/code> object.<\/p>\n<\/li>\n<li>\n<p>Call one of the following on the <code>actions<\/code> object:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Action<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><code>actions.resolve()<\/code><\/td>\n<td style=\"text-align: left;\">Continue with the payment.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>actions.reject(errors)<\/code><\/td>\n<td style=\"text-align: left;\">Stop the payment and show the <a href=\"#sheet-errors\">errors<\/a> in the Apple Pay sheet. The sheet stays open so that the shopper can correct the problem.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<\/ol>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Validate the payment before submission'\" :id=\"''\" :code-data='[{\"language\":\"ts\",\"tabTitle\":\"\",\"content\":\"const applePayConfiguration: ApplePayConfiguration = {\\n  \\\/\\\/ ...Other parameters.\\n  onAuthorize: (_payment, actions) =&gt; {\\n    \\\/\\\/ Use actions.reject(errors) to keep the Apple Pay sheet open\\n    \\\/\\\/ and show validation errors before submitting the payment.\\n    actions.resolve();\\n  },\\n};\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2 id=\"show-button\">Show the Apple Pay button<\/h2>\n<p>Place the Apple Pay button where you want to offer express checkout, for example on your product or cart screen. The shopper selects Apple Pay there instead of going to your checkout, so Apple Pay is already the chosen payment method when the sheet opens.<\/p>\n<p>To show the button:<\/p>\n<ol>\n<li>\n<p>Check that Apple Pay is available on the device. Call <code>AdyenApplePay.isAvailable<\/code>, passing:<\/p>\n<ul>\n<li>The Apple Pay payment method: the object with <code>type<\/code> <span translate=\"no\"><strong>applepay<\/strong><\/span> from your  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/paymentMethods<\/a> response.<\/li>\n<li>Your <code>AdyenCheckout<\/code> configuration.<\/li>\n<\/ul>\n<p>The method resolves to <span translate=\"no\"><strong>true<\/strong><\/span> when the shopper can pay with Apple Pay.<\/p>\n<\/li>\n<li>\n<p>Render an <code>ApplePayButton<\/code> when Apple Pay is available:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter<\/th>\n<th style=\"text-align: center;\">Required<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><code>onPress<\/code><\/td>\n<td style=\"text-align: center;\"><span class=\"hint--bottom\" data-hint=\"Required\" markdown=\"1\"><img style=\"width: 25px;\" alt=\"Required\" src=\"\/media\/732127089c689593ccb0331d565e5773bed94e60145cae96672212374facb8c6.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/span><\/td>\n<td style=\"text-align: left;\">Called when the shopper selects the button. Start the Component from here.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>theme<\/code><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">The button theme. Possible values: <span translate=\"no\"><strong>WHITE<\/strong><\/span>, <span translate=\"no\"><strong>WHITE_OUTLINE<\/strong><\/span>, <span translate=\"no\"><strong>BLACK<\/strong><\/span>, <span translate=\"no\"><strong>AUTOMATIC<\/strong><\/span>. Default: <span translate=\"no\"><strong>WHITE<\/strong><\/span>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>type<\/code><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">The label on the button, for example <span translate=\"no\"><strong>BUY<\/strong><\/span>, <span translate=\"no\"><strong>CHECKOUT<\/strong><\/span>, <span translate=\"no\"><strong>ORDER<\/strong><\/span>, or <span translate=\"no\"><strong>PLAIN<\/strong><\/span>. Default: <span translate=\"no\"><strong>BUY<\/strong><\/span>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>radius<\/code><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">The corner radius of the button.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>style<\/code><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">A React Native style to apply to the button.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>\n<p>In <code>onPress<\/code>, start the Component with the <code>applepay<\/code> payment method type. Use the <code>start<\/code> function from the <code>useAdyenCheckout<\/code> hook.<\/p>\n<\/li>\n<\/ol>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Show the Apple Pay button'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;tsx&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;import { useEffect, useState } from 'react';\\nimport { ApplePayButton, AdyenApplePay, useAdyenCheckout } from '@adyen\\\/react-native';\\n\\n\\\/\\\/ Render this component inside your AdyenCheckout component.\\nconst ApplePayExpressButton = () =&gt; {\\n  const { start, config, paymentMethods } = useAdyenCheckout();\\n  const [applePayAvailable, setApplePayAvailable] = useState(false);\\n\\n  useEffect(() =&gt; {\\n    const applePay = paymentMethods?.paymentMethods?.find(\\n      (x) =&gt; x.type === 'applepay'\\n    );\\n    if (applePay) {\\n      AdyenApplePay.isAvailable(applePay, config)\\n        .then(setApplePayAvailable)\\n        .catch(console.error);\\n    }\\n  }, [paymentMethods, config]);\\n\\n  if (!applePayAvailable) {\\n    return null;\\n  }\\n\\n  return (\\n    &lt;ApplePayButton\\n      theme=\\&quot;BLACK\\&quot;\\n      type=\\&quot;BUY\\&quot;\\n      onPress={() =&gt; {\\n        start('applepay');\\n      }}\\n    \\\/&gt;\\n  );\\n};&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2 id=\"test-and-go-live\">Test and go live<\/h2>\n<p>Use Apple's test\u00a0card numbers\u00a0to\u00a0test your integration.<\/p>\n<p>For a full list of test cards and instructions how to add these to your test device, see <a href=\"https:\/\/developer.apple.com\/apple-pay\/sandbox-testing\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Sandbox testing<\/a>\u00a0on\u00a0Apple's Developer website.<\/p>\n<p> <\/p>\n<p>Check the status of an Apple Pay test payment in your\u00a0<a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Customer Area<\/a>\u00a0&gt;\u00a0<strong>Payments<\/strong>\u00a0&gt; <strong>Payment list<\/strong>.<\/p>\n<h3>Going live<\/h3>\n<p>To process live Apple Pay payments, your API credential needs to have the <strong>API Clientside Encryption Payments role<\/strong>. You can check this in your <a href=\"https:\/\/ca-live.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">live Customer Area<\/a> or ask your Admin user to verify.<\/p>\n<p> <\/p>\n<p><a href=\"\/payment-methods\/apple-pay\/apple-pay-certificate\/ios\">Set up Apple Pay<\/a> on your Apple Pay Developer account for your live merchant identifier.<\/p>\n<h2 id=\"sheet-errors\">Apple Pay sheet errors<\/h2>\n<p>Use an <code>ApplePayError<\/code> to tell the shopper what to correct. The Apple Pay sheet stays open and highlights the field that you specify.<\/p>\n<div class=\"sticky-table-container\">\n    \n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter<\/th>\n<th style=\"text-align: center;\">Required<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><code>type<\/code><\/td>\n<td style=\"text-align: center;\"><span class=\"hint--bottom\" data-hint=\"Required\" markdown=\"1\"><img style=\"width: 25px;\" alt=\"Required\" src=\"\/media\/732127089c689593ccb0331d565e5773bed94e60145cae96672212374facb8c6.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/span><\/td>\n<td style=\"text-align: left;\">The <a href=\"#error-types\">kind of error<\/a>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>message<\/code><\/td>\n<td style=\"text-align: center;\"><span class=\"hint--bottom\" data-hint=\"Required\" markdown=\"1\"><img style=\"width: 25px;\" alt=\"Required\" src=\"\/media\/732127089c689593ccb0331d565e5773bed94e60145cae96672212374facb8c6.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/span><\/td>\n<td style=\"text-align: left;\">The message that the Apple Pay sheet shows to the shopper. Translate this into the shopper's language.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>field<\/code><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">The <a href=\"#error-fields\">field that is not valid<\/a>. The Apple Pay sheet highlights this field.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n<\/div>\n\n<h3 id=\"error-types\">Error types<\/h3>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Value<\/th>\n<th style=\"text-align: left;\">Use when<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>shippingAddress<\/strong><\/span><\/td>\n<td style=\"text-align: left;\">A field in the shipping address is not valid.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>billingAddress<\/strong><\/span><\/td>\n<td style=\"text-align: left;\">A field in the billing address is not valid.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>contactField<\/strong><\/span><\/td>\n<td style=\"text-align: left;\">A contact field, such as the email address or the phone number, is not valid.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>couponCode<\/strong><\/span><\/td>\n<td style=\"text-align: left;\">The coupon code is not valid.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"error-fields\">Error fields<\/h3>\n<p>Set <code>field<\/code> to the part of the address or the contact that the shopper must correct. The value depends on the error type:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Error type<\/th>\n<th style=\"text-align: left;\">Set <code>field<\/code> to<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>shippingAddress<\/strong><\/span> or <span translate=\"no\"><strong>billingAddress<\/strong><\/span><\/td>\n<td style=\"text-align: left;\">A <code>CNPostalAddress<\/code> key, for example <span translate=\"no\"><strong>postalCode<\/strong><\/span>, <span translate=\"no\"><strong>city<\/strong><\/span>, <span translate=\"no\"><strong>street<\/strong><\/span>, <span translate=\"no\"><strong>country<\/strong><\/span>, or <span translate=\"no\"><strong>countryCode<\/strong><\/span>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>contactField<\/strong><\/span><\/td>\n<td style=\"text-align: left;\">A <code>PKContactField<\/code> name, for example <span translate=\"no\"><strong>phoneNumber<\/strong><\/span>, <span translate=\"no\"><strong>emailAddress<\/strong><\/span>, <span translate=\"no\"><strong>name<\/strong><\/span>, or <span translate=\"no\"><strong>postalAddress<\/strong><\/span>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Code samples<\/h2>\n<p>The following code samples show the steps on this page in full.<\/p>\n<div class=\"accordion-shortcode adl-accordion adl-accordion--max-height-transition\" data-expand=\"true\" data-ignore=\"anchorjs-link\">\n    \n    <div class=\"adl-accordion__item\" style=\"\">\n        <div tabindex=\"0\" role=\"item\" aria-expanded=\"false\" class=\"adl-accordion__header\">\n            <i class=\"adl-accordion__toggle adl-icon-chevron-down\"><\/i>\n            <div class=\"adl-accordion__title-wrapper\" data-accordion=\"#type-script\">\n                                    <h3 class=\"adl-accordion__title\">TypeScript<\/h3>\n                            <\/div>\n        <\/div>\n        <div role=\"region\" class=\"adl-accordion__content\">\n            \n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Component implementation example'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;ts&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;\\\/\\\/ Step 1: Configure the Apple Pay sheet.\\n\\nconst applePayConfiguration: ApplePayConfiguration = {\\n  merchantID: 'merchant.com.example',\\n  merchantName: 'Example Store',\\n  summaryItems: [\\n    { label: 'Subtotal', amount: '10.00' },\\n    { label: 'Shipping', amount: '2.00' },\\n    { label: 'Example Store', amount: '12.00' },\\n  ],\\n  shippingMethods: [\\n    { label: 'Standard Shipping', amount: '2.00', identifier: 'standard' },\\n    { label: 'Express Shipping', amount: '5.00', identifier: 'express' },\\n  ],\\n  requiredShippingContactFields: ['postalAddress', 'name', 'email'],\\n  supportsCouponCode: true,\\n\\n\\\/\\\/ Step 2: Configure the callback to handle shipping contact changes.\\n\\n  onShippingContactChange: (contact, resolve) =&gt; {\\n    if (contact.countryCode !== 'NL') {\\n      resolve({\\n        errors: [\\n          {\\n            type: 'shippingAddress',\\n            field: 'countryCode',\\n            message: 'Shipping is only available in the Netherlands.',\\n          },\\n        ],\\n      });\\n      return;\\n    }\\n\\n    resolve({\\n      paymentSummaryItems: [\\n        { label: 'Subtotal', amount: '10.00' },\\n        { label: 'Shipping', amount: '2.00' },\\n        { label: 'Example Store', amount: '12.00' },\\n      ],\\n      shippingMethods: [\\n        { label: 'Standard Shipping', amount: '2.00', identifier: 'standard' },\\n      ],\\n    });\\n  },\\n\\n\\\/\\\/ Step 3: Configure the callback to handle shipping method changes.\\n\\n  onShippingMethodChange: (shippingMethod, resolve) =&gt; {\\n    resolve({\\n      paymentSummaryItems: [\\n        { label: 'Subtotal', amount: '10.00' },\\n        { label: shippingMethod.label, amount: shippingMethod.amount },\\n        { label: 'Example Store', amount: (10 + Number(shippingMethod.amount)).toFixed(2) },\\n      ],\\n    });\\n  },\\n\\n\\\/\\\/ Step 4: Configure the callback to handle coupon code changes.\\n\\n  onCouponCodeChange: (couponCode, resolve) =&gt; {\\n    if (couponCode !== 'DISCOUNT10') {\\n      resolve({\\n        errors: [\\n          {\\n            type: 'couponCode',\\n            message: 'Enter a valid coupon code.',\\n          },\\n        ],\\n      });\\n      return;\\n    }\\n\\n    \\\/\\\/ Assumes Standard Shipping. Use the shipping method that the shopper selected.\\n    resolve({\\n      paymentSummaryItems: [\\n        { label: 'Subtotal', amount: '10.00' },\\n        { label: 'Shipping', amount: '2.00' },\\n        { label: 'Discount', amount: '-1.00' },\\n        { label: 'Example Store', amount: '11.00' },\\n      ],\\n    });\\n  },\\n\\n\\\/\\\/ Step 5: Configure the callback to validate the payment.\\n\\n  onAuthorize: (_payment, actions) =&gt; {\\n    \\\/\\\/ Use actions.reject(errors) to keep the Apple Pay sheet open\\n    \\\/\\\/ and show validation errors before submitting the payment.\\n    actions.resolve();\\n  },\\n};\\n\\nconst configuration: Configuration = {\\n  environment: 'test', \\\/\\\/ When you are ready to accept real payments, change the value to a suitable live environment.\\n  clientKey: 'YOUR_CLIENT_KEY',\\n  returnUrl: 'your-app:\\\/\\\/',\\n  countryCode: 'NL',\\n  amount: {\\n    currency: 'EUR',\\n    value: 1200 \\\/\\\/ In minor units. Matches the last summary item.\\n  },\\n  applepay: applePayConfiguration\\n};&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Show the Apple Pay button'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;tsx&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;\\\/\\\/ Step 6: Show the Apple Pay button on your product or cart screen.\\n\\nimport { useEffect, useState } from 'react';\\nimport { ApplePayButton, AdyenApplePay, useAdyenCheckout } from '@adyen\\\/react-native';\\n\\n\\\/\\\/ Render this component inside your AdyenCheckout component.\\nconst ApplePayExpressButton = () =&gt; {\\n  const { start, config, paymentMethods } = useAdyenCheckout();\\n  const [applePayAvailable, setApplePayAvailable] = useState(false);\\n\\n  useEffect(() =&gt; {\\n    const applePay = paymentMethods?.paymentMethods?.find(\\n      (x) =&gt; x.type === 'applepay'\\n    );\\n    if (applePay) {\\n      AdyenApplePay.isAvailable(applePay, config)\\n        .then(setApplePayAvailable)\\n        .catch(console.error);\\n    }\\n  }, [paymentMethods, config]);\\n\\n  if (!applePayAvailable) {\\n    return null;\\n  }\\n\\n  return (\\n    &lt;ApplePayButton\\n      theme=\\&quot;BLACK\\&quot;\\n      type=\\&quot;BUY\\&quot;\\n      onPress={() =&gt; {\\n        start('applepay');\\n      }}\\n    \\\/&gt;\\n  );\\n};&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n\n        <\/div>\n    <\/div>\n<\/div>\n\n<h2 id=\"see-also\">See also<\/h2>\n<div class=\"see-also-links output-inline\" id=\"see-also\">\n<ul><li><a href=\"\/payment-methods\/apple-pay\/react-native-component\"\n                        target=\"_self\"\n                        >\n                    Apple Pay Component integration\n                <\/a><\/li><li><a href=\"\/payment-methods\/express-checkout\"\n                        target=\"_self\"\n                        >\n                    Express checkout\n                <\/a><\/li><li><a href=\"\/payment-methods\/apple-pay\/handle-apple-pay-errors\"\n                        target=\"_self\"\n                        >\n                    Handle Apple Pay errors\n                <\/a><\/li><li><a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/overview\"\n                        target=\"_blank\"\n                         class=\"external\">\n                    API Explorer\n                <\/a><\/li><\/ul><\/div>\n","url":"https:\/\/docs.adyen.com\/payment-methods\/apple-pay\/react-native-component\/express-checkout","articleFields":{"description":"Configure the Apple Pay Component for express checkout in your React Native app.","feedback_component":true,"filters_component":false,"parameters":{"integration_guide_url":"\/build-your-integration\/advanced-flow?platform=React%20Native&integration=Components"}},"algolia":{"url":"https:\/\/docs.adyen.com\/payment-methods\/apple-pay\/react-native-component\/express-checkout","title":"Apple Pay express checkout","content":"You can configure the Apple Pay Component for express checkout to offer your shoppers the option to pay with fewer steps. In the express checkout flow, you request the shopper's billing and shipping information from the Apple Pay sheet, which speeds up the checkout process.\nRequirements\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nAn Advanced flow React Native Components integration, v2.11.0 or later.\n\n\nLimitations\nApple Pay express checkout is available on iOS only.Coupon codes require iOS 15 or later.\n\n\nSetup steps\nBefore you begin, make sure that you have: Set up your Apple Pay Component integration.Set up Apple Pay with your own certificate.\n\n\n\nHow it works\nFor express checkout, the shopper completes the payment inside the Apple Pay sheet. You configure the Apple Pay Component with the callbacks that update the sheet as the shopper makes their selections.\nIntegration steps\nTo offer express checkout with Apple Pay:\n\nConfigure the Apple Pay sheet.\nConfigure the callback to handle shipping contact changes.\nConfigure the callback to handle shipping method changes.\nConfigure the callback to handle coupon code changes.\nConfigure the callback to validate the payment.\nShow the Apple Pay button on your product or cart screen.\n\nShopper checkout experience\nWhen the shopper checks out with Apple Pay:\n\nThe shopper selects the Apple Pay button, and the Apple Pay sheet opens.\nThe shopper selects a shipping contact, selects a shipping method, or enters a coupon code. The Component calls the matching callback each time.\nIn the callback, you call resolve with updated summary items, updated shipping methods, or errors. The Apple Pay sheet shows what you pass.\nThe shopper authorizes the payment with Face ID or Touch ID. The Component calls onAuthorize before the payment is submitted, so that you can run your own checks.\nYou submit the payment from your server.\n\nCnNlcXVlbmNlRGlhZ3JhbQogICAgcGFydGljaXBhbnQgU2hvcHBlcgogICAgcGFydGljaXBhbnQgU2hlZXQgYXMgQXBwbGUgUGF5IHNoZWV0CiAgICBwYXJ0aWNpcGFudCBDb21wb25lbnQgYXMgQXBwbGUgUGF5IENvbXBvbmVudAogICAgcGFydGljaXBhbnQgQXBwIGFzIFlvdXIgYXBwCiAgICBwYXJ0aWNpcGFudCBTZXJ2ZXIgYXMgWW91ciBzZXJ2ZXIKICAgIHBhcnRpY2lwYW50IEFkeWVuCgogICAgU2hvcHBlci0+PkFwcDogMS4gU2VsZWN0IHRoZSBBcHBsZSBQYXkgYnV0dG9uCiAgICBBcHAtPj5Db21wb25lbnQ6IFN0YXJ0IHRoZSBDb21wb25lbnQKICAgIENvbXBvbmVudC0+PlNoZWV0OiBPcGVuIHRoZSBBcHBsZSBQYXkgc2hlZXQKICAgIGxvb3AgRWFjaCB0aW1lIHRoZSBzaG9wcGVyIGNoYW5nZXMgYSBzZWxlY3Rpb24KICAgICAgICBTaG9wcGVyLT4+U2hlZXQ6IDIuIFNlbGVjdCBhIHNoaXBwaW5nIGNvbnRhY3Qgb3Igc2hpcHBpbmcgbWV0aG9kLCBvciBlbnRlciBhIGNvdXBvbiBjb2RlCiAgICAgICAgQ29tcG9uZW50LT4+QXBwOiBDYWxsIHRoZSBtYXRjaGluZyBjYWxsYmFjawogICAgICAgIEFwcC0tPj5Db21wb25lbnQ6IDMuIENhbGwgcmVzb2x2ZSB3aXRoIHVwZGF0ZWQgc3VtbWFyeSBpdGVtcywgc2hpcHBpbmcgbWV0aG9kcywgb3IgZXJyb3JzCiAgICAgICAgQ29tcG9uZW50LT4+U2hlZXQ6IFNob3cgdGhlIHVwZGF0ZQogICAgZW5kCiAgICBTaG9wcGVyLT4+U2hlZXQ6IDQuIEF1dGhvcml6ZSB0aGUgcGF5bWVudCB3aXRoIEZhY2UgSUQgb3IgVG91Y2ggSUQKICAgIENvbXBvbmVudC0+PkFwcDogQ2FsbCBvbkF1dGhvcml6ZQogICAgQXBwLS0+PkNvbXBvbmVudDogQ2FsbCBhY3Rpb25zLnJlc29sdmUoKSBvciBhY3Rpb25zLnJlamVjdCgpCiAgICBDb21wb25lbnQtPj5BcHA6IFBheW1lbnQgZGF0YQogICAgQXBwLT4+U2VydmVyOiBQYXltZW50IGRhdGEKICAgIFNlcnZlci0+PkFkeWVuOiA1LiBTdWJtaXQgdGhlIHBheW1lbnQK\nConfigure the Apple Pay sheet\nConfigure the line items, the shipping methods that you offer, and the shopper details that you require:\n\n\nCreate the shipping methods that you offer. Each shipping method is an ApplePayShippingMethod:\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\nlabel\n\nThe name of the shipping method that the Apple Pay sheet shows, for example Standard shipping.\n\n\namount\n\nThe cost of this shipping method.\n\n\nidentifier\n\nYour own identifier for this shipping method. The Component returns this value to you in onShippingMethodChange, so set it if you need to tell your shipping methods apart.\n\n\ndetail\n\nA description that the Apple Pay sheet shows under the label, for example the carrier or the delivery time.\n\n\nstartDate\n\nThe earliest delivery date, in ISO 8601 date format.\n\n\nendDate\n\nThe latest delivery date, in ISO 8601 date format.\n\n\n\n\n\nAdd the following to the applepay object in your AdyenCheckout configuration, in addition to the parameters that every Apple Pay integration needs:\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\n\n  summaryItems\n\n\nThe items that make up the payment. The last item is the total that the Apple Pay sheet shows to the shopper.\n\n\n\n  shippingMethods\n\n\nThe shipping methods that you created in step 1.\n\n\n\n  requiredShippingContactFields\n\n\nThe shipping fields that you need from the shopper to fulfill the order. Possible values: postalAddress, name, phoneticName, phone, email.\n\n\nsupportsCouponCode\n\nSet to true to show the coupon code field in the Apple Pay sheet. Requires iOS 15 or later.\n\n\ncouponCode\n\nA coupon code to prefill in the coupon code field.\n\n\n\n\nApple Pay amounts are not in minor units. Adyen uses integer minor units, and Apple uses decimal values. Make sure that the last summary item matches the amount that you submit to Adyen.\n\n\n\nAdd the callbacks that you want to handle.\n\n\n\n    \n\nConfigure the callback to handle shipping contact changes\nIf the shopper selects or changes their shipping address, offer the shipping methods that you support for that address and recalculate the total:\n\n\nImplement the onShippingContactChange callback. It receives the shopper's ApplePayPaymentContact and a resolve function.\n\n\nCall resolve with an ApplePayShippingContactUpdateRequest that contains the following:\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\npaymentSummaryItems\n\nThe updated summary items. If you omit this, the Component keeps the current items.\n\n\nshippingMethods\n\nThe shipping methods that you offer for this address. If you omit this, the Component keeps the current methods.\n\n\nerrors\n\nThe errors to show in the Apple Pay sheet. The sheet stays open so that the shopper can correct the address.\n\n\n\nTo reject an address that you cannot ship to, pass an error instead of new shipping methods.\n\n\n\n    \n\nConfigure the callback to handle shipping method changes\nIf the shopper selects a different shipping method, add the cost of that method to the total:\n\n\nImplement the onShippingMethodChange callback. It receives the selected ApplePayShippingMethod and a resolve function.\n\n\nCall resolve with an ApplePayShippingMethodUpdateRequest that contains the following:\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\npaymentSummaryItems\n\nThe updated summary items, including the cost of the selected shipping method. If you omit this, the Component keeps the current items.\n\n\n\n\n\n\n    \n\nConfigure the callback to handle coupon code changes\nIf the shopper enters or changes a coupon code, apply a discount or tell the shopper that the code is not valid:\n\n\nSet supportsCouponCode to true to show the coupon code field.\n\n\nImplement the onCouponCodeChange callback. It receives the coupon code and a resolve function.\n\n\nCall resolve with an ApplePayCouponCodeUpdateRequest that contains the following:\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\npaymentSummaryItems\n\nThe updated summary items, including the discount. If you omit this, the Component keeps the current items.\n\n\nshippingMethods\n\nThe shipping methods that you offer with this coupon code applied. If you omit this, the Component keeps the current methods.\n\n\nerrors\n\nThe errors to show in the Apple Pay sheet. The sheet stays open so that the shopper can correct the code.\n\n\n\nTo reject a code that is not valid, pass an error instead of a discount.\n\n\n\n    \n\nConfigure the callback to validate the payment\nBefore the payment is submitted, run your own checks on the shopper details that you collected in the Apple Pay sheet:\n\n\nImplement the onAuthorize callback. It receives an ApplePayPaymentAuthorization, which contains the billing contact, the shipping contact, and the shipping method that the shopper selected, plus an actions object.\n\n\nCall one of the following on the actions object:\n\n\n\nAction\nDescription\n\n\n\n\nactions.resolve()\nContinue with the payment.\n\n\nactions.reject(errors)\nStop the payment and show the errors in the Apple Pay sheet. The sheet stays open so that the shopper can correct the problem.\n\n\n\n\n\n\n    \n\nShow the Apple Pay button\nPlace the Apple Pay button where you want to offer express checkout, for example on your product or cart screen. The shopper selects Apple Pay there instead of going to your checkout, so Apple Pay is already the chosen payment method when the sheet opens.\nTo show the button:\n\n\nCheck that Apple Pay is available on the device. Call AdyenApplePay.isAvailable, passing:\n\nThe Apple Pay payment method: the object with type applepay from your  \/paymentMethods response.\nYour AdyenCheckout configuration.\n\nThe method resolves to true when the shopper can pay with Apple Pay.\n\n\nRender an ApplePayButton when Apple Pay is available:\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\nonPress\n\nCalled when the shopper selects the button. Start the Component from here.\n\n\ntheme\n\nThe button theme. Possible values: WHITE, WHITE_OUTLINE, BLACK, AUTOMATIC. Default: WHITE.\n\n\ntype\n\nThe label on the button, for example BUY, CHECKOUT, ORDER, or PLAIN. Default: BUY.\n\n\nradius\n\nThe corner radius of the button.\n\n\nstyle\n\nA React Native style to apply to the button.\n\n\n\n\n\nIn onPress, start the Component with the applepay payment method type. Use the start function from the useAdyenCheckout hook.\n\n\n\n    \n\nTest and go live\nUse Apple's test\u00a0card numbers\u00a0to\u00a0test your integration.\nFor a full list of test cards and instructions how to add these to your test device, see Sandbox testing\u00a0on\u00a0Apple's Developer website.\n \nCheck the status of an Apple Pay test payment in your\u00a0Customer Area\u00a0&gt;\u00a0Payments\u00a0&gt; Payment list.\nGoing live\nTo process live Apple Pay payments, your API credential needs to have the API Clientside Encryption Payments role. You can check this in your live Customer Area or ask your Admin user to verify.\n \nSet up Apple Pay on your Apple Pay Developer account for your live merchant identifier.\nApple Pay sheet errors\nUse an ApplePayError to tell the shopper what to correct. The Apple Pay sheet stays open and highlights the field that you specify.\n\n    \n\n\n\nParameter\nRequired\nDescription\n\n\n\n\ntype\n\nThe kind of error.\n\n\nmessage\n\nThe message that the Apple Pay sheet shows to the shopper. Translate this into the shopper's language.\n\n\nfield\n\nThe field that is not valid. The Apple Pay sheet highlights this field.\n\n\n\n\n\n\nError types\n\n\n\nValue\nUse when\n\n\n\n\nshippingAddress\nA field in the shipping address is not valid.\n\n\nbillingAddress\nA field in the billing address is not valid.\n\n\ncontactField\nA contact field, such as the email address or the phone number, is not valid.\n\n\ncouponCode\nThe coupon code is not valid.\n\n\n\nError fields\nSet field to the part of the address or the contact that the shopper must correct. The value depends on the error type:\n\n\n\nError type\nSet field to\n\n\n\n\nshippingAddress or billingAddress\nA CNPostalAddress key, for example postalCode, city, street, country, or countryCode.\n\n\ncontactField\nA PKContactField name, for example phoneNumber, emailAddress, name, or postalAddress.\n\n\n\nCode samples\nThe following code samples show the steps on this page in full.\n\n    \n    \n        \n            \n            \n                                    TypeScript\n                            \n        \n        \n            \n\n    \n\n\n    \n\n\n        \n    \n\n\nSee also\n\n\n                    Apple Pay Component integration\n                \n                    Express checkout\n                \n                    Handle Apple Pay errors\n                \n                    API Explorer\n                \n","type":"page","locale":"en","boost":16,"hierarchy":{"lvl0":"Home","lvl1":"Payment methods","lvl2":"Apple Pay","lvl3":"Apple Pay Component integration","lvl4":"Apple Pay express checkout"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/","lvl1":"https:\/\/docs.adyen.com\/payment-methods","lvl2":"https:\/\/docs.adyen.com\/payment-methods\/apple-pay","lvl3":"https:\/\/docs.adyen.com\/payment-methods\/apple-pay\/react-native-component","lvl4":"\/payment-methods\/apple-pay\/react-native-component\/express-checkout"},"levels":5,"category":"Payment method","category_color":"green","tags":["Apple","express","checkout"]}}
