Skip to main content

Configure Integrators

Configuring the YocoSDK

Once the Yoco Payment UI SDK has been initialised, you can configure the SDK with its dynamic parameters. This can be called from anywhere in your application and can be called multiple times.

To configure the YocoSDK you will need to use the SDK Integration Key secret obtained after completing the SDK Integration Application form

import com.yoco.payments.sdk.data.enums.SDKEnvironment

// Configures the Yoco Payment UI SDK
YocoSDK.configure(
context = context,
secret = "<integration secret>",
environment = SDKEnvironment.PRODUCTION,
//optional: defaults to false
enableLogging = true
)

Optionally intergators may provide seamless login experience by providing the YocoSDK with the business apiToken in addition to the secret.

import com.yoco.payments.sdk.data.enums.SDKEnvironment

// Configures the Yoco Payment UI SDK
YocoSDK.configure(
context = context,
secret = "<integration secret>",
apiToken = "<business api token>",
environment = SDKEnvironment.PRODUCTION,
//optional: defaults to false
enableLogging = true
)