PaymentIntentProvider

Interface for providing PaymentIntent objects asynchronously. This allows consumer applications to provide payment intents on demand rather than having to provide them upfront when creating payment sessions.

Simple Implementation Example

class MyPaymentProvider(private val apiKey: String, private val userId: String?) : PaymentIntentProvider {
override fun provide(callback: PaymentIntentCallback) {
// Your implementation here - any complexity, any properties
// No need to worry about Parcelable or Serializable
}
}

The SDK handles all the complexity of passing providers between activities automatically.

Types

Link copied to clipboard

Callback interface for receiving PaymentIntent results

Properties

Link copied to clipboard
abstract val amount: BigDecimal

Payment amount. This is the order amount you would like to charge your customer. Required for payment session creation.

Link copied to clipboard
abstract val currency: String

Amount currency. Required for payment session creation.

Functions

Link copied to clipboard

Provides a PaymentIntent asynchronously.