{"title":"Out-of-app payments on iOS","category":"default","creationDate":1568794800,"content":"<p><a href=\"https:\/\/developer.apple.com\/news\/?id=9txfddzf\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Apple's updated App Review Guidelines<\/a> allow linking to an external website from your app to let your users complete their payments for in-app purchases. This enables you to have more control over your payment flows.<\/p>\n<h2>Requirements<\/h2>\n<p>Before you begin, take into account the following requirements, limitations, and preparations.<\/p>\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;\">To redirect shoppers from your app to the browser to complete payments, you need one of the following setups: <ul><li>A <a href=\"\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=Drop-in&amp;version=latest\" target=\"_blank\">Web Drop-in\/Components or API-only integration that uses the Advanced flow<\/a> integration <\/li><li> A <a href=\"\/online-payments\/build-your-integration\/sessions-flow\/?platform=Web&amp;integration=Drop-in&amp;version=latest\" target=\"_blank\">Web Drop-in\/Components integration that uses the Sessions flow<\/a> <\/li><li> A <a href=\"\/online-payments\/build-your-integration\/sessions-flow\/?platform=Web&amp;integration=Hosted%20Checkout\" target=\"_blank\">Hosted Checkout<\/a> integration <\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong><a href=\"\/development-resources\/api-credentials\/roles\/\" target=\"_blank\">API credential roles<\/a><\/strong><\/td>\n<td style=\"text-align: left;\">Make sure that your API credential has the <strong>Checkout webservice role<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong><a href=\"\/development-resources\/webhooks\/\" target=\"_blank\">Webhooks<\/a><\/strong><\/td>\n<td style=\"text-align: left;\">Subscribe to Standard webhooks.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Limitations<\/strong><\/td>\n<td style=\"text-align: left;\"><ul><li>We only recommend to use this solution if you are based in the United States (US), or if you are based in another country\/region, but accept payments in the US App Store for digital goods and services. For other types of purchases, use our native iOS Drop-in\/Components solution with the <a href=\"\/online-payments\/build-your-integration\/sessions-flow\/?platform=iOS&amp;integration=Drop-in&amp;version=latest\" target=\"_blank\">Sessions<\/a> or <a href=\"\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=Drop-in&amp;version=latest\" target=\"_blank\">Advanced<\/a> flow.   <\/li><li> If you redirect your shoppers to a website to accept subscription payments, you need to manage subscriptions yourself. See our <a href=\"\/online-payments\/tokenization\" target=\"_blank\">Tokenization<\/a> documentation to learn more about subscription payments. <\/li><\/ul><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>How it works<\/h2>\n<ol>\n<li>You offer in-app purchases in your native iOS app.<\/li>\n<li>The shopper selects the option to make a purchase, for example by selecting a button in your app.<\/li>\n<li>You redirect the shopper to a website where they can complete the payment.<\/li>\n<li>The shopper completes their payment on the website.<\/li>\n<li>You redirect the shopper back to your app, and show them a purchase confirmation.<\/li>\n<\/ol>\n<p>To let your shoppers pay on a website, you can use a Web integration, or our Hosted Checkout solution.<\/p>\n<div class=\"hint--right\" data-hint=\"Click to enlarge - Out-of-app payment\">\n<p><a rel=\"lightbox\" href=\"\/user\/pages\/docs\/02.online-payments\/45.out-of-app-payments-on-ios\/how_it_works_iOS.png\" src=\"\">\n  <img alt=\"\" src=\"\/user\/pages\/docs\/02.online-payments\/45.out-of-app-payments-on-ios\/how_it_works_iOS.png\" \/>\n<\/a><\/p>\n<\/div>\n<h2>Redirect your shoppers for an out-of-app payment<\/h2>\n<p>We offer two solutions to redirect your shoppers to an external website in a mobile browser from your iOS app to complete their payment:<\/p>\n<ul>\n<li><strong>Web Drop-in\/Components<\/strong>: redirect your shoppers to your existing web checkout page in the mobile browser. This option requires you to build your own Web integration with Adyen, and implement your own logic to return the shopper back to your app.<\/li>\n<li><strong>Hosted Checkout<\/strong>: redirect the shopper to an Adyen-hosted website where they make the payment. This option requires lower development effort, and the shopper is automatically redirected back to your app after they complete the payment.<\/li>\n<\/ul>\n<p>Refer to our <a href=\"\/online-payments\/build-your-integration\/sessions-flow\/?platform=Web&amp;integration=Hosted%20Checkout#start-integrating-with-web-hosted-checkout\" target=\"_blank\">comparison of Hosted Checkout and Web integrations<\/a> to learn more about the differences between the solutions.<\/p>\n\n<div id=\"tabgB591\">\n    <div data-component-wrapper=\"tabs\">\n        <tabs\n                        :items=\"[{&quot;title&quot;:&quot;Web Drop-in\\\/Components&quot;,&quot;content&quot;:&quot;\\n&lt;p&gt;You can choose the &lt;a href=\\&quot;\\\/online-payments\\\/build-your-integration#choose-your-server-side-implementation\\&quot; target=\\&quot;_blank\\&quot;&gt;server-side flow&lt;\\\/a&gt; that you want to implement and use our guides to integrate with Web Drop-in\\\/Components for the &lt;a href=\\&quot;\\\/online-payments\\\/build-your-integration\\\/sessions-flow\\\/?platform=Web&amp;amp;integration=Drop-in&amp;amp;version=latest\\&quot; target=\\&quot;_blank\\&quot;&gt;Sessions flow&lt;\\\/a&gt; or the &lt;a href=\\&quot;\\\/online-payments\\\/build-your-integration\\\/advanced-flow\\\/?platform=Web&amp;amp;integration=Drop-in&amp;amp;version=latest\\&quot; target=\\&quot;_blank\\&quot;&gt;Advanced flow&lt;\\\/a&gt;.&lt;\\\/p&gt;\\n&lt;p&gt;To accept out-of-app payments with our Web Drop-in\\\/Components:&lt;\\\/p&gt;\\n&lt;ol&gt;\\n&lt;li&gt;When your shopper proceeds to make a purchase in your app, for example by selecting &lt;strong&gt;Buy&lt;\\\/strong&gt;, redirect your shopper to your existing checkout page in a mobile browser.&lt;\\\/li&gt;\\n&lt;li&gt;Display the payment details for the in-app purchase on your checkout page.&lt;\\\/li&gt;\\n&lt;li&gt;When the shopper proceeds to pay, handle the payment flow. Depending on your server-side flow, this consists of either:\\n&lt;ul&gt;\\n&lt;li&gt;A single  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/sessions\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\\/sessions&lt;\\\/a&gt; request.&lt;\\\/li&gt;\\n&lt;li&gt;Subsequent  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/paymentMethods\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\\/paymentMethods&lt;\\\/a&gt;,  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\\/payments&lt;\\\/a&gt;, and  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments\\\/details\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\\/payments\\\/details&lt;\\\/a&gt; requests.&lt;\\\/li&gt;\\n&lt;\\\/ul&gt;&lt;\\\/li&gt;\\n&lt;li&gt;After the shopper completes the payment flow on your website, redirect them to your app. We recommend to implement a logic that automatically redirects your shoppers upon payment completion. Alternatively, implement a button for your shoppers to select when they want to go back to your app.&lt;\\\/li&gt;\\n&lt;li&gt;Get the payment outcome in an AUTHORISATION webhook.&lt;\\\/li&gt;\\n&lt;\\\/ol&gt;\\n&quot;,&quot;altTitle&quot;:null,&quot;oldTabId&quot;:&quot;web_drop-incomponents_0_1&quot;,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;Hosted Checkout&quot;,&quot;content&quot;:&quot;\\n&lt;p&gt;Use our &lt;a href=\\&quot;\\\/online-payments\\\/build-your-integration\\\/sessions-flow\\\/?platform=Web&amp;amp;integration=Hosted%20Checkout\\&quot; target=\\&quot;_blank\\&quot;&gt;Hosted Checkout guide&lt;\\\/a&gt; to build your integration. The payment flow for out-of-app payments with Hosted Checkout is as follows:&lt;\\\/p&gt;\\n&lt;ol&gt;\\n&lt;li&gt;When your shopper proceeds to make a purchase in your app, for example by selecting &lt;strong&gt;Buy&lt;\\\/strong&gt;, make a  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/sessions\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\\/sessions&lt;\\\/a&gt; request.&lt;\\\/li&gt;\\n&lt;li&gt;In the  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/sessions\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\\/sessions&lt;\\\/a&gt; request, specify your app URL in the &lt;code&gt;returnUrl&lt;\\\/code&gt; field.\\n&lt;ul&gt;\\n&lt;li&gt;Use the custom URL for your app, for example, &lt;code&gt;my-app:\\\/\\\/adyen&lt;\\\/code&gt;, to take the shopper back to your app after they complete the payment outside your app. For more information on setting a custom URL scheme, read the &lt;a href=\\&quot;https:\\\/\\\/developer.apple.com\\\/documentation\\\/xcode\\\/defining-a-custom-url-scheme-for-your-app\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Apple Developer documentation&lt;\\\/a&gt;.&lt;\\\/li&gt;\\n&lt;\\\/ul&gt;&lt;\\\/li&gt;\\n&lt;li&gt;From the  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/sessions\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\\/sessions&lt;\\\/a&gt; response, save the URL for the Hosted Checkout page.&lt;\\\/li&gt;\\n&lt;li&gt;Redirect your shopper from your app to the URL for the Hosted Checkout page you saved in the previous step.&lt;br \\\/&gt;\\nAfter your shopper completes the payment on the Hosted Checkout page, your shopper is redirected to your app using the &lt;code&gt;returnUrl&lt;\\\/code&gt; you specified in your  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/sessions\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\\/sessions&lt;\\\/a&gt; request.&lt;\\\/li&gt;\\n&lt;li&gt;Get the payment outcome in an AUTHORISATION webhook.&lt;\\\/li&gt;\\n&lt;\\\/ol&gt;\\n&quot;,&quot;altTitle&quot;:null,&quot;oldTabId&quot;:&quot;hosted_checkout_1_2&quot;,&quot;relation&quot;:&quot;&quot;}]\"\n            :should-update-when-url-changes='false'>\n        <\/tabs>\n    <\/div>\n<\/div>\n\n<h2>Test and go live<\/h2>\n<p>Before going live with your integration, use our <a href=\"\/development-resources\/test-cards-and-credentials\/test-card-numbers\" target=\"_blank\">test card numbers<\/a> to test that you make a successful out-of-app payment.<\/p>\n<h2>See also<\/h2>\n<ul>\n<li><a href=\"\/online-payments\/build-your-integration\/\">Build your integration<\/a><\/li>\n<li><a href=\"\/online-payments\/build-your-integration\/payment-result-codes\/\">Result codes<\/a><\/li>\n<li><a href=\"\/online-payments\/go-live-checklist\/\">Go-live checklist<\/a><\/li>\n<\/ul>","url":"https:\/\/docs.adyen.com\/online-payments\/out-of-app-payments-on-ios","articleFields":{"description":"Redirect your users to a website to complete payments for their in-app purchases.","feedback_component":true,"last_edit_on":"21-06-2023 22:37","filters_component":false,"page_id":"636b0f7b-771d-4d42-94fe-33a78d3b690b","decision_tree":"[]"},"algolia":{"url":"https:\/\/docs.adyen.com\/online-payments\/out-of-app-payments-on-ios","title":"Out-of-app payments on iOS","content":"Apple's updated App Review Guidelines allow linking to an external website from your app to let your users complete their payments for in-app purchases. This enables you to have more control over your payment flows.\nRequirements\nBefore you begin, take into account the following requirements, limitations, and preparations.\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nTo redirect shoppers from your app to the browser to complete payments, you need one of the following setups: A Web Drop-in\/Components or API-only integration that uses the Advanced flow integration  A Web Drop-in\/Components integration that uses the Sessions flow  A Hosted Checkout integration \n\n\nAPI credential roles\nMake sure that your API credential has the Checkout webservice role.\n\n\nWebhooks\nSubscribe to Standard webhooks.\n\n\nLimitations\nWe only recommend to use this solution if you are based in the United States (US), or if you are based in another country\/region, but accept payments in the US App Store for digital goods and services. For other types of purchases, use our native iOS Drop-in\/Components solution with the Sessions or Advanced flow.    If you redirect your shoppers to a website to accept subscription payments, you need to manage subscriptions yourself. See our Tokenization documentation to learn more about subscription payments. \n\n\n\nHow it works\n\nYou offer in-app purchases in your native iOS app.\nThe shopper selects the option to make a purchase, for example by selecting a button in your app.\nYou redirect the shopper to a website where they can complete the payment.\nThe shopper completes their payment on the website.\nYou redirect the shopper back to your app, and show them a purchase confirmation.\n\nTo let your shoppers pay on a website, you can use a Web integration, or our Hosted Checkout solution.\n\n\n  \n\n\nRedirect your shoppers for an out-of-app payment\nWe offer two solutions to redirect your shoppers to an external website in a mobile browser from your iOS app to complete their payment:\n\nWeb Drop-in\/Components: redirect your shoppers to your existing web checkout page in the mobile browser. This option requires you to build your own Web integration with Adyen, and implement your own logic to return the shopper back to your app.\nHosted Checkout: redirect the shopper to an Adyen-hosted website where they make the payment. This option requires lower development effort, and the shopper is automatically redirected back to your app after they complete the payment.\n\nRefer to our comparison of Hosted Checkout and Web integrations to learn more about the differences between the solutions.\n\n\n    \n        \n        \n    \n\n\nTest and go live\nBefore going live with your integration, use our test card numbers to test that you make a successful out-of-app payment.\nSee also\n\nBuild your integration\nResult codes\nGo-live checklist\n","type":"page","locale":"en","boost":18,"hierarchy":{"lvl0":"Home","lvl1":"Online payments","lvl2":"Out-of-app payments on iOS"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/","lvl1":"https:\/\/docs.adyen.com\/online-payments","lvl2":"\/online-payments\/out-of-app-payments-on-ios"},"levels":3,"category":"Online Payments","category_color":"green","tags":["Out-of-app","payments"]},"articleFiles":{"how_it_works_iOS.png":"<img alt=\"\" src=\"https:\/\/docs.adyen.com\/user\/pages\/docs\/02.online-payments\/45.out-of-app-payments-on-ios\/how_it_works_iOS.png\" \/>"}}
