createTerminal

suspend fun createTerminal(context: Context, terminalConfig: String): TerminalCreationResult

Creates a new Terminal instance for accepting Tap to Pay card payments

This method is to designed to return a TerminalCreationResult.Created on success. The terminalConfig provided to this method must be fetched from the Moov API. Note that this method will take a significant amount of time due to the device attestation process for production configurations

Return

a TerminalCreationResult instance representing success or failure

Parameters

context

the context of the calling Application

terminalConfig

response from the Moov API (supports both production and sandbox configurations)


suspend fun createTerminal(context: Context, clientConfiguration: ClientConfiguration, accountId: MID<Account>, terminalApplicationId: MID<TerminalApplication>? = null): TerminalCreationResult

Creates a new Terminal instance for accepting Tap2Pay card payments and creating Transfers

This method is to designed to return a TerminalCreationResult.Created on success. It will create a Moov API client to fetch the terminal configuration. This same client will be used to create the Transfer via the Moov API when Terminal.createTapTransfer is called. Note that this method will take a significant amount of time due to the device attestation process for production configurations

Return

a TerminalCreationResult instance representing success or failure

Parameters

context

the context of the calling Application

clientConfiguration

configuration to use for creating the Moov API client

accountId

the merchant account ID to transact under

terminalApplicationId

the terminal application ID of this terminal