ApiConfig

data class ApiConfig(val baseUrl: String, val apiUserId: String, val environment: String, val apiVersion: String = "v1_0")

Holds runtime configuration for the MTN MoMo SDK.

Pass an instance of this class when initializing the SDK instead of relying on Android-only BuildConfig fields, making the SDK usable on both Android and plain-JVM targets.

Constructors

Link copied to clipboard
constructor(baseUrl: String, apiUserId: String, environment: String, apiVersion: String = "v1_0")

Properties

Link copied to clipboard

The API user ID provisioned in the MoMo developer portal.

Link copied to clipboard

The MTN MoMo API version string used in URL path segments (e.g. v1_0).

Link copied to clipboard

The base URL for the MTN MoMo API (e.g. https://sandbox.momodeveloper.mtn.com/).

Link copied to clipboard

The deployment environment identifier (e.g. sandbox or mtncongo).