Payment-method icon

PayMe Component

Add PayMe to an existing Components integration.

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

Our iOS Component renders PayMe in your payment form, and redirects the shopper to their PayMe app.

PayMe is supported from iOS Components version 4.0.0.

Requirements

Select the server-side flow that your integration uses:

Requirement Description
Integration type Make sure that you have built a Sessions flow iOS Components integration.
Setup steps Before you begin, add PayMe in your Customer Area.

API reference

Select which endpoint you are using:

This is the default with Components v5.0.0 or later.

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. Available if you use Checkout API v70 and later.
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.
/payments request
Expand view
Copy link to code block
Copy code
Copy code
// SET YOUR ADYEN_API_KEY with the API key from the Customer Area.
const {Client, Config, CheckoutAPI} = require('@adyen/api-library');
const config = new Config();
// SET YOUR ADYEN_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": "ADYEN_MERCHANT_ACCOUNT",
"reference": "YOUR_ORDER_REFERENCE",
"returnUrl": "https://your-company.com/...",
"channel":"iOS",
"lineItems": [
{
"quantity": "1",
"sku": "3232",
"description": "Shoes",
"amountIncludingTax": 4200,
"itemCategory": "Fashion"
}
]
})

See the iOS Components integration guide to get the payment outcome and show your shopper the result of the payment.

Component configuration

v5.0.0 or later

If your integration uses iOS Components v5.0.0 or later, configure and create an instance of the PayMe Component:

Component configuration
Expand view
Copy link to code block
Copy code
Copy code
let paymentMethods = session.sessionContext.paymentMethods
guard let paymentMethod = paymentMethods.paymentMethod(ofType: .other("payme")) else { return }
let component = InstantPaymentComponent(paymentMethod: paymentMethod,
context: context,
order: nil)
self.currentComponent = component
component.delegate = session
component.initiatePayment()

v4.x.x

Component configuration
Expand view
Copy link to code block
Copy code
Copy code
let paymentMethod = InstantPaymentMethod(type: .other("payme"), name: "PayMe")
let component = InstantPaymentComponent(paymentMethod: paymentMethod,
paymentData: nil,
apiContext: apiContext)
self.currentComponent = component
component.delegate = self
component.initiatePayment()

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