Payment-method icon

Android Drop-in

If you are using Android Drop-in v5.0.0 or later:

This payment method requires no additional configuration.

Follow the Android Drop-in integration guide.

Our Android Drop-in renders Cash App Pay in your payment form.

Cash App Pay is supported from version 4.12.0.

Before you begin

This page explains how to add Cash App Pay to your existing Android Drop-in integration. The Android Drop-in integration works the same way for all payment methods. If you haven't done this integration yet, refer to our Drop-in integration guide.

Before starting your Cash App Pay integration:

  1. Make sure that you have set up your back end implementation, and added Drop-in to your payment form.
  2. Contact our Support Team to enable Cash App Pay.

Show Cash App Pay in your payment form

Drop-in uses the countryCode and the amount.currency from your /paymentMethods request to show the available payment methods to your shopper.

Specify the following in your /paymentMethods request:

Optional configuration

You can add the following optional configuration:

Parameter name Description Default
setShowStorePaymentField Set to false if you don't want to show a toggle to let the shopper choose whether to save their payment details. true
setStorePaymentMethod Set to true to save the shopper's payment details without asking if they want to. Set setShowStorePaymentField to false if you use this. false

Make a payment

When the shopper proceeds to pay:

  1. From your server, make a POST /payments request, specifying:

    • paymentMethod.type: Set this to cashapp.
    • returnUrl: URL to where the shopper should be redirected back to after they complete the payment. Get this URL from the Component in the CashAppPayComponent.getReturnUrl(context).
  2. In the /payments response, note the following:

    • pspReference: Our unique identifier for the transaction.
    • resultCode: Use this to show the payment result to your shopper.
    • merchantReference: The reference from the /payments request.

Show the payment result

Use theĀ  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.

For Cash App Pay payments, you can receive the following resultCode values:

resultCode Description Action to take
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 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 field. Inform the shopper that there was an error processing their payment.
Refused The payment was refused. For more information, check the refusalReason field. Ask the shopper to try the payment again using a different payment method.

Recurring payments

Adyen's tokenization service allows you to securely store the shopper's payment details for recurring payments. To make recurring Cash App Pay payments, you first need to create a shopper token, and then use the token to make future payments for the shopper.

Create a token

To store a shopper's Cash App Pay details, set setShowStorePaymentField to true when configuring Drop-in. This shows a toggle that lets the shopper choose whether to save their details. You can also store the details automatically by setting setStorePaymentMethod to true and setShowStorePaymentField to false in the Drop-in configuration.

If the shopper chooses to save their details when making a payment, the paymentComponentData from Drop-in includes a paymentComponentData.storePaymentMethod. Pass this to your server.

To create a token, include in your /payments request:

  • storePaymentMethod: The paymentComponentState.data.storePaymentMethod from your client app.
  • shopperReference: Your unique identifier for the shopper.

Make a payment with a token

When the shopper selects to pay, Drop-in calls the onSubmit event, which contains a state.data.

  1. Pass the state.data to your server.
  2. From your server, make a /payments request, specifying:
    • paymentMethod: The state.data.paymentMethod from the onSubmit event.
    • shopperReference: The unique shopper identifier that you specified when creating the token.
    • shopperInteraction: ContAuth.
    • recurringProcessingModel: CardOnFile.

The /payments response contains:

You can also use tokens to make shopper-not-present payments for subscriptions or contracts. For more information, refer to Making a payment for a subscription or contract.

Chargebacks

Shoppers can initiate chargebacks directly with Cash App Pay up to 120 days after the payment, cancellation, or expected receipt of goods or services. For guidelines when a dispute is raised, see Cash App Pay chargebacks.

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. You can check the status of Cash App Pay test payments in your Customer Area, under Transactions > Payments.

Add Cash App Pay in your live Customer Area when you are ready to accept live payments.

See also