This page explains how to add BLIK to your existing iOS Components integration.
Requirements
Requirement | Description |
---|---|
Integration type | Make sure that you have built your Components integration. BLIK for iOS requires at least v3.8.0 of Components. For more information, refer to Release notes. |
Setup steps | Before you begin, add BLIK in your test Customer Area. |
API reference
Include fields for the endpoint you integrated:
You do not need to send additional fields for BLIK. To see optional fields that you can send for all payment methods, see:
-
/sessions: This is the default with Components v5.0.0 or later.
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 BLIK Component:
let paymentMethods = session.sessionContext.paymentMethods // Check that the payment method is supported before showing the Component. guard let paymentMethod = paymentMethods.paymentMethod(ofType: BLIKPaymentMethod.self) else { return } let configuration = BLIKComponent.Configuration() let component = BLIKComponent(paymentMethod: paymentMethod, context: context, configuration: configuration) self.currentComponent = component // Set the session as the delegate. component.delegate = session present(component)
v4.x.x
If your integration uses an earlier version of iOS Components:
// Check that the payment method is supported before showing the Component. guard let paymentMethod = paymentMethods.paymentMethod(ofType: BLIKPaymentMethod.self) else { return } let style = FormComponentStyle() let component = BLIKComponent(paymentMethod: paymentMethod, apiContext: context, style: style) present(component)
There are no configuration steps specific to BLIK required for Components.
Test and go live
In order to successfully authorize a BLIK One Click payment in TEST, please use BLIK code 999016.
Important steps:
- Make sure your implementation satisfies BLIK’s guidelines.
- Test your integration end-to-end.
- Add BLIK in your live Customer Area.