--- title: "PayMe Redirect Component" description: "Add PayMe to an existing Components integration." url: "https://docs.adyen.com/payment-methods/payme/android-component" source_url: "https://docs.adyen.com/payment-methods/payme/android-component.md" canonical: "https://docs.adyen.com/payment-methods/payme/android-component" last_modified: "2026-05-25T12:55:01+02:00" language: "en" --- # PayMe Redirect Component Add PayMe to an existing Components integration. [View source](/payment-methods/payme/android-component.md) Use our [Redirect Component](/online-payments/build-your-integration/sessions-flow/?platform=Android\&integration=Components#handle-a-redirect) to handle the redirect to the PayMe app. When adding PayMe to your existing Components integration, you also need to: 1. [Show PayMe in your payment form](#show-in-payment-form). 2. [Handle the redirect result](#handle-the-redirect) when the shopper returns to your app. PayMe is supported from Android Components version 4.0.0. ## Requirements | Requirement | Description | | -------------------- | -------------------------------------------------------------------------------------------------------------- | | **Integration type** | Make sure that you have built your [Anddroid Components integration](/online-payments/build-your-integration). | | **Setup steps** | Before you begin, [add PayMe in your test Customer Area](/payment-methods/add-payment-methods). | ## Show PayMe in your payment form Include PayMe in the list of available payment methods. 1. Specify in your [/paymentMethods](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods) request: * [countryCode](https://docs.adyen.com/api-explorer/#/PaymentSetupAndVerificationService/latest/paymentMethods): **HK**. * [amount.currency](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods#request-amount): **HKD**. The response contains `paymentMethod.type`: **payme**. ## Make a payment 1. When the shopper selects the button to pay, make a [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) request, specifying: | Parameter name | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | | `paymentMethod.type` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | **payme** | | `returnURL` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The URL to redirect the shopper back to after they complete the payment. Get this URL from the Component in the `RedirectComponent.getReturnUrl(context)`. | | `channel` | | To determine whether the shopper is using a desktop, laptop or mobile. | | [`lineItems.quantity`](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions#request-lineItems-quantity) | | The number of items. Must be between 0 and 9999. | | [`lineItems.sku`](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions#request-lineItems-sku) | | The stock keeping unit. Maximum length 200 characters. | | [`lineItems.description`](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions#request-lineItems-description) | | The order description to display to the shopper. Maximum length 200 characters. | | [`lineItems.amountIncludingTax`](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions#request-lineItems-amountIncludingTax) | | Item amount including the tax, in minor units. Must be between 1 and 100000000. | | [`lineItems.itemCategory`](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions#request-lineItems-itemCategory) | | The item category. Maximum length 200 characters. | **/payments request** ```kotlin const {Client, Config, CheckoutAPI} = require('@adyen/api-library'); const config = new Config(); // Set ADYEN_API_KEY with your API key from the Customer Area. config.apiKey = 'ADYEN_API_KEY'; config.merchantAccount = '[MERCHANT_ACCOUNT]'; const client = new Client({ config }); client.setEnvironment("TEST"); const checkout = new CheckoutAPI(client); checkout.payments({ "paymentMethod": { "type": "payme" }, "amount": { "currency": "HKD", "value": 4200 }, "countryCode": "HK", "merchantAccount": "ADYEN_MERCHANT_ACCOUNT", "reference": "YOUR_ORDER_REFERENCE", "returnUrl": "https://your-company.example.com/...", "channel":"Android", "lineItems": [ { "quantity": "1", "sku": "3232", "description": "Shoes", "amountIncludingTax": 4200, "itemCategory": "Fashion" } ] }) ``` The [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) response contains: * `action`: Object containing information about the redirect. ``` ~~~~ json { "resultCode": "RedirectShopper", "action": { "expiresAt": "2021-01-30T16:09:09Z", "paymentMethodType": "payme", "url": "https://qr.payme.hsbc.com.hk/...", "method": "GET", "type": "redirect" } } ~~~~ ``` 1. Pass the `action` object to your client app. You need this to initialize the Redirect Component. ## Handle the redirect 1. Use the [Redirect Component](/online-payments/build-your-integration/sessions-flow/?platform=Android\&integration=Components#handle-a-redirect) to redirect the shopper to PayMe. 2. After the shopper returns to your app, make a POST [/payments/details](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/details) request from your server, providing: * `details`: The `actionComponentData.details` object from the Redirect Component. **/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==" } }' ``` You receive a response containing: * `resultCode`: Use this to present the payment result to your shopper. * `pspReference`: Our unique identifier for the transaction. **/payments/details response** ```json { "resultCode": "Authorised", "pspReference": "PPKFQ89R6QRXGN82" } ``` See the [Android Components integration guide](/online-payments/build-your-integration/sessions-flow?platform=Android\&integration=Components) to get the payment outcome and show your shopper the result of the payment. ## Test and go live Use the PayMe sandbox to test your integration. You do not need to use the PayMe app to test using the sandbox. Use the amounts specified below to simulate different payment outcomes. | Amount ending in | Result | Description | | ---------------- | -------------- | ----------------------------------------------------------------------------- | | 30 or 81 | Authorised | Successful payment. | | 77 or 90 | OfferCancelled | The payment request expired after PayMe's default expiry time of ten minutes. | | 40 or 44 | Error | There was an error when creating the payment request. | ## See also * [Android Components integration guide](/online-payments/build-your-integration/sessions-flow?platform=Android\&integration=Components) * [Webhooks](/development-resources/webhooks) * [API Explorer](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/overview)