presentForSetupIntent

fun presentForSetupIntent(clientSecret: String, currencyCode: String, amount: Long? = null, label: String? = null)

Present Google Pay to collect customer payment details and use it to confirm the SetupIntent represented by clientSecret.

The Google Pay API requires a currencyCode. currencyCode is required even though the SetupIntent API does not require it.

Parameters

clientSecret

the SetupIntent's client secret

currencyCode

The ISO 4217 alphabetic currency code.

amount

An optional amount to display. Google Pay may or may not display this amount depending on its own internal logic. Defaults to 0 if none is provided.

label

An optional label to display with the amount. Google Pay may or may not display this label depending on its own internal logic. Defaults to a generic label if none is provided.