Payment-method icon

KNET Redirect Component

Add KNET to your existing iOS Components integration.

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

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 KNET 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
shopperName -white_check_mark- The shopper's full name.
shopperEmail -white_check_mark- The shopper's email address.
telephoneNumber -white_check_mark- The shopper's telephone number.
Expand view
Copy link to code block
Copy code
Copy code
curl https://checkout-test.adyen.com/v69/sessions \
-H 'x-api-key: ADYEN_API_KEY' \
-H 'content-type: application/json' \
-d '{
"merchantAccount":"YOUR_MERCHANT_ACCOUNT",
"reference":"YOUR_ORDER_NUMBER",
"amount":{
"currency":"KWD",
"value":1000
},
"shopperName":{
"firstName": "Happy",
"lastName": "Testing",
"gender": "UNKNOWN"
},
"shopperEmail":"shopper@email.com",
"telephoneNumber":"000000000000",
"returnUrl":"my-app://adyen"
}'

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 KNET Component:

Component configuration
Expand view
Copy link to code block
Copy code
Copy code
let paymentMethods = session.sessionContext.paymentMethods
// Check that the payment method is supported before showing the Component.
guard let paymentMethod = paymentMethods.paymentMethod(ofType: .other("knet")) else { return }
let component = InstantPaymentComponent(paymentMethod: paymentMethod,
context: context,
order: nil)
self.currentComponent = component
// Set the session as the delegate.
component.delegate = session
component.initiatePayment()

v4.x.x

If your integration uses an earlier version of iOS Components:

Component configuration
Expand view
Copy link to code block
Copy code
Copy code
// Check that the payment method is supported before showing the Component.
guard let paymentMethod = paymentMethods.paymentMethod(ofType: KNETPaymentMethod.self) else { return }
let style = FormComponentStyle()
let component = KNETComponent(paymentMethod: paymentMethod,
apiContext: context,
style: style)
present(component)

There are no configuration steps specific to KNET required for Components.

Test and go live

To test KNET payments, use the test card details provided by Tap.

Before you can accept live KNET payments, you need to submit a request for KNET in your live Customer Area.

See also