Payment-method icon

PayMe Drop-in integration

Add PayMe to an existing Drop-in integration.

Our Android Drop-in renders PayMe in your payment form, and redirects the shopper to the PayMe app to complete the payment.

PayMe is supported from Android Drop-in version 4.0.0.

Requirements

Requirement Description
Integration type Make sure that you have built an Advanced flow Android Drop-in integration.
Setup steps Before you begin, add PayMe in your Customer Area.

API reference

If you implemented an additional use case.

Parameter name Required Description
channel To determine whether the shopper is using a desktop, laptop or mobile.
lineItems.quantity The number of items. Must be between 0 and 9999.
lineItems.sku The stock keeping unit. Maximum length 200 characters.
lineItems.description The order description to display to the shopper. Maximum length 200 characters.
lineItems.amountIncludingTax Item amount including the tax, in minor units. Must be between 1 and 100000000.
lineItems.itemCategory The item category. Maximum length 200 characters.

Show PayMe 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. From your server, make a /paymentMethods request specifying:

Make a payment

When the shopper proceeds to pay, Drop-in returns the paymentComponentData.paymentMethod.

  1. Pass the paymentComponentData.paymentMethod to your server.
  2. From your server, make a /payments request, specifying:

    • paymentMethod: The paymentComponentData.paymentMethod from your client app.
    • returnURL: URL to where the shopper should be redirected back to after they complete the payment. Get this URL from the Component in the RedirectComponent.getReturnUrl(context).

The /payments response contains:

  • action: Object containing information about the redirect.

    {
    "resultCode": "RedirectShopper",
    "action": {
        "expiresAt": "2021-01-30T16:09:09Z",
        "paymentMethodType": "payme",
        "url": "https://qr.payme.hsbc.com.hk/...",
        "method": "GET",
        "type": "redirect"
        }
    }

If your integration is set up correctly, the action object is passed from your server to the client.

  1. Pass the action object to your client app. Drop-in needs this to redirect the shopper to the PayMe app.

See the Android Drop-in integration guide 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