Initialize
3 min
Installation
Add the Pay3 SDK to your app's build.gradle
dependencies {
implementation("money.pay3:android-sdk:1.0.0")
}Initialize the SDK
Initialize the Pay3 SDK in your application's main activity:
This function initialises Pay3 SDK to support Fiat Checkout flow.
Pay3 team shares values for hostname and clientId during onboarding. Following parameters can be used for creating new instance of Pay3.
Parameters
- hostname: Pay3 will be opened in a new window using this hostname prefix. The host name is environment dependent.
- clientId: A unique client id is created for each client application. The client id is environment dependent.
import com.pay3.sdk.Pay3
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// Initialize SDK with your client ID and hostname
Pay3.init(this, "your-client-id", "https://pay3-hostname-shared-by-pay3")
// Rest of your activity code
}
}