---
title: "PayMe Component"
description: "Add PayMe QR to an existing Components integration."
url: "https://docs.adyen.com/payment-methods/payme/web-component"
source_url: "https://docs.adyen.com/payment-methods/payme/web-component.md"
canonical: "https://docs.adyen.com/payment-methods/payme/web-component"
last_modified: "2019-09-06T17:19:00+02:00"
language: "en"
---

# PayMe Component

Add PayMe QR to an existing Components integration.

[View source](/payment-methods/payme/web-component.md)

This page explains how to add PayMe to your existing Web Components integration.

Depending on whether your shopper is using a desktop or laptop, or the browser on their mobile device, the [Component](/online-payments/build-your-integration/sessions-flow?platform=Web\&integration=Components):

* Shows the shopper a QR code which they can scan to pay using their PayMe app.
* Redirects the shopper to the PayMe app on their mobile device.

Implement both flows to make sure that your shoppers can pay on different devices.

PayMe is supported from Web Components version 5.56.0.

## Requirements

Select the [server-side flow](/online-payments/build-your-integration) that your integration uses:

### Tab: Sessions flow

| Requirement          | Description                                                                                                                                                             |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Integration type** | Make sure that you have built a Sessions flow [Web Components integration](/online-payments/build-your-integration/sessions-flow?platform=Web\&integration=Components). |
| **Setup steps**      | Before you begin, [add PayMe in your Customer Area](/payment-methods/add-payment-methods).                                                                              |

### Tab: Advanced flow

| Requirement          | Description                                                                                                                                                              |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Integration type** | Make sure that you have built an Advanced flow [Web Components integration](/online-payments/build-your-integration/advanced-flow?platform=Web\&integration=Components). |
| **Setup steps**      | Before you begin, [add PayMe in your Customer Area](/payment-methods/add-payment-methods).                                                                               |

## Import resources for v6

If you are using Web Components v6, [import the Component](/online-payments/build-your-integration/?platform=Web\&integration=Drop-in\&version=6.0.0) that you need for PayMe:

```js
import { AdyenCheckout, PayMe } from '@adyen/adyen-web'
```

## API reference

Select which endpoint you are using:

### Tab: `/sessions`

This is the default with [Components v5.0.0](/online-payments/build-your-integration/sessions-flow?platform=Web\&integration=Components) or later.

| Parameter name                                                                                                                           | Required | Description                                                                                             |
| ---------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------- |
| [`channel`](https://docs.adyen.com/api-explorer/Checkout/71/post/sessions#request-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. Available if you use Checkout API v70 and later. |
| [`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.                                                       |

### Tab: `/payments`

If you implemented an [additional use case](/online-payments/build-your-integration).

| Parameter name                                                                                                                           | Required | Description                                                                                             |
| ---------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------- |
| [`channel`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-channel)                                           |          | To determine whether the shopper is using a desktop, laptop or mobile.                                  |
| [`lineItems.quantity`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-lineItems-quantity)                     |          | The number of items. Must be between 0 and 9999.                                                        |
| [`lineItems.sku`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-lineItems-sku)                               |          | The stock keeping unit. Maximum length 200 characters. Available if you use Checkout API v70 and later. |
| [`lineItems.description`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#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/payments#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/payments#request-lineItems-itemCategory)             |          | The item category. Maximum length 200 characters.                                                       |

### Tab: Desktop flow

#### curl

```bash
curl https://checkout-test.adyen.com/v72/payments \
-H 'x-api-key: ADYEN_API_KEY' \
-H 'content-type: application/json' \
-d '{
    "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":"Web",
    "lineItems": [
      {
        "quantity": "1",
        "sku": "3232",
        "description": "Shoes",
        "amountIncludingTax": 4200,
        "itemCategory": "Fashion"
      }
    ]
}'
```

#### NodeJS (JavaScript)

```js
// Set your X-API-KEY with the API key from the Customer Area.
const {Client, Config, CheckoutAPI} = require('@adyen/api-library');
const config = new Config();
// Set your X-API-KEY with the API key from the Customer Area.
config.apiKey = '[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": "YOUR_MERCHANT_ACCOUNT",
    "reference": "YOUR_ORDER_REFERENCE",
    "returnUrl": "https://your-company.example.com/...",
    "channel":"Web",
    "lineItems": [
      {
        "quantity": "1",
        "sku": "3232",
        "description": "Shoes",
        "amountIncludingTax": 4200,
        "itemCategory": "Fashion"
      }
    ]
  })
```

### Tab: Mobile flow

#### curl

```bash
curl https://checkout-test.adyen.com/v72/payments \
-H 'x-api-key: ADYEN_API_KEY' \
-H 'content-type: application/json' \
-d '{
    "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":"Web",
    "lineItems": [
      {
        "quantity": "1",
        "sku": "3232",
        "description": "Shoes",
        "amountIncludingTax": 4200,
        "itemCategory": "Fashion"
      }
    ]
}'
```

#### NodeJS (JavaScript)

```js
// Set your X-API-KEY with the API key from the Customer Area.
const {Client, Config, CheckoutAPI} = require('@adyen/api-library');
const config = new Config();
// Set your X-API-KEY with the API key from the Customer Area.
config.apiKey = '[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": "YOUR_MERCHANT_ACCOUNT",
    "reference": "YOUR_ORDER_REFERENCE",
    "returnUrl": "https://your-company.example.com/...",
    "channel":"Web/iOS/Android",
    "lineItems": [
      {
        "quantity": "1",
        "sku": "3232",
        "description": "Shoes",
        "amountIncludingTax": 4200,
        "itemCategory": "Fashion"
      }
    ]
  })
```

See the [Web Components integration guide](/online-payments/build-your-integration/sessions-flow?platform=Web\&integration=Components) to get the payment outcome and show your shopper the result of the payment.

## Component configuration

### Step 1: Create a DOM element

Create a DOM element on your checkout page, placing it where you want the payment method form to be rendered:

```html
 <div id="payme-container"></div>
```

### Step 2: Create an instance of the Component

#### v6.0.0 or later

Create an instance of the Component, passing:

* Your instance of `AdyenCheckout`.

```js
const payMe = new PayMe(checkout).mount('#payme-container');
```

**

#### v5.x.x or earlier

Use the `create` method of your `AdyenCheckout` instance, in this case `checkout`, to create the Component:

```js
const payMeComponent = checkout.create('payme').mount('#payme-container');
```

## 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.                         |
