--- title: "Cash App Pay for API only" description: "Add Cash App Pay to an existing API-only integration." url: "https://docs.adyen.com/payment-methods/cash-app-pay/api-only" source_url: "https://docs.adyen.com/payment-methods/cash-app-pay/api-only.md" canonical: "https://docs.adyen.com/payment-methods/cash-app-pay/api-only" last_modified: "2026-05-26T13:48:55+02:00" language: "en" --- # Cash App Pay for API only Add Cash App Pay to an existing API-only integration. [View source](/payment-methods/cash-app-pay/api-only.md) 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. ## Requirements | Requirement | Description | | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Integration type** | Make sure that you have built an [API only integration](/online-payments/build-your-integration/advanced-flow?platform=Web\&integration=API%20only). | | **Webhooks** | Enable the [Recurring tokens life cycle events](/online-payments/tokenization/create-tokens#enable-the-webhook) webhook. | | **Setup steps** | Before you begin:- Contact our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other) to add Cash App Pay in your Customer Area. - In your [Customer Area](https://ca-test.adyen.com/) go to **Developer** > **Additional data** and under **Payment** select **Recurring details**. Then select **Save configuration**. | For an API-only integration, you cannot add Cash App Pay in your Customer Area yourself. ## Build your payment form for Cash App Pay Include Cash App Pay in the list of available payment methods. We provide logos for Cash App Pay which you can use on your payment form. For more information, refer to [Downloading logos](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only#downloading-logos). If you are using the [/paymentMethods](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods) endpoint to show available payment methods to the shopper, specify the following: * [countryCode](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods): **US** * [amount.currency](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods#request-amount): **USD**. * [amount.value](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods#request-amount): the value of the payment, in [minor units](/development-resources/currency-codes). * [channel](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods#request-channel): specify **Web**, **iOS**, or **Android**. The response contains `paymentMethod.type`: **cashapp**. ## Make a payment 1. From your server, make a [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) request, specifying: * `paymentMethod.type`: **cashapp** * `paymentMethod.subtype`: **redirect** * `channel`: specify **Web**, **iOS**, or **Android**. #### curl ```bash curl https://checkout-test.adyen.com/v52/payments \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'content-type: application/json' \ -d '{ "merchantAccount":"ADYEN_MERCHANT_ACCOUNT", "reference":"YOUR_ORDER_NUMBER", "amount":{ "currency":"USD", "value":1000 }, "paymentMethod":{ "type":"cashapp", "subtype":"redirect" }, "channel":"Web", "returnUrl":"https://your-company.example.com/checkout?shopperOrder=12xy.." }' ``` #### Java ```java // Adyen Java API Library v27.0.0 import com.adyen.Client; import com.adyen.enums.Environment; import com.adyen.model.checkout.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.model.RequestOptions; import com.adyen.service.checkout.*; // For the live environment, additionally include your liveEndpointUrlPrefix. Client client = new Client("ADYEN_API_KEY", Environment.TEST); // Create the request object(s) Amount amount = new Amount() .currency("USD") .value(1000L); CashAppDetails cashAppDetails = new CashAppDetails() .subtype("redirect") .type(CashAppDetails.TypeEnum.CASHAPP); PaymentRequest paymentRequest = new PaymentRequest() .reference("YOUR_ORDER_NUMBER") .amount(amount) .merchantAccount("ADYEN_MERCHANT_ACCOUNT") .channel(PaymentRequest.ChannelEnum.WEB) .paymentMethod(new CheckoutPaymentMethod(cashAppDetails)) .returnUrl("https://your-company.example.com/checkout?shopperOrder=12xy.."); // Send the request PaymentsApi service = new PaymentsApi(client); PaymentResponse response = service.payments(paymentRequest, new RequestOptions().idempotencyKey("UUID")); ``` #### PHP ```php // Adyen PHP API Library v19.0.0 use Adyen\Client; use Adyen\Environment; use Adyen\Model\Checkout\Amount; use Adyen\Model\Checkout\CheckoutPaymentMethod; use Adyen\Model\Checkout\PaymentRequest; use Adyen\Service\Checkout\PaymentsApi; $client = new Client(); $client->setXApiKey("ADYEN_API_KEY"); // For the live environment, additionally include your liveEndpointUrlPrefix. $client->setEnvironment(Environment::TEST); // Create the request object(s) $amount = new Amount(); $amount ->setCurrency("USD") ->setValue(1000); $checkoutPaymentMethod = new CheckoutPaymentMethod(); $checkoutPaymentMethod ->setSubtype("redirect") ->setType("cashapp"); $paymentRequest = new PaymentRequest(); $paymentRequest ->setReference("YOUR_ORDER_NUMBER") ->setAmount($amount) ->setMerchantAccount("ADYEN_MERCHANT_ACCOUNT") ->setChannel("Web") ->setPaymentMethod($checkoutPaymentMethod) ->setReturnUrl("https://your-company.example.com/checkout?shopperOrder=12xy.."); $requestOptions['idempotencyKey'] = 'UUID'; // Send the request $service = new PaymentsApi($client); $response = $service->payments($paymentRequest, $requestOptions); ``` #### C\# ```cs // Adyen .net API Library v17.0.0 using Adyen; using Environment = Adyen.Model.Environment; using Adyen.Model; using Adyen.Model.Checkout; using Adyen.Service.Checkout; // For the live environment, additionally include your liveEndpointUrlPrefix. var config = new Config() { XApiKey = "ADYEN_API_KEY", Environment = Environment.Test }; var client = new Client(config); // Create the request object(s) Amount amount = new Amount { Currency = "USD", Value = 1000 }; CashAppDetails cashAppDetails = new CashAppDetails { Subtype = "redirect", Type = CashAppDetails.TypeEnum.Cashapp }; PaymentRequest paymentRequest = new PaymentRequest { Reference = "YOUR_ORDER_NUMBER", Amount = amount, MerchantAccount = "ADYEN_MERCHANT_ACCOUNT", Channel = PaymentRequest.ChannelEnum.Web, PaymentMethod = new CheckoutPaymentMethod(cashAppDetails), ReturnUrl = "https://your-company.example.com/checkout?shopperOrder=12xy.." }; // Send the request var service = new PaymentsService(client); var response = service.Payments(paymentRequest, requestOptions: new RequestOptions { IdempotencyKey = "UUID"}); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v18.0.0 // Require the parts of the module you want to use const { Client, CheckoutAPI } = require('@adyen/api-library'); // Initialize the client object // For the live environment, additionally include your liveEndpointUrlPrefix. const client = new Client({apiKey: "ADYEN_API_KEY", environment: "TEST"}); // Create the request object(s) const paymentRequest = { merchantAccount: "ADYEN_MERCHANT_ACCOUNT", reference: "YOUR_ORDER_NUMBER", amount: { currency: "USD", value: 1000 }, paymentMethod: { type: "cashapp", subtype: "redirect" }, channel: "Web", returnUrl: "https://your-company.example.com/checkout?shopperOrder=12xy.." } // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` #### Go ```go // Adyen Go API Library v10.4.0 import ( "context" "github.com/adyen/adyen-go-api-library/v9/src/common" "github.com/adyen/adyen-go-api-library/v9/src/adyen" "github.com/adyen/adyen-go-api-library/v9/src/checkout" ) // For the live environment, additionally include your liveEndpointUrlPrefix. client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) amount := checkout.Amount{ Currency: "USD", Value: 1000, } cashAppDetails := checkout.CashAppDetails{ Subtype: common.PtrString("redirect"), Type: common.PtrString("cashapp"), } paymentRequest := checkout.PaymentRequest{ Reference: "YOUR_ORDER_NUMBER", Amount: amount, MerchantAccount: "ADYEN_MERCHANT_ACCOUNT", Channel: common.PtrString("Web"), PaymentMethod: checkout.CashAppDetailsAsCheckoutPaymentMethod(&cashAppDetails), ReturnUrl: "https://your-company.example.com/checkout?shopperOrder=12xy..", } // Send the request service := client.Checkout() req := service.PaymentsApi.PaymentsInput().IdempotencyKey("UUID").PaymentRequest(paymentRequest) res, httpRes, err := service.PaymentsApi.Payments(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v12.5.1 import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_API_KEY" # For the live environment, additionally include your liveEndpointUrlPrefix. adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "merchantAccount": "ADYEN_MERCHANT_ACCOUNT", "reference": "YOUR_ORDER_NUMBER", "amount": { "currency": "USD", "value": 1000 }, "paymentMethod": { "type": "cashapp", "subtype": "redirect" }, "channel": "Web", "returnUrl": "https://your-company.example.com/checkout?shopperOrder=12xy.." } # Send the request result = adyen.checkout.payments_api.payments(request=json_request, idempotency_key="UUID") ``` #### Ruby ```rb # Adyen Ruby API Library v9.5.1 require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_API_KEY' # For the live environment, additionally include your liveEndpointUrlPrefix. adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { :merchantAccount => 'ADYEN_MERCHANT_ACCOUNT', :reference => 'YOUR_ORDER_NUMBER', :amount => { :currency => 'USD', :value => 1000 }, :paymentMethod => { :type => 'cashapp', :subtype => 'redirect' }, :channel => 'Web', :returnUrl => 'https://your-company.example.com/checkout?shopperOrder=12xy..' } # Send the request result = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' => 'UUID' }) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v18.0.0 // Require the parts of the module you want to use import { Client, CheckoutAPI, Types } from "@adyen/api-library"; // Initialize the client object // For the live environment, additionally include your liveEndpointUrlPrefix. const client = new Client({apiKey: "ADYEN_API_KEY", environment: "TEST"}); // Create the request object(s) const amount: Types.checkout.Amount = { currency: "USD", value: 1000 }; const cashAppDetails: Types.checkout.CashAppDetails = { subtype: "redirect", type: Types.checkout.CashAppDetails.TypeEnum.Cashapp }; const paymentRequest: Types.checkout.PaymentRequest = { reference: "YOUR_ORDER_NUMBER", amount: amount, merchantAccount: "ADYEN_MERCHANT_ACCOUNT", channel: Types.checkout.PaymentRequest.ChannelEnum.Web, paymentMethod: cashAppDetails, returnUrl: "https://your-company.example.com/checkout?shopperOrder=12xy.." }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` 2. In the [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) response, check the `action` object for the information that you must use to redirect the shopper. **/payments response** ```json { "resultCode":"RedirectShopper", "action":{ "paymentMethodType":"cashapp", "method":"GET", "url":"https://checkoutshopper-test.adyen.com/checkoutshopper/checkoutPaymentRedirect?redirectData=...", "type":"redirect" } } ``` ## Handle the redirect 1. To complete the payment, redirect the shopper to the `action.url` returned in the [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) response, taking into account the following recommendations: * **When using the HTTP GET method:**\ For security reasons, when showing the redirect in the app, we recommend that you use [SFSafariViewController](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller) for iOS or [Chrome Custom Tabs](https://developer.chrome.com/multidevice/android/customtabs) for Android, instead of WebView objects. Also refer to the [security best practices](https://developer.android.com/topic/security/best-practices#webview) for WebView. * **Redirection for mobile integrations:**\ For 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. 2. After the shopper is redirected back to your website, check the payment result by making a POST [/payments/details](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/details) request, specifying: * `details`: object that contains the URL-decoded `redirectResult` returned when the shopper was redirected back to your site. **/payments/details request** ```bash curl https://checkout-test.adyen.com/v72/payments/details \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'content-type: application/json' \ -d '{ "details": { "redirectResult": "eyJ0cmFuc1N0YXR1cyI6IlkifQ==" } }' ``` 3. In the response note the following: * `resultCode`: use this to present the result to your shopper. * `pspReference`: our unique identifier for the transaction. **/payments/details response** ```json { "resultCode": "Authorised", "pspReference": "V4HZ4RBFJGXXGN82" } ``` ## Present the payment result Use theĀ  [resultCode](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/details#responses-200-resultCode) from the [/payments/details](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/details) response to show the payment result to your shopper. You will also receive the outcome of the payment asynchronously in a [webhook](/development-resources/webhooks). For Cash App Pay payments, you can receive the following `resultCode` values: | resultCode | Description | Action to take | | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | **Received** | The shopper has completed the payment but the final result is not yet known. | Inform 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. | | **Authorised** | The payment was successful. | Inform the shopper that the payment has been successful. If you are using manual capture, you also need to [capture](/online-payments/capture#manual-capture) the payment. | | **Cancelled** | The shopper cancelled the payment. | Ask the shopper whether they want to continue with the order, or ask them to select a different payment method. | | **Error** | There was an error when the payment was being processed. For more information, check the [`refusalReason` ](/development-resources/refusal-reasons)field. | Inform the shopper that there was an error processing their payment. | | **Refused** | The payment was refused. For more information, check the [`refusalReason` ](/development-resources/refusal-reasons)field. | Ask the shopper to try the payment again using a different payment method. | ## Recurring and card-on-file payments Cash App Pay supports [tokenization](/online-payments/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. 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. We 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. To make tokenized payments : 1. Create a token through the initial Cash App Pay transaction for the shopper. For instructions, see [Tokenization](/online-payments/tokenization). #### curl ```bash curl https://checkout-test.adyen.com/v72/payments \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'content-type: application/json' \ -X POST -d '{ "amount":{ "currency":"USD", "value":1000 }, "paymentMethod":{ "type":"cashapp", "subtype":"redirect" }, "merchantAccount":"ADYEN_MERCHANT_ACCOUNT", "reference":"YOUR_ORDER_NUMBER", "storePaymentMethod": "true", "shopperReference":"YOUR_SHOPPER_REFERENCE", "shopperInteraction": "Ecommerce", "recurringProcessingModel": "Subscription", "channel":"Web", "returnUrl":"https://your-company.example.com/checkout?shopperOrder=12xy.." }' ``` #### Java ```java // Adyen Java API Library v27.0.0 import com.adyen.Client; import com.adyen.enums.Environment; import com.adyen.model.checkout.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.model.RequestOptions; import com.adyen.service.checkout.*; // For the live environment, additionally include your liveEndpointUrlPrefix. Client client = new Client("ADYEN_API_KEY", Environment.TEST); // Create the request object(s) Amount amount = new Amount() .currency("USD") .value(1000L); CashAppDetails cashAppDetails = new CashAppDetails() .subtype("redirect") .type(CashAppDetails.TypeEnum.CASHAPP); PaymentRequest paymentRequest = new PaymentRequest() .reference("YOUR_ORDER_NUMBER") .amount(amount) .storePaymentMethod(true) .merchantAccount("ADYEN_MERCHANT_ACCOUNT") .recurringProcessingModel(PaymentRequest.RecurringProcessingModelEnum.SUBSCRIPTION) .channel(PaymentRequest.ChannelEnum.WEB) .paymentMethod(new CheckoutPaymentMethod(cashAppDetails)) .shopperInteraction(PaymentRequest.ShopperInteractionEnum.ECOMMERCE) .returnUrl("https://your-company.example.com/checkout?shopperOrder=12xy..") .shopperReference("YOUR_SHOPPER_REFERENCE"); // Send the request PaymentsApi service = new PaymentsApi(client); PaymentResponse response = service.payments(paymentRequest, new RequestOptions().idempotencyKey("UUID")); ``` #### PHP ```php // Adyen PHP API Library v19.0.0 use Adyen\Client; use Adyen\Environment; use Adyen\Model\Checkout\Amount; use Adyen\Model\Checkout\CheckoutPaymentMethod; use Adyen\Model\Checkout\PaymentRequest; use Adyen\Service\Checkout\PaymentsApi; $client = new Client(); $client->setXApiKey("ADYEN_API_KEY"); // For the live environment, additionally include your liveEndpointUrlPrefix. $client->setEnvironment(Environment::TEST); // Create the request object(s) $amount = new Amount(); $amount ->setCurrency("USD") ->setValue(1000); $checkoutPaymentMethod = new CheckoutPaymentMethod(); $checkoutPaymentMethod ->setSubtype("redirect") ->setType("cashapp"); $paymentRequest = new PaymentRequest(); $paymentRequest ->setReference("YOUR_ORDER_NUMBER") ->setAmount($amount) ->setStorePaymentMethod(true) ->setMerchantAccount("ADYEN_MERCHANT_ACCOUNT") ->setRecurringProcessingModel("Subscription") ->setChannel("Web") ->setPaymentMethod($checkoutPaymentMethod) ->setShopperInteraction("Ecommerce") ->setReturnUrl("https://your-company.example.com/checkout?shopperOrder=12xy..") ->setShopperReference("YOUR_SHOPPER_REFERENCE"); $requestOptions['idempotencyKey'] = 'UUID'; // Send the request $service = new PaymentsApi($client); $response = $service->payments($paymentRequest, $requestOptions); ``` #### C\# ```cs // Adyen .net API Library v17.0.0 using Adyen; using Environment = Adyen.Model.Environment; using Adyen.Model; using Adyen.Model.Checkout; using Adyen.Service.Checkout; // For the live environment, additionally include your liveEndpointUrlPrefix. var config = new Config() { XApiKey = "ADYEN_API_KEY", Environment = Environment.Test }; var client = new Client(config); // Create the request object(s) Amount amount = new Amount { Currency = "USD", Value = 1000 }; CashAppDetails cashAppDetails = new CashAppDetails { Subtype = "redirect", Type = CashAppDetails.TypeEnum.Cashapp }; PaymentRequest paymentRequest = new PaymentRequest { Reference = "YOUR_ORDER_NUMBER", Amount = amount, StorePaymentMethod = true, MerchantAccount = "ADYEN_MERCHANT_ACCOUNT", RecurringProcessingModel = PaymentRequest.RecurringProcessingModelEnum.Subscription, Channel = PaymentRequest.ChannelEnum.Web, PaymentMethod = new CheckoutPaymentMethod(cashAppDetails), ShopperInteraction = PaymentRequest.ShopperInteractionEnum.Ecommerce, ReturnUrl = "https://your-company.example.com/checkout?shopperOrder=12xy..", ShopperReference = "YOUR_SHOPPER_REFERENCE" }; // Send the request var service = new PaymentsService(client); var response = service.Payments(paymentRequest, requestOptions: new RequestOptions { IdempotencyKey = "UUID"}); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v18.0.0 // Require the parts of the module you want to use const { Client, CheckoutAPI } = require('@adyen/api-library'); // Initialize the client object // For the live environment, additionally include your liveEndpointUrlPrefix. const client = new Client({apiKey: "ADYEN_API_KEY", environment: "TEST"}); // Create the request object(s) const paymentRequest = { amount: { currency: "USD", value: 1000 }, paymentMethod: { type: "cashapp", subtype: "redirect" }, merchantAccount: "ADYEN_MERCHANT_ACCOUNT", reference: "YOUR_ORDER_NUMBER", storePaymentMethod: "true", shopperReference: "YOUR_SHOPPER_REFERENCE", shopperInteraction: "Ecommerce", recurringProcessingModel: "Subscription", channel: "Web", returnUrl: "https://your-company.example.com/checkout?shopperOrder=12xy.." } // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` #### Go ```go // Adyen Go API Library v10.4.0 import ( "context" "github.com/adyen/adyen-go-api-library/v9/src/common" "github.com/adyen/adyen-go-api-library/v9/src/adyen" "github.com/adyen/adyen-go-api-library/v9/src/checkout" ) // For the live environment, additionally include your liveEndpointUrlPrefix. client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) amount := checkout.Amount{ Currency: "USD", Value: 1000, } cashAppDetails := checkout.CashAppDetails{ Subtype: common.PtrString("redirect"), Type: common.PtrString("cashapp"), } paymentRequest := checkout.PaymentRequest{ Reference: "YOUR_ORDER_NUMBER", Amount: amount, StorePaymentMethod: common.PtrBool(true), MerchantAccount: "ADYEN_MERCHANT_ACCOUNT", RecurringProcessingModel: common.PtrString("Subscription"), Channel: common.PtrString("Web"), PaymentMethod: checkout.CashAppDetailsAsCheckoutPaymentMethod(&cashAppDetails), ShopperInteraction: common.PtrString("Ecommerce"), ReturnUrl: "https://your-company.example.com/checkout?shopperOrder=12xy..", ShopperReference: common.PtrString("YOUR_SHOPPER_REFERENCE"), } // Send the request service := client.Checkout() req := service.PaymentsApi.PaymentsInput().IdempotencyKey("UUID").PaymentRequest(paymentRequest) res, httpRes, err := service.PaymentsApi.Payments(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v12.5.1 import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_API_KEY" # For the live environment, additionally include your liveEndpointUrlPrefix. adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "amount": { "currency": "USD", "value": 1000 }, "paymentMethod": { "type": "cashapp", "subtype": "redirect" }, "merchantAccount": "ADYEN_MERCHANT_ACCOUNT", "reference": "YOUR_ORDER_NUMBER", "storePaymentMethod": "True", "shopperReference": "YOUR_SHOPPER_REFERENCE", "shopperInteraction": "Ecommerce", "recurringProcessingModel": "Subscription", "channel": "Web", "returnUrl": "https://your-company.example.com/checkout?shopperOrder=12xy.." } # Send the request result = adyen.checkout.payments_api.payments(request=json_request, idempotency_key="UUID") ``` #### Ruby ```rb # Adyen Ruby API Library v9.5.1 require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_API_KEY' # For the live environment, additionally include your liveEndpointUrlPrefix. adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { :amount => { :currency => 'USD', :value => 1000 }, :paymentMethod => { :type => 'cashapp', :subtype => 'redirect' }, :merchantAccount => 'ADYEN_MERCHANT_ACCOUNT', :reference => 'YOUR_ORDER_NUMBER', :storePaymentMethod => 'true', :shopperReference => 'YOUR_SHOPPER_REFERENCE', :shopperInteraction => 'Ecommerce', :recurringProcessingModel => 'Subscription', :channel => 'Web', :returnUrl => 'https://your-company.example.com/checkout?shopperOrder=12xy..' } # Send the request result = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' => 'UUID' }) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v18.0.0 // Require the parts of the module you want to use import { Client, CheckoutAPI, Types } from "@adyen/api-library"; // Initialize the client object // For the live environment, additionally include your liveEndpointUrlPrefix. const client = new Client({apiKey: "ADYEN_API_KEY", environment: "TEST"}); // Create the request object(s) const amount: Types.checkout.Amount = { currency: "USD", value: 1000 }; const cashAppDetails: Types.checkout.CashAppDetails = { subtype: "redirect", type: Types.checkout.CashAppDetails.TypeEnum.Cashapp }; const paymentRequest: Types.checkout.PaymentRequest = { reference: "YOUR_ORDER_NUMBER", amount: amount, storePaymentMethod: true, merchantAccount: "ADYEN_MERCHANT_ACCOUNT", recurringProcessingModel: Types.checkout.PaymentRequest.RecurringProcessingModelEnum.Subscription, channel: Types.checkout.PaymentRequest.ChannelEnum.Web, paymentMethod: cashAppDetails, shopperInteraction: Types.checkout.PaymentRequest.ShopperInteractionEnum.Ecommerce, returnUrl: "https://your-company.example.com/checkout?shopperOrder=12xy..", shopperReference: "YOUR_SHOPPER_REFERENCE" }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` 2. Make sure that you have enabled receiving the shopper's $cashtag:\ In your Customer Area, go to **Developers** > **Additional Data** and select **Token information for digital wallets**. 3. Make a POST [/payments/details](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/details) request. For instructions, see [Submit additional payment details](/online-payments/build-your-integration/advanced-flow?platform=Web\&integration=API-only\&version=latest#send-additional-payment-details). 4. From the `/payments/details` response, save the following `additionalData` details: | Parameter | Description | | --------------------------------------------------- | ----------------------------------------------------------- | | `additionalData.cashapp.cashtag` | The shopper's $cashtag. | | `additionalData.tokenization.shopperReference` | The shopper reference you specified in the payment request. | | `additionalData.tokenization.storedPaymentMethodId` | The token that was generated through the payment request. | Note that the [recurring.token.created](https://docs.adyen.com/api-explorer/Tokenization-webhooks/latest/post/recurring.token.created) also includes the shopper reference and the recurring detail reference, but not the $cashtag. **/payments/details response with $cashtag and recurring details** ```json { "additionalData": { "cashapp.cashtag": "$CASHTAG_C_TOKEN", "tokenization.shopperReference": "YOUR_SHOPPER_REFERENCE", "tokenization.storedPaymentMethodId": "M5N7TQ4TG5PFWR50" }, "amount":{ "currency":"USD", "value":1000 }, "merchantRreference":"YOUR_ORDER_NUMBER", "paymentMethod":{ "type":"cashapp", "subtype":"redirect" }, "pspReference":"V4HZ4RBFJGXXGN82", "resultCode":"Authorised" } ``` 5. In later recurring or card-on-file Cash App Pay payments for the shopper, include: * The parameters required for tokenized payments. For instructions, see [Tokenization](/online-payments/tokenization). To make it easier for the shopper to recognize the payment as a legitimate one, optionally include: * `paymentMethod.cashtag`: the shoppers $cashtag. #### curl ```bash curl https://checkout-test.adyen.com/v72/payments \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'content-type: application/json' \ -d '{ "amount":{ "value":1000, "currency":"USD" }, "channel":"Web", "paymentMethod":{ "cashtag":"$CASHTAG_C_TOKEN", "storedPaymentMethodId":"M5N7TQ4TG5PFWR50", "type":"cashapp", "subtype":"redirect" }, "merchantAccount":"ADYEN_MERCHANT_ACCOUNT", "recurringProcessingModel": "Subscription", "reference":"YOUR_ORDER_NUMBER", "returnUrl":"https://your-company.example.com/checkout?shopperOrder=12xy.." "shopperInteraction":"ContAuth", "shopperReference":"YOUR_SHOPPER_REFERENCE" }' ``` #### Java ```java // Adyen Java API Library v27.0.0 import com.adyen.Client; import com.adyen.enums.Environment; import com.adyen.model.checkout.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.model.RequestOptions; import com.adyen.service.checkout.*; // For the live environment, additionally include your liveEndpointUrlPrefix. Client client = new Client("ADYEN_API_KEY", Environment.TEST); // Create the request object(s) Amount amount = new Amount() .currency("USD") .value(1000L); CashAppDetails cashAppDetails = new CashAppDetails() .cashtag("$CASHTAG_C_TOKEN"), .subtype("redirect") .storedPaymentMethodId("M5N7TQ4TG5PFWR50") .type(CashAppDetails.TypeEnum.CASHAPP); PaymentRequest paymentRequest = new PaymentRequest() .reference("YOUR_ORDER_NUMBER") .amount(amount) .merchantAccount("ADYEN_MERCHANT_ACCOUNT") .recurringProcessingModel(PaymentRequest.RecurringProcessingModelEnum.SUBSCRIPTION) .channel(PaymentRequest.ChannelEnum.WEB) .paymentMethod(new CheckoutPaymentMethod(cashAppDetails)) .shopperInteraction(PaymentRequest.ShopperInteractionEnum.CONTAUTH) .returnUrl("https://your-company.example.com/checkout?shopperOrder=12xy..") .shopperReference("YOUR_SHOPPER_REFERENCE"); // Send the request PaymentsApi service = new PaymentsApi(client); PaymentResponse response = service.payments(paymentRequest, new RequestOptions().idempotencyKey("UUID")); ``` #### PHP ```php // Adyen PHP API Library v19.0.0 use Adyen\Client; use Adyen\Environment; use Adyen\Model\Checkout\Amount; use Adyen\Model\Checkout\CheckoutPaymentMethod; use Adyen\Model\Checkout\PaymentRequest; use Adyen\Service\Checkout\PaymentsApi; $client = new Client(); $client->setXApiKey("ADYEN_API_KEY"); // For the live environment, additionally include your liveEndpointUrlPrefix. $client->setEnvironment(Environment::TEST); // Create the request object(s) $amount = new Amount(); $amount ->setCurrency("USD") ->setValue(1000); $checkoutPaymentMethod = new CheckoutPaymentMethod(); $checkoutPaymentMethod ->setCashtag("$CASHTAG_C_TOKEN") ->setSubtype("redirect") ->setStoredPaymentMethodId("M5N7TQ4TG5PFWR50") ->setType("cashapp"); $paymentRequest = new PaymentRequest(); $paymentRequest ->setReference("YOUR_ORDER_NUMBER") ->setAmount($amount) ->setMerchantAccount("ADYEN_MERCHANT_ACCOUNT") ->setRecurringProcessingModel("Subscription") ->setChannel("Web") ->setPaymentMethod($checkoutPaymentMethod) ->setShopperInteraction("ContAuth") ->setReturnUrl("https://your-company.example.com/checkout?shopperOrder=12xy..") ->setShopperReference("YOUR_SHOPPER_REFERENCE"); $requestOptions['idempotencyKey'] = 'UUID'; // Send the request $service = new PaymentsApi($client); $response = $service->payments($paymentRequest, $requestOptions); ``` #### C\# ```cs // Adyen .net API Library v17.0.0 using Adyen; using Environment = Adyen.Model.Environment; using Adyen.Model; using Adyen.Model.Checkout; using Adyen.Service.Checkout; // For the live environment, additionally include your liveEndpointUrlPrefix. var config = new Config() { XApiKey = "ADYEN_API_KEY", Environment = Environment.Test }; var client = new Client(config); // Create the request object(s) Amount amount = new Amount { Currency = "USD", Value = 1000 }; CashAppDetails cashAppDetails = new CashAppDetails { Cashtag = "$CASHTAG_C_TOKEN", Subtype = "redirect", StoredPaymentMethodId = "M5N7TQ4TG5PFWR50", Type = CashAppDetails.TypeEnum.Cashapp }; PaymentRequest paymentRequest = new PaymentRequest { Reference = "YOUR_ORDER_NUMBER", Amount = amount, MerchantAccount = "ADYEN_MERCHANT_ACCOUNT", RecurringProcessingModel = PaymentRequest.RecurringProcessingModelEnum.Subscription, Channel = PaymentRequest.ChannelEnum.Web, PaymentMethod = new CheckoutPaymentMethod(cashAppDetails), ShopperInteraction = PaymentRequest.ShopperInteractionEnum.ContAuth, ReturnUrl = "https://your-company.example.com/checkout?shopperOrder=12xy..", ShopperReference = "YOUR_SHOPPER_REFERENCE" }; // Send the request var service = new PaymentsService(client); var response = service.Payments(paymentRequest, requestOptions: new RequestOptions { IdempotencyKey = "UUID"}); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v18.0.0 // Require the parts of the module you want to use const { Client, CheckoutAPI } = require('@adyen/api-library'); // Initialize the client object // For the live environment, additionally include your liveEndpointUrlPrefix. const client = new Client({apiKey: "ADYEN_API_KEY", environment: "TEST"}); // Create the request object(s) const paymentRequest = { amount: { value: 1000, currency: "USD" }, paymentMethod: { cashtag: "$CASHTAG_C_TOKEN", type: "cashapp", subtype: "redirect", storedPaymentMethodId: "M5N7TQ4TG5PFWR50" }, merchantAccount: "ADYEN_MERCHANT_ACCOUNT", reference: "YOUR_ORDER_NUMBER", shopperReference: "YOUR_SHOPPER_REFERENCE", shopperInteraction: "ContAuth", recurringProcessingModel: "Subscription", channel: "Web", returnUrl: "https://your-company.example.com/checkout?shopperOrder=12xy.." } // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` #### Go ```go // Adyen Go API Library v10.4.0 import ( "context" "github.com/adyen/adyen-go-api-library/v9/src/common" "github.com/adyen/adyen-go-api-library/v9/src/adyen" "github.com/adyen/adyen-go-api-library/v9/src/checkout" ) // For the live environment, additionally include your liveEndpointUrlPrefix. client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) amount := checkout.Amount{ Currency: "USD", Value: 1000, } cashAppDetails := checkout.CashAppDetails{ Cashtag: common.PtrString("$CASHTAG_C_TOKEN"), Subtype: common.PtrString("redirect"), StoredPaymentMethodId: common.PtrString("M5N7TQ4TG5PFWR50"), Type: common.PtrString("cashapp"), } paymentRequest := checkout.PaymentRequest{ Reference: "YOUR_ORDER_NUMBER", Amount: amount, MerchantAccount: "ADYEN_MERCHANT_ACCOUNT", RecurringProcessingModel: common.PtrString("Subscription"), Channel: common.PtrString("Web"), PaymentMethod: checkout.CashAppDetailsAsCheckoutPaymentMethod(&cashAppDetails), ShopperInteraction: common.PtrString("ContAuth"), ReturnUrl: "https://your-company.example.com/checkout?shopperOrder=12xy..", ShopperReference: common.PtrString("YOUR_SHOPPER_REFERENCE"), } // Send the request service := client.Checkout() req := service.PaymentsApi.PaymentsInput().IdempotencyKey("UUID").PaymentRequest(paymentRequest) res, httpRes, err := service.PaymentsApi.Payments(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v12.5.1 import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_API_KEY" # For the live environment, additionally include your liveEndpointUrlPrefix. adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "amount": { "value": 1000, "currency": "USD" }, "paymentMethod": { "cashtag": "$CASHTAG_C_TOKEN", "type": "cashapp", "subtype": "redirect", "storedPaymentMethodId": "M5N7TQ4TG5PFWR50" }, "merchantAccount": "ADYEN_MERCHANT_ACCOUNT", "reference": "YOUR_ORDER_NUMBER", "shopperReference": "YOUR_SHOPPER_REFERENCE", "shopperInteraction": "ContAuth", "recurringProcessingModel": "Subscription", "channel": "Web", "returnUrl": "https://your-company.example.com/checkout?shopperOrder=12xy.." } # Send the request result = adyen.checkout.payments_api.payments(request=json_request, idempotency_key="UUID") ``` #### Ruby ```rb # Adyen Ruby API Library v9.5.1 require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_API_KEY' # For the live environment, additionally include your liveEndpointUrlPrefix. adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { :amount => { :value => 1000, :currency => 'USD' }, :paymentMethod => { :cashtag => '$CASHTAG_C_TOKEN', :type => 'cashapp', :subtype => 'redirect', :storedPaymentMethodId => 'M5N7TQ4TG5PFWR50' }, :merchantAccount => 'ADYEN_MERCHANT_ACCOUNT', :reference => 'YOUR_ORDER_NUMBER', :shopperReference => 'YOUR_SHOPPER_REFERENCE', :shopperInteraction => 'ContAuth', :recurringProcessingModel => 'Subscription', :channel => 'Web', :returnUrl => 'https://your-company.example.com/checkout?shopperOrder=12xy..' } # Send the request result = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' => 'UUID' }) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v18.0.0 // Require the parts of the module you want to use import { Client, CheckoutAPI, Types } from "@adyen/api-library"; // Initialize the client object // For the live environment, additionally include your liveEndpointUrlPrefix. const client = new Client({apiKey: "ADYEN_API_KEY", environment: "TEST"}); // Create the request object(s) const amount: Types.checkout.Amount = { currency: "USD", value: 1000 }; const cashAppDetails: Types.checkout.CashAppDetails = { cashtag: "$CASHTAG_C_TOKEN", subtype: "redirect", storedPaymentMethodId: "M5N7TQ4TG5PFWR50", type: Types.checkout.CashAppDetails.TypeEnum.Cashapp }; const paymentRequest: Types.checkout.PaymentRequest = { reference: "YOUR_ORDER_NUMBER", amount: amount, merchantAccount: "ADYEN_MERCHANT_ACCOUNT", recurringProcessingModel: Types.checkout.PaymentRequest.RecurringProcessingModelEnum.Subscription, channel: Types.checkout.PaymentRequest.ChannelEnum.Web, paymentMethod: cashAppDetails, shopperInteraction: Types.checkout.PaymentRequest.ShopperInteractionEnum.ContAuth, returnUrl: "https://your-company.example.com/checkout?shopperOrder=12xy..", shopperReference: "YOUR_SHOPPER_REFERENCE" }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` ### Receive a notification when a shopper deletes stored Cash App Pay details When a shopper deletes their stored payment details in Cash App Pay, Adyen sends a `recurring.token.disabled` webhook.\ You can prevent future failed payments by removing the stored token for Cash App pay and asking the shopper to use another payment method. **Example recurring.token.disabled notification** ```json { "createdAt" : "2025-08-12T18:58:11+02:00", "environment" : "test", "type" : "recurring.token.disabled", "data" : { "merchantAccount" : " YOUR_MERCHANT_ACCOUNT", "shopperReference" : "YOUR_SHOPPER_REFERENCE", "storedPaymentMethodId" : "G7NRRBC9H7VGGS75", "type" : "cashapp" }, "eventId" : "N4P54KZTS2SVS3V5" } ``` ## Test and go live Test your Cash App Pay integration using the test environment. You can simulate various payment scenarios using Cash App Pay [magic values](https://developers.cash.app/cash-app-pay-partner-api/guides/technical-guides/sandbox/developer-sandbox#magic-values). You can check the status of Cash App Pay test payments in your Customer Area, under **Transactions** > **Payments**. When you are ready to go live, add Cash App Pay in your live Customer Area. ## See also * [API-only integration guide](/online-payments/api-only) * [Handling redirects](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only#handle-the-redirect) * [Tokenization](/online-payments/tokenization) * [Cash App Pay chargebacks](/risk-management/chargeback-guidelines/cash-app-pay-chargebacks) * [Cash App Pay Developer Docs](https://developers.cash.app/cash-app-pay-partner-api/guides/welcome) * [API Explorer](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/overview)