{"title":"Cash App Pay for API only","category":"default","creationDate":1776961628,"content":"<p>Accept Cash App Pay payments using our APIs, and build your own payment form to have full control over the look and feel of your checkout page.<\/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;\">Make sure that you have built an <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow?platform=Web&amp;integration=API%20only\">API only integration<\/a>. <\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Webhooks<\/strong><\/td>\n<td style=\"text-align: left;\">Enable the <a href=\"\/pt\/online-payments\/tokenization\/create-tokens#enable-the-webhook\">Recurring tokens life cycle events<\/a> webhook.<\/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:<ul><li markdown=\"1\">Contact our <a href=\"https:\/\/ca-test.adyen.com\/ca\/ca\/contactUs\/support.shtml?form=other\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Support Team<\/a> to add Cash App Pay in your Customer Area.<\/li> <li markdown=\"1\">In your <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Customer Area<\/a> go to <strong>Developer<\/strong> &gt; <strong>Additional data<\/strong> and under <strong>Payment<\/strong> select <strong>Recurring details<\/strong>. Then select <strong>Save configuration<\/strong>.<\/li><\/ul><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"sc-notice note\"><div>\n<p>For an API-only integration, you cannot add Cash App Pay in your Customer Area yourself.<\/p>\n<\/div><\/div>\n<h2>Build your payment form for Cash App Pay<\/h2>\n<p>Include Cash App Pay in the list of available payment methods.<\/p>\n<div class=\"sc-notice info\"><div>\n<p>We provide logos for Cash App Pay which you can use on your payment form. For more information, refer to <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only#downloading-logos\">Downloading logos<\/a>.<\/p>\n<\/div><\/div>\n<p>If you are using the  <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> endpoint to show available payment methods to the shopper, specify the following:<\/p>\n<ul>\n<li> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">countryCode<\/a>&#58; <span translate=\"no\"><strong>US<\/strong><\/span><\/li>\n<li> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods#request-amount\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">amount.currency<\/a>&#58; <span translate=\"no\"><strong>USD<\/strong><\/span>.<\/li>\n<li> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods#request-amount\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">amount.value<\/a>&#58; the value of the payment, in <a href=\"\/pt\/development-resources\/currency-codes\">minor units<\/a>.<\/li>\n<li> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods#request-channel\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">channel<\/a>&#58; specify <span translate=\"no\"><strong>Web<\/strong><\/span>, <span translate=\"no\"><strong>iOS<\/strong><\/span>, or <span translate=\"no\"><strong>Android<\/strong><\/span>.<\/li>\n<\/ul>\n<p>The response contains <code>paymentMethod.type<\/code>: <span translate=\"no\"><strong>cashapp<\/strong><\/span>.<\/p>\n<h2 id=\"make-a-payment\">Make a payment<\/h2>\n<ol>\n<li>\n<p>From your server, make a  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> request, specifying:<\/p>\n<ul>\n<li><code>paymentMethod.type<\/code>: <span translate=\"no\"><strong>cashapp<\/strong><\/span><\/li>\n<li><code>paymentMethod.subtype<\/code>: <span translate=\"no\"><strong>redirect<\/strong><\/span><\/li>\n<li><code>channel<\/code>: specify <span translate=\"no\"><strong>Web<\/strong><\/span>, <span translate=\"no\"><strong>iOS<\/strong><\/span>, or <span translate=\"no\"><strong>Android<\/strong><\/span>.<\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"''\" :id=\"'cap-payments'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;curl&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v52\\\/payments \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-d '{\\n  \\&quot;merchantAccount\\&quot;:\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;reference\\&quot;:\\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  \\&quot;amount\\&quot;:{\\n    \\&quot;currency\\&quot;:\\&quot;USD\\&quot;,\\n    \\&quot;value\\&quot;:1000\\n  },\\n  \\&quot;paymentMethod\\&quot;:{\\n    \\&quot;type\\&quot;:\\&quot;cashapp\\&quot;,\\n    \\&quot;subtype\\&quot;:\\&quot;redirect\\&quot;\\n  },\\n  \\&quot;channel\\&quot;:\\&quot;Web\\&quot;,\\n  \\&quot;returnUrl\\&quot;:\\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;\\n}'&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Java API Library v27.0.0\\nimport com.adyen.Client;\\nimport com.adyen.enums.Environment;\\nimport com.adyen.model.checkout.*;\\nimport java.time.OffsetDateTime;\\nimport java.util.*;\\nimport com.adyen.model.RequestOptions;\\nimport com.adyen.service.checkout.*;\\n\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nClient client = new Client(\\&quot;ADYEN_API_KEY\\&quot;, Environment.TEST);\\n\\n\\\/\\\/ Create the request object(s)\\nAmount amount = new Amount()\\n  .currency(\\&quot;USD\\&quot;)\\n  .value(1000L);\\n\\nCashAppDetails cashAppDetails = new CashAppDetails()\\n  .subtype(\\&quot;redirect\\&quot;)\\n  .type(CashAppDetails.TypeEnum.CASHAPP);\\n\\nPaymentRequest paymentRequest = new PaymentRequest()\\n  .reference(\\&quot;YOUR_ORDER_NUMBER\\&quot;)\\n  .amount(amount)\\n  .merchantAccount(\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;)\\n  .channel(PaymentRequest.ChannelEnum.WEB)\\n  .paymentMethod(new CheckoutPaymentMethod(cashAppDetails))\\n  .returnUrl(\\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;);\\n\\n\\\/\\\/ Send the request\\nPaymentsApi service = new PaymentsApi(client);\\nPaymentResponse response = service.payments(paymentRequest, new RequestOptions().idempotencyKey(\\&quot;UUID\\&quot;));&quot;},{&quot;language&quot;:&quot;php&quot;,&quot;tabTitle&quot;:&quot;PHP&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen PHP API Library v19.0.0\\nuse Adyen\\\\Client;\\nuse Adyen\\\\Environment;\\nuse Adyen\\\\Model\\\\Checkout\\\\Amount;\\nuse Adyen\\\\Model\\\\Checkout\\\\CheckoutPaymentMethod;\\nuse Adyen\\\\Model\\\\Checkout\\\\PaymentRequest;\\nuse Adyen\\\\Service\\\\Checkout\\\\PaymentsApi;\\n\\n$client = new Client();\\n$client-&gt;setXApiKey(\\&quot;ADYEN_API_KEY\\&quot;);\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\n$client-&gt;setEnvironment(Environment::TEST);\\n\\n\\n\\\/\\\/ Create the request object(s)\\n$amount = new Amount();\\n$amount\\n  -&gt;setCurrency(\\&quot;USD\\&quot;)\\n  -&gt;setValue(1000);\\n\\n$checkoutPaymentMethod = new CheckoutPaymentMethod();\\n$checkoutPaymentMethod\\n  -&gt;setSubtype(\\&quot;redirect\\&quot;)\\n  -&gt;setType(\\&quot;cashapp\\&quot;);\\n\\n$paymentRequest = new PaymentRequest();\\n$paymentRequest\\n  -&gt;setReference(\\&quot;YOUR_ORDER_NUMBER\\&quot;)\\n  -&gt;setAmount($amount)\\n  -&gt;setMerchantAccount(\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;)\\n  -&gt;setChannel(\\&quot;Web\\&quot;)\\n  -&gt;setPaymentMethod($checkoutPaymentMethod)\\n  -&gt;setReturnUrl(\\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;);\\n\\n$requestOptions['idempotencyKey'] = 'UUID';\\n\\n\\\/\\\/ Send the request\\n$service = new PaymentsApi($client);\\n$response = $service-&gt;payments($paymentRequest, $requestOptions);&quot;},{&quot;language&quot;:&quot;cs&quot;,&quot;tabTitle&quot;:&quot;C#&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen .net API Library v17.0.0\\nusing Adyen;\\nusing Environment = Adyen.Model.Environment;\\nusing Adyen.Model;\\nusing Adyen.Model.Checkout;\\nusing Adyen.Service.Checkout;\\n\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nvar config = new Config()\\n{\\n    XApiKey = \\&quot;ADYEN_API_KEY\\&quot;,\\n    Environment = Environment.Test\\n};\\nvar client = new Client(config);\\n\\n\\\/\\\/ Create the request object(s)\\nAmount amount = new Amount\\n{\\n  Currency = \\&quot;USD\\&quot;,\\n  Value = 1000\\n};\\n\\nCashAppDetails cashAppDetails = new CashAppDetails\\n{\\n  Subtype = \\&quot;redirect\\&quot;,\\n  Type = CashAppDetails.TypeEnum.Cashapp\\n};\\n\\nPaymentRequest paymentRequest = new PaymentRequest\\n{\\n  Reference = \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  Amount = amount,\\n  MerchantAccount = \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  Channel = PaymentRequest.ChannelEnum.Web,\\n  PaymentMethod = new CheckoutPaymentMethod(cashAppDetails),\\n  ReturnUrl = \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;\\n};\\n\\n\\\/\\\/ Send the request\\nvar service = new PaymentsService(client);\\nvar response = service.Payments(paymentRequest, requestOptions: new RequestOptions { IdempotencyKey = \\&quot;UUID\\&quot;});&quot;},{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;NodeJS (JavaScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v18.0.0\\n\\\/\\\/ Require the parts of the module you want to use\\nconst { Client, CheckoutAPI } = require('@adyen\\\/api-library');\\n\\\/\\\/ Initialize the client object\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nconst client = new Client({apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot;});\\n\\n\\\/\\\/ Create the request object(s)\\nconst paymentRequest = {\\n  merchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  amount: {\\n    currency: \\&quot;USD\\&quot;,\\n    value: 1000\\n  },\\n  paymentMethod: {\\n    type: \\&quot;cashapp\\&quot;,\\n    subtype: \\&quot;redirect\\&quot;\\n  },\\n  channel: \\&quot;Web\\&quot;,\\n  returnUrl: \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;\\n}\\n\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: \\&quot;UUID\\&quot; });&quot;},{&quot;language&quot;:&quot;go&quot;,&quot;tabTitle&quot;:&quot;Go&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Go API Library v10.4.0\\nimport (\\n  \\&quot;context\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/common\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/adyen\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/checkout\\&quot;\\n)\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nclient := adyen.NewClient(&amp;common.Config{\\n  ApiKey:      \\&quot;ADYEN_API_KEY\\&quot;,\\n  Environment: common.TestEnv,\\n})\\n\\n\\\/\\\/ Create the request object(s)\\namount := checkout.Amount{\\n  Currency: \\&quot;USD\\&quot;,\\n  Value: 1000,\\n}\\n\\ncashAppDetails := checkout.CashAppDetails{\\n  Subtype: common.PtrString(\\&quot;redirect\\&quot;),\\n  Type: common.PtrString(\\&quot;cashapp\\&quot;),\\n}\\n\\npaymentRequest := checkout.PaymentRequest{\\n  Reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  Amount: amount,\\n  MerchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  Channel: common.PtrString(\\&quot;Web\\&quot;),\\n  PaymentMethod: checkout.CashAppDetailsAsCheckoutPaymentMethod(&amp;cashAppDetails),\\n  ReturnUrl: \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n}\\n\\n\\\/\\\/ Send the request\\nservice := client.Checkout()\\nreq := service.PaymentsApi.PaymentsInput().IdempotencyKey(\\&quot;UUID\\&quot;).PaymentRequest(paymentRequest)\\nres, httpRes, err := service.PaymentsApi.Payments(context.Background(), req)&quot;},{&quot;language&quot;:&quot;py&quot;,&quot;tabTitle&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;# Adyen Python API Library v12.5.1\\nimport Adyen\\n\\nadyen = Adyen.Adyen()\\nadyen.client.xapikey = \\&quot;ADYEN_API_KEY\\&quot;\\n# For the live environment, additionally include your liveEndpointUrlPrefix.\\nadyen.client.platform = \\&quot;test\\&quot; # The environment to use library in.\\n\\n# Create the request object(s)\\njson_request = {\\n  \\&quot;merchantAccount\\&quot;: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;reference\\&quot;: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  \\&quot;amount\\&quot;: {\\n    \\&quot;currency\\&quot;: \\&quot;USD\\&quot;,\\n    \\&quot;value\\&quot;: 1000\\n  },\\n  \\&quot;paymentMethod\\&quot;: {\\n    \\&quot;type\\&quot;: \\&quot;cashapp\\&quot;,\\n    \\&quot;subtype\\&quot;: \\&quot;redirect\\&quot;\\n  },\\n  \\&quot;channel\\&quot;: \\&quot;Web\\&quot;,\\n  \\&quot;returnUrl\\&quot;: \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.payments(request=json_request, idempotency_key=\\&quot;UUID\\&quot;)&quot;},{&quot;language&quot;:&quot;rb&quot;,&quot;tabTitle&quot;:&quot;Ruby&quot;,&quot;content&quot;:&quot;# Adyen Ruby API Library v9.5.1\\nrequire \\&quot;adyen-ruby-api-library\\&quot;\\n\\nadyen = Adyen::Client.new\\nadyen.api_key = 'ADYEN_API_KEY'\\n# For the live environment, additionally include your liveEndpointUrlPrefix.\\nadyen.env = :test # Set to \\&quot;live\\&quot; for live environment\\n\\n# Create the request object(s)\\nrequest_body = {\\n  :merchantAccount =&gt; 'ADYEN_MERCHANT_ACCOUNT',\\n  :reference =&gt; 'YOUR_ORDER_NUMBER',\\n  :amount =&gt; {\\n    :currency =&gt; 'USD',\\n    :value =&gt; 1000\\n  },\\n  :paymentMethod =&gt; {\\n    :type =&gt; 'cashapp',\\n    :subtype =&gt; 'redirect'\\n  },\\n  :channel =&gt; 'Web',\\n  :returnUrl =&gt; 'https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..'\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' =&gt; 'UUID' })&quot;},{&quot;language&quot;:&quot;ts&quot;,&quot;tabTitle&quot;:&quot;NodeJS (TypeScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v18.0.0\\n\\\/\\\/ Require the parts of the module you want to use\\nimport { Client, CheckoutAPI, Types } from \\&quot;@adyen\\\/api-library\\&quot;;\\n\\\/\\\/ Initialize the client object\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nconst client = new Client({apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot;});\\n\\n\\\/\\\/ Create the request object(s)\\nconst amount: Types.checkout.Amount = {\\n  currency: \\&quot;USD\\&quot;,\\n  value: 1000\\n};\\n\\nconst cashAppDetails: Types.checkout.CashAppDetails = {\\n  subtype: \\&quot;redirect\\&quot;,\\n  type: Types.checkout.CashAppDetails.TypeEnum.Cashapp\\n};\\n\\nconst paymentRequest: Types.checkout.PaymentRequest = {\\n  reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  amount: amount,\\n  merchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  channel: Types.checkout.PaymentRequest.ChannelEnum.Web,\\n  paymentMethod: cashAppDetails,\\n  returnUrl: \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;\\n};\\n\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: \\&quot;UUID\\&quot; });&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>In the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> response, check the <code>action<\/code> object for the information that you must use to redirect the shopper.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'\/payments response'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n  \\\"resultCode\\\":\\\"RedirectShopper\\\",\\n  \\\"action\\\":{\\n    \\\"paymentMethodType\\\":\\\"cashapp\\\",\\n    \\\"method\\\":\\\"GET\\\",\\n    \\\"url\\\":\\\"https:\\\/\\\/checkoutshopper-test.adyen.com\\\/checkoutshopper\\\/checkoutPaymentRedirect?redirectData=...\\\",\\n    \\\"type\\\":\\\"redirect\\\"\\n  }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\n<h2 id=\"handle-the-redirect\">Handle the redirect<\/h2>\n<ol>\n<li>\n<p>To complete the payment, redirect the shopper to the <code>action.url<\/code> returned in the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> response, taking into account the following recommendations:<\/p>\n<ul>\n<li>\n<p><strong>When using the HTTP GET method:<\/strong><br \/>\nFor security reasons, when showing the redirect in the app, we recommend that you use <a href=\"https:\/\/developer.apple.com\/documentation\/safariservices\/sfsafariviewcontroller\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">SFSafariViewController<\/a> for iOS or <a href=\"https:\/\/developer.chrome.com\/multidevice\/android\/customtabs\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Chrome Custom Tabs<\/a> for Android, instead of WebView objects. Also refer to the <a href=\"https:\/\/developer.android.com\/topic\/security\/best-practices#webview\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">security best practices<\/a> for WebView.<\/p>\n<\/li>\n<li>\n<p><strong>Redirection for mobile integrations:<\/strong><br \/>\nFor mobile integrations, we strongly recommended that you redirect the shopper to the default browser of their device. Redirecting to the default browser ensures the best compatibility, handling of multi-factor authentication, app-to-app redirection, and error handling.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>After the shopper is redirected back to your website, check the payment result by making a POST  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/details<\/a> request, specifying:<\/p>\n<ul>\n<li><code>details<\/code>: object that contains the URL-decoded <code>redirectResult<\/code> returned when the shopper was redirected back to your site.<\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'\/payments\/details request'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v72\\\/payments\\\/details \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-d '{\\n   \\&quot;details\\&quot;: {\\n      \\&quot;redirectResult\\&quot;: \\&quot;eyJ0cmFuc1N0YXR1cyI6IlkifQ==\\&quot;\\n   }\\n}'&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>In the response note the following:<\/p>\n<ul>\n<li><code>resultCode<\/code>: use this to present the result to your shopper.<\/li>\n<li><code>pspReference<\/code>: our unique identifier for the transaction.<\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'\/payments\/details response'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n   \\\"resultCode\\\": \\\"Authorised\\\",\\n   \\\"pspReference\\\": \\\"V4HZ4RBFJGXXGN82\\\"\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\n<h2>Present the payment result<\/h2>\n<p>Use the\u00a0 <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details#responses-200-resultCode\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">resultCode<\/a> from the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/details<\/a> response to show the payment result to your shopper. You will also receive the outcome of the payment asynchronously in a <a href=\"\/pt\/development-resources\/webhooks\">webhook<\/a>.<\/p>\n<p>For Cash App Pay payments, you can receive the following <code>resultCode<\/code> values:<\/p>\n<table>\n<thead>\n<tr>\n<th>resultCode<\/th>\n<th>Description<\/th>\n<th>Action to take<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Received<\/strong><\/td>\n<td>The shopper has completed the payment but the final result is not yet known.<\/td>\n<td>Inform the shopper that you have received their order, and are waiting for the payment to be completed. <br>You will receive an <strong>AUTHORISATION<\/strong> webhook when the status of the payment is updated.<\/td>\n<\/tr>\n<tr>\n<td><strong>Authorised<\/strong><\/td>\n<td>The payment was successful.<\/td>\n<td>Inform the shopper that the payment has been successful. <br> If you are using manual capture, you also need to <a href=\"\/pt\/online-payments\/capture#manual-capture\">capture<\/a> the payment.<\/td>\n<\/tr>\n<tr>\n<td><strong>Cancelled<\/strong><\/td>\n<td>The shopper cancelled the payment.<\/td>\n<td>Ask the shopper whether they want to continue with the order, or ask them to select a different payment method.<\/td>\n<\/tr>\n<tr>\n<td><strong>Error<\/strong><\/td>\n<td>There was an error when the payment was being processed. For more information, check the <a href=\"\/pt\/development-resources\/refusal-reasons\">\n  <code>refusalReason<\/code>\n<\/a> field.<\/td>\n<td>Inform the shopper that there was an error processing their payment.<\/td>\n<\/tr>\n<tr>\n<td><strong>Refused<\/strong><\/td>\n<td>The payment was refused.  For more information, check the <a href=\"\/pt\/development-resources\/refusal-reasons\">\n  <code>refusalReason<\/code>\n<\/a> field.<\/td>\n<td>Ask the shopper to try the payment again using a different payment method.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"recurring-payments\">Recurring and card-on-file payments<\/h2>\n<p>Cash App Pay supports <a href=\"\/pt\/online-payments\/tokenization\">tokenization<\/a> of the shopper's payment details for future recurring and card-on-file payments. Card-on-file payments are ad-hoc payments where you use the shopper's token. By getting the shopper's permission to save their payment details when you create the token, you can bypass the shopper approval step for those future payments.<\/p>\n<div class=\"notices red\">\n<p>We strongly recommend that you ask explicit permission from the shopper if you intend to make future recurring or card-on-file payments. In the case of recurring payments, being transparent about the payment schedule and the amount of recurring payments reduces the risk of chargebacks.<\/p>\n<\/div>\n<p>We recommend making sure that your recurring payments include the shopper's <strong>$cashtag<\/strong>. The $cashtag makes it easier for the shopper to recognize the recurring payment as a legitimate one. This helps to avoid chargebacks. <\/p>\n<p>To make tokenized payments :<\/p>\n<ol>\n<li>\n<p>Create a token through the initial Cash App Pay transaction for the shopper. For instructions, see <a href=\"\/pt\/online-payments\/tokenization\">Tokenization<\/a>.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"''\" :id=\"'cap-token'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;curl&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v72\\\/payments \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-X POST\\n-d '{\\n   \\&quot;amount\\&quot;:{\\n      \\&quot;currency\\&quot;:\\&quot;USD\\&quot;,\\n      \\&quot;value\\&quot;:1000\\n   },\\n   \\&quot;paymentMethod\\&quot;:{\\n      \\&quot;type\\&quot;:\\&quot;cashapp\\&quot;,\\n      \\&quot;subtype\\&quot;:\\&quot;redirect\\&quot;\\n   },\\n   \\&quot;merchantAccount\\&quot;:\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n   \\&quot;reference\\&quot;:\\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n   \\&quot;storePaymentMethod\\&quot;: \\&quot;true\\&quot;,\\n   \\&quot;shopperReference\\&quot;:\\&quot;YOUR_SHOPPER_REFERENCE\\&quot;,\\n   \\&quot;shopperInteraction\\&quot;: \\&quot;Ecommerce\\&quot;,\\n   \\&quot;recurringProcessingModel\\&quot;: \\&quot;Subscription\\&quot;,\\n   \\&quot;channel\\&quot;:\\&quot;Web\\&quot;,\\n   \\&quot;returnUrl\\&quot;:\\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;\\n}'&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Java API Library v27.0.0\\nimport com.adyen.Client;\\nimport com.adyen.enums.Environment;\\nimport com.adyen.model.checkout.*;\\nimport java.time.OffsetDateTime;\\nimport java.util.*;\\nimport com.adyen.model.RequestOptions;\\nimport com.adyen.service.checkout.*;\\n\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nClient client = new Client(\\&quot;ADYEN_API_KEY\\&quot;, Environment.TEST);\\n\\n\\\/\\\/ Create the request object(s)\\nAmount amount = new Amount()\\n  .currency(\\&quot;USD\\&quot;)\\n  .value(1000L);\\n\\nCashAppDetails cashAppDetails = new CashAppDetails()\\n  .subtype(\\&quot;redirect\\&quot;)\\n  .type(CashAppDetails.TypeEnum.CASHAPP);\\n\\nPaymentRequest paymentRequest = new PaymentRequest()\\n  .reference(\\&quot;YOUR_ORDER_NUMBER\\&quot;)\\n  .amount(amount)\\n  .storePaymentMethod(true)\\n  .merchantAccount(\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;)\\n  .recurringProcessingModel(PaymentRequest.RecurringProcessingModelEnum.SUBSCRIPTION)\\n  .channel(PaymentRequest.ChannelEnum.WEB)\\n  .paymentMethod(new CheckoutPaymentMethod(cashAppDetails))\\n  .shopperInteraction(PaymentRequest.ShopperInteractionEnum.ECOMMERCE)\\n  .returnUrl(\\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;)\\n  .shopperReference(\\&quot;YOUR_SHOPPER_REFERENCE\\&quot;);\\n\\n\\\/\\\/ Send the request\\nPaymentsApi service = new PaymentsApi(client);\\nPaymentResponse response = service.payments(paymentRequest, new RequestOptions().idempotencyKey(\\&quot;UUID\\&quot;));&quot;},{&quot;language&quot;:&quot;php&quot;,&quot;tabTitle&quot;:&quot;PHP&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen PHP API Library v19.0.0\\nuse Adyen\\\\Client;\\nuse Adyen\\\\Environment;\\nuse Adyen\\\\Model\\\\Checkout\\\\Amount;\\nuse Adyen\\\\Model\\\\Checkout\\\\CheckoutPaymentMethod;\\nuse Adyen\\\\Model\\\\Checkout\\\\PaymentRequest;\\nuse Adyen\\\\Service\\\\Checkout\\\\PaymentsApi;\\n\\n$client = new Client();\\n$client-&gt;setXApiKey(\\&quot;ADYEN_API_KEY\\&quot;);\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\n$client-&gt;setEnvironment(Environment::TEST);\\n\\n\\n\\\/\\\/ Create the request object(s)\\n$amount = new Amount();\\n$amount\\n  -&gt;setCurrency(\\&quot;USD\\&quot;)\\n  -&gt;setValue(1000);\\n\\n$checkoutPaymentMethod = new CheckoutPaymentMethod();\\n$checkoutPaymentMethod\\n  -&gt;setSubtype(\\&quot;redirect\\&quot;)\\n  -&gt;setType(\\&quot;cashapp\\&quot;);\\n\\n$paymentRequest = new PaymentRequest();\\n$paymentRequest\\n  -&gt;setReference(\\&quot;YOUR_ORDER_NUMBER\\&quot;)\\n  -&gt;setAmount($amount)\\n  -&gt;setStorePaymentMethod(true)\\n  -&gt;setMerchantAccount(\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;)\\n  -&gt;setRecurringProcessingModel(\\&quot;Subscription\\&quot;)\\n  -&gt;setChannel(\\&quot;Web\\&quot;)\\n  -&gt;setPaymentMethod($checkoutPaymentMethod)\\n  -&gt;setShopperInteraction(\\&quot;Ecommerce\\&quot;)\\n  -&gt;setReturnUrl(\\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;)\\n  -&gt;setShopperReference(\\&quot;YOUR_SHOPPER_REFERENCE\\&quot;);\\n\\n$requestOptions['idempotencyKey'] = 'UUID';\\n\\n\\\/\\\/ Send the request\\n$service = new PaymentsApi($client);\\n$response = $service-&gt;payments($paymentRequest, $requestOptions);&quot;},{&quot;language&quot;:&quot;cs&quot;,&quot;tabTitle&quot;:&quot;C#&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen .net API Library v17.0.0\\nusing Adyen;\\nusing Environment = Adyen.Model.Environment;\\nusing Adyen.Model;\\nusing Adyen.Model.Checkout;\\nusing Adyen.Service.Checkout;\\n\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nvar config = new Config()\\n{\\n    XApiKey = \\&quot;ADYEN_API_KEY\\&quot;,\\n    Environment = Environment.Test\\n};\\nvar client = new Client(config);\\n\\n\\\/\\\/ Create the request object(s)\\nAmount amount = new Amount\\n{\\n  Currency = \\&quot;USD\\&quot;,\\n  Value = 1000\\n};\\n\\nCashAppDetails cashAppDetails = new CashAppDetails\\n{\\n  Subtype = \\&quot;redirect\\&quot;,\\n  Type = CashAppDetails.TypeEnum.Cashapp\\n};\\n\\nPaymentRequest paymentRequest = new PaymentRequest\\n{\\n  Reference = \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  Amount = amount,\\n  StorePaymentMethod = true,\\n  MerchantAccount = \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  RecurringProcessingModel = PaymentRequest.RecurringProcessingModelEnum.Subscription,\\n  Channel = PaymentRequest.ChannelEnum.Web,\\n  PaymentMethod = new CheckoutPaymentMethod(cashAppDetails),\\n  ShopperInteraction = PaymentRequest.ShopperInteractionEnum.Ecommerce,\\n  ReturnUrl = \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  ShopperReference = \\&quot;YOUR_SHOPPER_REFERENCE\\&quot;\\n};\\n\\n\\\/\\\/ Send the request\\nvar service = new PaymentsService(client);\\nvar response = service.Payments(paymentRequest, requestOptions: new RequestOptions { IdempotencyKey = \\&quot;UUID\\&quot;});&quot;},{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;NodeJS (JavaScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v18.0.0\\n\\\/\\\/ Require the parts of the module you want to use\\nconst { Client, CheckoutAPI } = require('@adyen\\\/api-library');\\n\\\/\\\/ Initialize the client object\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nconst client = new Client({apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot;});\\n\\n\\\/\\\/ Create the request object(s)\\nconst paymentRequest = {\\n  amount: {\\n    currency: \\&quot;USD\\&quot;,\\n    value: 1000\\n  },\\n  paymentMethod: {\\n    type: \\&quot;cashapp\\&quot;,\\n    subtype: \\&quot;redirect\\&quot;\\n  },\\n  merchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  storePaymentMethod: \\&quot;true\\&quot;,\\n  shopperReference: \\&quot;YOUR_SHOPPER_REFERENCE\\&quot;,\\n  shopperInteraction: \\&quot;Ecommerce\\&quot;,\\n  recurringProcessingModel: \\&quot;Subscription\\&quot;,\\n  channel: \\&quot;Web\\&quot;,\\n  returnUrl: \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;\\n}\\n\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: \\&quot;UUID\\&quot; });&quot;},{&quot;language&quot;:&quot;go&quot;,&quot;tabTitle&quot;:&quot;Go&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Go API Library v10.4.0\\nimport (\\n  \\&quot;context\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/common\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/adyen\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/checkout\\&quot;\\n)\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nclient := adyen.NewClient(&amp;common.Config{\\n  ApiKey:      \\&quot;ADYEN_API_KEY\\&quot;,\\n  Environment: common.TestEnv,\\n})\\n\\n\\\/\\\/ Create the request object(s)\\namount := checkout.Amount{\\n  Currency: \\&quot;USD\\&quot;,\\n  Value: 1000,\\n}\\n\\ncashAppDetails := checkout.CashAppDetails{\\n  Subtype: common.PtrString(\\&quot;redirect\\&quot;),\\n  Type: common.PtrString(\\&quot;cashapp\\&quot;),\\n}\\n\\npaymentRequest := checkout.PaymentRequest{\\n  Reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  Amount: amount,\\n  StorePaymentMethod: common.PtrBool(true),\\n  MerchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  RecurringProcessingModel: common.PtrString(\\&quot;Subscription\\&quot;),\\n  Channel: common.PtrString(\\&quot;Web\\&quot;),\\n  PaymentMethod: checkout.CashAppDetailsAsCheckoutPaymentMethod(&amp;cashAppDetails),\\n  ShopperInteraction: common.PtrString(\\&quot;Ecommerce\\&quot;),\\n  ReturnUrl: \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  ShopperReference: common.PtrString(\\&quot;YOUR_SHOPPER_REFERENCE\\&quot;),\\n}\\n\\n\\\/\\\/ Send the request\\nservice := client.Checkout()\\nreq := service.PaymentsApi.PaymentsInput().IdempotencyKey(\\&quot;UUID\\&quot;).PaymentRequest(paymentRequest)\\nres, httpRes, err := service.PaymentsApi.Payments(context.Background(), req)&quot;},{&quot;language&quot;:&quot;py&quot;,&quot;tabTitle&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;# Adyen Python API Library v12.5.1\\nimport Adyen\\n\\nadyen = Adyen.Adyen()\\nadyen.client.xapikey = \\&quot;ADYEN_API_KEY\\&quot;\\n# For the live environment, additionally include your liveEndpointUrlPrefix.\\nadyen.client.platform = \\&quot;test\\&quot; # The environment to use library in.\\n\\n# Create the request object(s)\\njson_request = {\\n  \\&quot;amount\\&quot;: {\\n    \\&quot;currency\\&quot;: \\&quot;USD\\&quot;,\\n    \\&quot;value\\&quot;: 1000\\n  },\\n  \\&quot;paymentMethod\\&quot;: {\\n    \\&quot;type\\&quot;: \\&quot;cashapp\\&quot;,\\n    \\&quot;subtype\\&quot;: \\&quot;redirect\\&quot;\\n  },\\n  \\&quot;merchantAccount\\&quot;: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;reference\\&quot;: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  \\&quot;storePaymentMethod\\&quot;: \\&quot;True\\&quot;,\\n  \\&quot;shopperReference\\&quot;: \\&quot;YOUR_SHOPPER_REFERENCE\\&quot;,\\n  \\&quot;shopperInteraction\\&quot;: \\&quot;Ecommerce\\&quot;,\\n  \\&quot;recurringProcessingModel\\&quot;: \\&quot;Subscription\\&quot;,\\n  \\&quot;channel\\&quot;: \\&quot;Web\\&quot;,\\n  \\&quot;returnUrl\\&quot;: \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.payments(request=json_request, idempotency_key=\\&quot;UUID\\&quot;)&quot;},{&quot;language&quot;:&quot;rb&quot;,&quot;tabTitle&quot;:&quot;Ruby&quot;,&quot;content&quot;:&quot;# Adyen Ruby API Library v9.5.1\\nrequire \\&quot;adyen-ruby-api-library\\&quot;\\n\\nadyen = Adyen::Client.new\\nadyen.api_key = 'ADYEN_API_KEY'\\n# For the live environment, additionally include your liveEndpointUrlPrefix.\\nadyen.env = :test # Set to \\&quot;live\\&quot; for live environment\\n\\n# Create the request object(s)\\nrequest_body = {\\n  :amount =&gt; {\\n    :currency =&gt; 'USD',\\n    :value =&gt; 1000\\n  },\\n  :paymentMethod =&gt; {\\n    :type =&gt; 'cashapp',\\n    :subtype =&gt; 'redirect'\\n  },\\n  :merchantAccount =&gt; 'ADYEN_MERCHANT_ACCOUNT',\\n  :reference =&gt; 'YOUR_ORDER_NUMBER',\\n  :storePaymentMethod =&gt; 'true',\\n  :shopperReference =&gt; 'YOUR_SHOPPER_REFERENCE',\\n  :shopperInteraction =&gt; 'Ecommerce',\\n  :recurringProcessingModel =&gt; 'Subscription',\\n  :channel =&gt; 'Web',\\n  :returnUrl =&gt; 'https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..'\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' =&gt; 'UUID' })&quot;},{&quot;language&quot;:&quot;ts&quot;,&quot;tabTitle&quot;:&quot;NodeJS (TypeScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v18.0.0\\n\\\/\\\/ Require the parts of the module you want to use\\nimport { Client, CheckoutAPI, Types } from \\&quot;@adyen\\\/api-library\\&quot;;\\n\\\/\\\/ Initialize the client object\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nconst client = new Client({apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot;});\\n\\n\\\/\\\/ Create the request object(s)\\nconst amount: Types.checkout.Amount = {\\n  currency: \\&quot;USD\\&quot;,\\n  value: 1000\\n};\\n\\nconst cashAppDetails: Types.checkout.CashAppDetails = {\\n  subtype: \\&quot;redirect\\&quot;,\\n  type: Types.checkout.CashAppDetails.TypeEnum.Cashapp\\n};\\n\\nconst paymentRequest: Types.checkout.PaymentRequest = {\\n  reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  amount: amount,\\n  storePaymentMethod: true,\\n  merchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  recurringProcessingModel: Types.checkout.PaymentRequest.RecurringProcessingModelEnum.Subscription,\\n  channel: Types.checkout.PaymentRequest.ChannelEnum.Web,\\n  paymentMethod: cashAppDetails,\\n  shopperInteraction: Types.checkout.PaymentRequest.ShopperInteractionEnum.Ecommerce,\\n  returnUrl: \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  shopperReference: \\&quot;YOUR_SHOPPER_REFERENCE\\&quot;\\n};\\n\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: \\&quot;UUID\\&quot; });&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>Make sure that you have enabled receiving the shopper's $cashtag:<br \/>\nIn your Customer Area, go to <strong>Developers<\/strong> &gt; <strong>Additional Data<\/strong> and select <strong>Token information for digital wallets<\/strong>.<\/p>\n<\/li>\n<li>\n<p>Make a POST  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/details<\/a> request. For instructions, see  <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow?platform=Web&amp;integration=API-only&amp;version=latest#send-additional-payment-details\">Submit additional payment details<\/a>. <\/p>\n<\/li>\n<li>\n<p>From the <code>\/payments\/details<\/code> response, save the following <code>additionalData<\/code> details:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><code>additionalData.cashapp.cashtag<\/code><\/td>\n<td style=\"text-align: left;\">The shopper's $cashtag.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>additionalData.tokenization.shopperReference<\/code><\/td>\n<td style=\"text-align: left;\">The shopper reference you specified in the payment request.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>additionalData.tokenization.storedPaymentMethodId<\/code><\/td>\n<td style=\"text-align: left;\">The token that was generated through the payment request.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Note that the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Tokenization-webhooks\/latest\/post\/recurring.token.created\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">recurring.token.created<\/a> also includes the shopper reference and the recurring detail reference, but not the $cashtag.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'\/payments\/details response with $cashtag and recurring details'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n   \\\"additionalData\\\": {\\n      \\\"cashapp.cashtag\\\": \\\"$CASHTAG_C_TOKEN\\\",\\n      \\\"tokenization.shopperReference\\\": \\\"YOUR_SHOPPER_REFERENCE\\\",\\n      \\\"tokenization.storedPaymentMethodId\\\": \\\"M5N7TQ4TG5PFWR50\\\"\\n   },\\n   \\\"amount\\\":{\\n      \\\"currency\\\":\\\"USD\\\",\\n      \\\"value\\\":1000\\n   },\\n   \\\"merchantRreference\\\":\\\"YOUR_ORDER_NUMBER\\\",\\n   \\\"paymentMethod\\\":{\\n      \\\"type\\\":\\\"cashapp\\\",\\n      \\\"subtype\\\":\\\"redirect\\\"\\n   },\\n   \\\"pspReference\\\":\\\"V4HZ4RBFJGXXGN82\\\",\\n   \\\"resultCode\\\":\\\"Authorised\\\"\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>In later recurring or card-on-file Cash App Pay payments for the shopper, include:<\/p>\n<ul>\n<li>The parameters required for tokenized payments. For instructions, see <a href=\"\/pt\/online-payments\/tokenization\">Tokenization<\/a>.<\/li>\n<\/ul>\n<p>To make it easier for the shopper to recognize the payment as a legitimate one, optionally include:<\/p>\n<ul>\n<li><code>paymentMethod.cashtag<\/code>: the shoppers $cashtag.<\/li>\n<\/ul>\n<p><\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"''\" :id=\"'cap-recurring'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;curl&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v72\\\/payments \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-d '{\\n   \\&quot;amount\\&quot;:{\\n      \\&quot;value\\&quot;:1000,\\n      \\&quot;currency\\&quot;:\\&quot;USD\\&quot;\\n   },\\n   \\&quot;channel\\&quot;:\\&quot;Web\\&quot;,\\n   \\&quot;paymentMethod\\&quot;:{\\n      \\&quot;cashtag\\&quot;:\\&quot;$CASHTAG_C_TOKEN\\&quot;,\\n      \\&quot;storedPaymentMethodId\\&quot;:\\&quot;M5N7TQ4TG5PFWR50\\&quot;,\\n      \\&quot;type\\&quot;:\\&quot;cashapp\\&quot;,\\n      \\&quot;subtype\\&quot;:\\&quot;redirect\\&quot;\\n   },\\n   \\&quot;merchantAccount\\&quot;:\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n   \\&quot;recurringProcessingModel\\&quot;: \\&quot;Subscription\\&quot;,\\n   \\&quot;reference\\&quot;:\\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n   \\&quot;returnUrl\\&quot;:\\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;\\n   \\&quot;shopperInteraction\\&quot;:\\&quot;ContAuth\\&quot;,\\n   \\&quot;shopperReference\\&quot;:\\&quot;YOUR_SHOPPER_REFERENCE\\&quot;\\n}'&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Java API Library v27.0.0\\nimport com.adyen.Client;\\nimport com.adyen.enums.Environment;\\nimport com.adyen.model.checkout.*;\\nimport java.time.OffsetDateTime;\\nimport java.util.*;\\nimport com.adyen.model.RequestOptions;\\nimport com.adyen.service.checkout.*;\\n\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nClient client = new Client(\\&quot;ADYEN_API_KEY\\&quot;, Environment.TEST);\\n\\n\\\/\\\/ Create the request object(s)\\nAmount amount = new Amount()\\n  .currency(\\&quot;USD\\&quot;)\\n  .value(1000L);\\n\\nCashAppDetails cashAppDetails = new CashAppDetails()\\n  .cashtag(\\&quot;$CASHTAG_C_TOKEN\\&quot;),\\n  .subtype(\\&quot;redirect\\&quot;)\\n  .storedPaymentMethodId(\\&quot;M5N7TQ4TG5PFWR50\\&quot;)\\n  .type(CashAppDetails.TypeEnum.CASHAPP);\\n\\nPaymentRequest paymentRequest = new PaymentRequest()\\n  .reference(\\&quot;YOUR_ORDER_NUMBER\\&quot;)\\n  .amount(amount)\\n  .merchantAccount(\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;)\\n  .recurringProcessingModel(PaymentRequest.RecurringProcessingModelEnum.SUBSCRIPTION)\\n  .channel(PaymentRequest.ChannelEnum.WEB)\\n  .paymentMethod(new CheckoutPaymentMethod(cashAppDetails))\\n  .shopperInteraction(PaymentRequest.ShopperInteractionEnum.CONTAUTH)\\n  .returnUrl(\\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;)\\n  .shopperReference(\\&quot;YOUR_SHOPPER_REFERENCE\\&quot;);\\n\\n\\\/\\\/ Send the request\\nPaymentsApi service = new PaymentsApi(client);\\nPaymentResponse response = service.payments(paymentRequest, new RequestOptions().idempotencyKey(\\&quot;UUID\\&quot;));&quot;},{&quot;language&quot;:&quot;php&quot;,&quot;tabTitle&quot;:&quot;PHP&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen PHP API Library v19.0.0\\nuse Adyen\\\\Client;\\nuse Adyen\\\\Environment;\\nuse Adyen\\\\Model\\\\Checkout\\\\Amount;\\nuse Adyen\\\\Model\\\\Checkout\\\\CheckoutPaymentMethod;\\nuse Adyen\\\\Model\\\\Checkout\\\\PaymentRequest;\\nuse Adyen\\\\Service\\\\Checkout\\\\PaymentsApi;\\n\\n$client = new Client();\\n$client-&gt;setXApiKey(\\&quot;ADYEN_API_KEY\\&quot;);\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\n$client-&gt;setEnvironment(Environment::TEST);\\n\\n\\n\\\/\\\/ Create the request object(s)\\n$amount = new Amount();\\n$amount\\n  -&gt;setCurrency(\\&quot;USD\\&quot;)\\n  -&gt;setValue(1000);\\n\\n$checkoutPaymentMethod = new CheckoutPaymentMethod();\\n$checkoutPaymentMethod\\n  -&gt;setCashtag(\\&quot;$CASHTAG_C_TOKEN\\&quot;)\\n  -&gt;setSubtype(\\&quot;redirect\\&quot;)\\n  -&gt;setStoredPaymentMethodId(\\&quot;M5N7TQ4TG5PFWR50\\&quot;)\\n  -&gt;setType(\\&quot;cashapp\\&quot;);\\n\\n$paymentRequest = new PaymentRequest();\\n$paymentRequest\\n  -&gt;setReference(\\&quot;YOUR_ORDER_NUMBER\\&quot;)\\n  -&gt;setAmount($amount)\\n  -&gt;setMerchantAccount(\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;)\\n  -&gt;setRecurringProcessingModel(\\&quot;Subscription\\&quot;)\\n  -&gt;setChannel(\\&quot;Web\\&quot;)\\n  -&gt;setPaymentMethod($checkoutPaymentMethod)\\n  -&gt;setShopperInteraction(\\&quot;ContAuth\\&quot;)\\n  -&gt;setReturnUrl(\\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;)\\n  -&gt;setShopperReference(\\&quot;YOUR_SHOPPER_REFERENCE\\&quot;);\\n\\n$requestOptions['idempotencyKey'] = 'UUID';\\n\\n\\\/\\\/ Send the request\\n$service = new PaymentsApi($client);\\n$response = $service-&gt;payments($paymentRequest, $requestOptions);&quot;},{&quot;language&quot;:&quot;cs&quot;,&quot;tabTitle&quot;:&quot;C#&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen .net API Library v17.0.0\\nusing Adyen;\\nusing Environment = Adyen.Model.Environment;\\nusing Adyen.Model;\\nusing Adyen.Model.Checkout;\\nusing Adyen.Service.Checkout;\\n\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nvar config = new Config()\\n{\\n    XApiKey = \\&quot;ADYEN_API_KEY\\&quot;,\\n    Environment = Environment.Test\\n};\\nvar client = new Client(config);\\n\\n\\\/\\\/ Create the request object(s)\\nAmount amount = new Amount\\n{\\n  Currency = \\&quot;USD\\&quot;,\\n  Value = 1000\\n};\\n\\nCashAppDetails cashAppDetails = new CashAppDetails\\n{\\n  Cashtag = \\&quot;$CASHTAG_C_TOKEN\\&quot;,\\n  Subtype = \\&quot;redirect\\&quot;,\\n  StoredPaymentMethodId = \\&quot;M5N7TQ4TG5PFWR50\\&quot;,\\n  Type = CashAppDetails.TypeEnum.Cashapp\\n};\\n\\nPaymentRequest paymentRequest = new PaymentRequest\\n{\\n  Reference = \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  Amount = amount,\\n  MerchantAccount = \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  RecurringProcessingModel = PaymentRequest.RecurringProcessingModelEnum.Subscription,\\n  Channel = PaymentRequest.ChannelEnum.Web,\\n  PaymentMethod = new CheckoutPaymentMethod(cashAppDetails),\\n  ShopperInteraction = PaymentRequest.ShopperInteractionEnum.ContAuth,\\n  ReturnUrl = \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  ShopperReference = \\&quot;YOUR_SHOPPER_REFERENCE\\&quot;\\n};\\n\\n\\\/\\\/ Send the request\\nvar service = new PaymentsService(client);\\nvar response = service.Payments(paymentRequest, requestOptions: new RequestOptions { IdempotencyKey = \\&quot;UUID\\&quot;});&quot;},{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;NodeJS (JavaScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v18.0.0\\n\\\/\\\/ Require the parts of the module you want to use\\nconst { Client, CheckoutAPI } = require('@adyen\\\/api-library');\\n\\\/\\\/ Initialize the client object\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nconst client = new Client({apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot;});\\n\\n\\\/\\\/ Create the request object(s)\\nconst paymentRequest = {\\n  amount: {\\n    value: 1000,\\n    currency: \\&quot;USD\\&quot;\\n  },\\n  paymentMethod: {\\n    cashtag: \\&quot;$CASHTAG_C_TOKEN\\&quot;,\\n    type: \\&quot;cashapp\\&quot;,\\n    subtype: \\&quot;redirect\\&quot;,\\n    storedPaymentMethodId: \\&quot;M5N7TQ4TG5PFWR50\\&quot;\\n  },\\n  merchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  shopperReference: \\&quot;YOUR_SHOPPER_REFERENCE\\&quot;,\\n  shopperInteraction: \\&quot;ContAuth\\&quot;,\\n  recurringProcessingModel: \\&quot;Subscription\\&quot;,\\n  channel: \\&quot;Web\\&quot;,\\n  returnUrl: \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;\\n}\\n\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: \\&quot;UUID\\&quot; });&quot;},{&quot;language&quot;:&quot;go&quot;,&quot;tabTitle&quot;:&quot;Go&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Go API Library v10.4.0\\nimport (\\n  \\&quot;context\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/common\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/adyen\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/checkout\\&quot;\\n)\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nclient := adyen.NewClient(&amp;common.Config{\\n  ApiKey:      \\&quot;ADYEN_API_KEY\\&quot;,\\n  Environment: common.TestEnv,\\n})\\n\\n\\\/\\\/ Create the request object(s)\\namount := checkout.Amount{\\n  Currency: \\&quot;USD\\&quot;,\\n  Value: 1000,\\n}\\n\\ncashAppDetails := checkout.CashAppDetails{\\n  Cashtag: common.PtrString(\\&quot;$CASHTAG_C_TOKEN\\&quot;),\\n  Subtype: common.PtrString(\\&quot;redirect\\&quot;),\\n  StoredPaymentMethodId: common.PtrString(\\&quot;M5N7TQ4TG5PFWR50\\&quot;),\\n  Type: common.PtrString(\\&quot;cashapp\\&quot;),\\n}\\n\\npaymentRequest := checkout.PaymentRequest{\\n  Reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  Amount: amount,\\n  MerchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  RecurringProcessingModel: common.PtrString(\\&quot;Subscription\\&quot;),\\n  Channel: common.PtrString(\\&quot;Web\\&quot;),\\n  PaymentMethod: checkout.CashAppDetailsAsCheckoutPaymentMethod(&amp;cashAppDetails),\\n  ShopperInteraction: common.PtrString(\\&quot;ContAuth\\&quot;),\\n  ReturnUrl: \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  ShopperReference: common.PtrString(\\&quot;YOUR_SHOPPER_REFERENCE\\&quot;),\\n}\\n\\n\\\/\\\/ Send the request\\nservice := client.Checkout()\\nreq := service.PaymentsApi.PaymentsInput().IdempotencyKey(\\&quot;UUID\\&quot;).PaymentRequest(paymentRequest)\\nres, httpRes, err := service.PaymentsApi.Payments(context.Background(), req)&quot;},{&quot;language&quot;:&quot;py&quot;,&quot;tabTitle&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;# Adyen Python API Library v12.5.1\\nimport Adyen\\n\\nadyen = Adyen.Adyen()\\nadyen.client.xapikey = \\&quot;ADYEN_API_KEY\\&quot;\\n# For the live environment, additionally include your liveEndpointUrlPrefix.\\nadyen.client.platform = \\&quot;test\\&quot; # The environment to use library in.\\n\\n# Create the request object(s)\\njson_request = {\\n  \\&quot;amount\\&quot;: {\\n    \\&quot;value\\&quot;: 1000,\\n    \\&quot;currency\\&quot;: \\&quot;USD\\&quot;\\n  },\\n  \\&quot;paymentMethod\\&quot;: {\\n    \\&quot;cashtag\\&quot;: \\&quot;$CASHTAG_C_TOKEN\\&quot;,\\n    \\&quot;type\\&quot;: \\&quot;cashapp\\&quot;,\\n    \\&quot;subtype\\&quot;: \\&quot;redirect\\&quot;,\\n    \\&quot;storedPaymentMethodId\\&quot;: \\&quot;M5N7TQ4TG5PFWR50\\&quot;\\n  },\\n  \\&quot;merchantAccount\\&quot;: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;reference\\&quot;: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  \\&quot;shopperReference\\&quot;: \\&quot;YOUR_SHOPPER_REFERENCE\\&quot;,\\n  \\&quot;shopperInteraction\\&quot;: \\&quot;ContAuth\\&quot;,\\n  \\&quot;recurringProcessingModel\\&quot;: \\&quot;Subscription\\&quot;,\\n  \\&quot;channel\\&quot;: \\&quot;Web\\&quot;,\\n  \\&quot;returnUrl\\&quot;: \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.payments(request=json_request, idempotency_key=\\&quot;UUID\\&quot;)&quot;},{&quot;language&quot;:&quot;rb&quot;,&quot;tabTitle&quot;:&quot;Ruby&quot;,&quot;content&quot;:&quot;# Adyen Ruby API Library v9.5.1\\nrequire \\&quot;adyen-ruby-api-library\\&quot;\\n\\nadyen = Adyen::Client.new\\nadyen.api_key = 'ADYEN_API_KEY'\\n# For the live environment, additionally include your liveEndpointUrlPrefix.\\nadyen.env = :test # Set to \\&quot;live\\&quot; for live environment\\n\\n# Create the request object(s)\\nrequest_body = {\\n  :amount =&gt; {\\n    :value =&gt; 1000,\\n    :currency =&gt; 'USD'\\n  },\\n  :paymentMethod =&gt; {\\n    :cashtag =&gt; '$CASHTAG_C_TOKEN',\\n    :type =&gt; 'cashapp',\\n    :subtype =&gt; 'redirect',\\n    :storedPaymentMethodId =&gt; 'M5N7TQ4TG5PFWR50'\\n  },\\n  :merchantAccount =&gt; 'ADYEN_MERCHANT_ACCOUNT',\\n  :reference =&gt; 'YOUR_ORDER_NUMBER',\\n  :shopperReference =&gt; 'YOUR_SHOPPER_REFERENCE',\\n  :shopperInteraction =&gt; 'ContAuth',\\n  :recurringProcessingModel =&gt; 'Subscription',\\n  :channel =&gt; 'Web',\\n  :returnUrl =&gt; 'https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..'\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' =&gt; 'UUID' })&quot;},{&quot;language&quot;:&quot;ts&quot;,&quot;tabTitle&quot;:&quot;NodeJS (TypeScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v18.0.0\\n\\\/\\\/ Require the parts of the module you want to use\\nimport { Client, CheckoutAPI, Types } from \\&quot;@adyen\\\/api-library\\&quot;;\\n\\\/\\\/ Initialize the client object\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nconst client = new Client({apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot;});\\n\\n\\\/\\\/ Create the request object(s)\\nconst amount: Types.checkout.Amount = {\\n  currency: \\&quot;USD\\&quot;,\\n  value: 1000\\n};\\n\\nconst cashAppDetails: Types.checkout.CashAppDetails = {\\n  cashtag: \\&quot;$CASHTAG_C_TOKEN\\&quot;,\\n  subtype: \\&quot;redirect\\&quot;,\\n  storedPaymentMethodId: \\&quot;M5N7TQ4TG5PFWR50\\&quot;,\\n  type: Types.checkout.CashAppDetails.TypeEnum.Cashapp\\n};\\n\\nconst paymentRequest: Types.checkout.PaymentRequest = {\\n  reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  amount: amount,\\n  merchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  recurringProcessingModel: Types.checkout.PaymentRequest.RecurringProcessingModelEnum.Subscription,\\n  channel: Types.checkout.PaymentRequest.ChannelEnum.Web,\\n  paymentMethod: cashAppDetails,\\n  shopperInteraction: Types.checkout.PaymentRequest.ShopperInteractionEnum.ContAuth,\\n  returnUrl: \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  shopperReference: \\&quot;YOUR_SHOPPER_REFERENCE\\&quot;\\n};\\n\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: \\&quot;UUID\\&quot; });&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\n<h3 id=\"token-disabled\">Receive a notification when a shopper deletes stored Cash App Pay details<\/h3>\n<p>When a shopper deletes their stored payment details in Cash App Pay, Adyen sends a <code>recurring.token.disabled<\/code> webhook.<br \/>\nYou can prevent future failed payments by removing the stored token for Cash App pay and asking the shopper to use another payment method.<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example recurring.token.disabled notification'\" :id=\"'example-recurring-token-disabled'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n\\\"createdAt\\\" : \\\"2025-08-12T18:58:11+02:00\\\",\\n\\\"environment\\\" : \\\"test\\\",\\n\\\"type\\\" : \\\"recurring.token.disabled\\\",\\n\\\"data\\\" : {\\n   \\\"merchantAccount\\\" : \\\" YOUR_MERCHANT_ACCOUNT\\\",\\n   \\\"shopperReference\\\" : \\\"YOUR_SHOPPER_REFERENCE\\\",\\n   \\\"storedPaymentMethodId\\\" : \\\"G7NRRBC9H7VGGS75\\\",\\n   \\\"type\\\" : \\\"cashapp\\\"\\n},\\n\\\"eventId\\\" : \\\"N4P54KZTS2SVS3V5\\\"\\n}\"}]' :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>Test your Cash App Pay integration using the test environment. You can simulate various payment scenarios using Cash App Pay <a href=\"https:\/\/developers.cash.app\/cash-app-pay-partner-api\/guides\/technical-guides\/sandbox\/developer-sandbox#magic-values\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">magic values<\/a>. You can check the status of Cash App Pay test payments in your Customer Area, under <strong>Transactions<\/strong> &gt; <strong>Payments<\/strong>.<\/p>\n<p>When you are ready to go live, add Cash App Pay in your live Customer Area.<\/p>\n<h2 id=\"see-also\">See also<\/h2>\n<div class=\"see-also-links output-inline\" id=\"see-also\">\n<ul><li><a href=\"\/online-payments\/api-only\"\n                        target=\"_self\"\n                        >\n                    API-only integration guide\n                <\/a><\/li><li><a href=\"\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only#handle-the-redirect\"\n                        target=\"_self\"\n                        >\n                    Handling redirects\n                <\/a><\/li><li><a href=\"\/online-payments\/tokenization\"\n                        target=\"_self\"\n                        >\n                    Tokenization\n                <\/a><\/li><li><a href=\"\/risk-management\/chargeback-guidelines\/cash-app-pay-chargebacks\"\n                        target=\"_self\"\n                        >\n                    Cash App Pay chargebacks\n                <\/a><\/li><li><a href=\"https:\/\/developers.cash.app\/cash-app-pay-partner-api\/guides\/welcome\"\n                        target=\"_blank\"\n                         class=\"external\">\n                    Cash App Pay Developer Docs\n                <\/a><\/li><li><a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/CheckoutService\/latest\/overview\"\n                        target=\"_blank\"\n                         class=\"external\">\n                    API Explorer\n                <\/a><\/li><\/ul><\/div>\n","url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/cash-app-pay\/api-only","articleFields":{"description":"Add Cash App Pay to an existing API-only integration.","parameters":{"integration":"API-only","platform":"Web","integration_guide_url":"build-your-integration\/advanced-flow?platform=Web&integration=API%20only","payment_method":"Cash App Pay","payment_method_type":"cashapp","payment_method_subtype":"redirect","payment_method_type_mobile":"cashapp_wap","component_name":"cashapp","country_code":"US","currency":"USD","return_url":"https:\/\/your-company.example.com\/checkout?shopperOrder=12xy.."},"status":"current","feedback_component":true,"filters_component":false,"page_id":"530f25be-70a4-4aac-8e02-ef497b563538","decision_tree":"[]"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/cash-app-pay\/api-only","title":"Cash App Pay for API only","content":"Accept Cash App Pay payments using our APIs, and build your own payment form to have full control over the look and feel of your checkout page.\nRequirements\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nMake sure that you have built an API only integration. \n\n\nWebhooks\nEnable the Recurring tokens life cycle events webhook.\n\n\nSetup steps\nBefore you begin:Contact our Support Team to add Cash App Pay in your Customer Area. In your Customer Area go to Developer &gt; Additional data and under Payment select Recurring details. Then select Save configuration.\n\n\n\n\nFor an API-only integration, you cannot add Cash App Pay in your Customer Area yourself.\n\nBuild your payment form for Cash App Pay\nInclude Cash App Pay in the list of available payment methods.\n\nWe provide logos for Cash App Pay which you can use on your payment form. For more information, refer to Downloading logos.\n\nIf you are using the  \/paymentMethods endpoint to show available payment methods to the shopper, specify the following:\n\n countryCode&#58; US\n amount.currency&#58; USD.\n amount.value&#58; the value of the payment, in minor units.\n channel&#58; specify Web, iOS, or Android.\n\nThe response contains paymentMethod.type: cashapp.\nMake a payment\n\n\nFrom your server, make a  \/payments request, specifying:\n\npaymentMethod.type: cashapp\npaymentMethod.subtype: redirect\nchannel: specify Web, iOS, or Android.\n\n\n\n\n\n\nIn the  \/payments response, check the action object for the information that you must use to redirect the shopper.\n\n\n\n\n\nHandle the redirect\n\n\nTo complete the payment, redirect the shopper to the action.url returned in the  \/payments response, taking into account the following recommendations:\n\n\nWhen using the HTTP GET method:\nFor security reasons, when showing the redirect in the app, we recommend that you use SFSafariViewController for iOS or Chrome Custom Tabs for Android, instead of WebView objects. Also refer to the security best practices for WebView.\n\n\nRedirection for mobile integrations:\nFor mobile integrations, we strongly recommended that you redirect the shopper to the default browser of their device. Redirecting to the default browser ensures the best compatibility, handling of multi-factor authentication, app-to-app redirection, and error handling.\n\n\n\n\nAfter the shopper is redirected back to your website, check the payment result by making a POST  \/payments\/details request, specifying:\n\ndetails: object that contains the URL-decoded redirectResult returned when the shopper was redirected back to your site.\n\n\n\n\n\n\nIn the response note the following:\n\nresultCode: use this to present the result to your shopper.\npspReference: our unique identifier for the transaction.\n\n\n\n\n\n\nPresent the payment result\nUse the\u00a0 resultCode from the  \/payments\/details response to show the payment result to your shopper. You will also receive the outcome of the payment asynchronously in a webhook.\nFor Cash App Pay payments, you can receive the following resultCode values:\n\n\n\nresultCode\nDescription\nAction to take\n\n\n\n\nReceived\nThe shopper has completed the payment but the final result is not yet known.\nInform the shopper that you have received their order, and are waiting for the payment to be completed. You will receive an AUTHORISATION webhook when the status of the payment is updated.\n\n\nAuthorised\nThe payment was successful.\nInform the shopper that the payment has been successful.  If you are using manual capture, you also need to capture the payment.\n\n\nCancelled\nThe shopper cancelled the payment.\nAsk the shopper whether they want to continue with the order, or ask them to select a different payment method.\n\n\nError\nThere was an error when the payment was being processed. For more information, check the \n  refusalReason\n field.\nInform the shopper that there was an error processing their payment.\n\n\nRefused\nThe payment was refused.  For more information, check the \n  refusalReason\n field.\nAsk the shopper to try the payment again using a different payment method.\n\n\n\nRecurring and card-on-file payments\nCash App Pay supports tokenization of the shopper's payment details for future recurring and card-on-file payments. Card-on-file payments are ad-hoc payments where you use the shopper's token. By getting the shopper's permission to save their payment details when you create the token, you can bypass the shopper approval step for those future payments.\n\nWe strongly recommend that you ask explicit permission from the shopper if you intend to make future recurring or card-on-file payments. In the case of recurring payments, being transparent about the payment schedule and the amount of recurring payments reduces the risk of chargebacks.\n\nWe recommend making sure that your recurring payments include the shopper's $cashtag. The $cashtag makes it easier for the shopper to recognize the recurring payment as a legitimate one. This helps to avoid chargebacks. \nTo make tokenized payments :\n\n\nCreate a token through the initial Cash App Pay transaction for the shopper. For instructions, see Tokenization.\n\n\n\n\n\nMake sure that you have enabled receiving the shopper's $cashtag:\nIn your Customer Area, go to Developers &gt; Additional Data and select Token information for digital wallets.\n\n\nMake a POST  \/payments\/details request. For instructions, see  Submit additional payment details. \n\n\nFrom the \/payments\/details response, save the following additionalData details:\n\n\n\nParameter\nDescription\n\n\n\n\nadditionalData.cashapp.cashtag\nThe shopper's $cashtag.\n\n\nadditionalData.tokenization.shopperReference\nThe shopper reference you specified in the payment request.\n\n\nadditionalData.tokenization.storedPaymentMethodId\nThe token that was generated through the payment request.\n\n\n\nNote that the  recurring.token.created also includes the shopper reference and the recurring detail reference, but not the $cashtag.\n\n\n\n\n\nIn later recurring or card-on-file Cash App Pay payments for the shopper, include:\n\nThe parameters required for tokenized payments. For instructions, see Tokenization.\n\nTo make it easier for the shopper to recognize the payment as a legitimate one, optionally include:\n\npaymentMethod.cashtag: the shoppers $cashtag.\n\n\n\n\n\n\n\nReceive a notification when a shopper deletes stored Cash App Pay details\nWhen a shopper deletes their stored payment details in Cash App Pay, Adyen sends a recurring.token.disabled webhook.\nYou can prevent future failed payments by removing the stored token for Cash App pay and asking the shopper to use another payment method.\n\n    \n\nTest and go live\nTest your Cash App Pay integration using the test environment. You can simulate various payment scenarios using Cash App Pay magic values. You can check the status of Cash App Pay test payments in your Customer Area, under Transactions &gt; Payments.\nWhen you are ready to go live, add Cash App Pay in your live Customer Area.\nSee also\n\n\n                    API-only integration guide\n                \n                    Handling redirects\n                \n                    Tokenization\n                \n                    Cash App Pay chargebacks\n                \n                    Cash App Pay Developer Docs\n                \n                    API Explorer\n                \n","type":"page","locale":"pt","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Payment methods","lvl2":"Cash App Pay","lvl3":"Cash App Pay for API only"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/payment-methods","lvl2":"https:\/\/docs.adyen.com\/pt\/payment-methods\/cash-app-pay","lvl3":"\/pt\/payment-methods\/cash-app-pay\/api-only"},"levels":4,"category":"Payment method","category_color":"green","tags":[]},"articleFiles":{"cap-payments.js":"<p alt=\"\">cap-payments.js<\/p>","cap-recurring.js":"<p alt=\"\">cap-recurring.js<\/p>","cap-token.js":"<p alt=\"\">cap-token.js<\/p>"}}
