# PaymentHandle

interface PaymentHandle

Representation of a payment process available immediately from PaymentManager.startPaymentActivity. Provides a way to interact with an ongoing payment, e.g. cancel it or select additionalPaymentMethods.

## Types

CancelResult
Link copied to clipboard
enum CancelResult : Enum<PaymentHandle.CancelResult>

Return values from PaymentHandle.cancel.

## Properties

additionalPaymentMethods
Link copied to clipboard
abstract val additionalPaymentMethods: List<AdditionalPaymentMethod>

Provides access to non-cardreader payment methods.

paymentParameters
Link copied to clipboard
abstract val paymentParameters: PaymentParameters?

Provides access to the PaymentParameters passed to PaymentManager.startPaymentActivity for this payment.

totalMoneyWithProposedCardSurcharge
Link copied to clipboard
abstract val totalMoneyWithProposedCardSurcharge: Money?

Provides access to the total amount, including tip and a proposed card surcharge, if applicable. If the merchant sets a card surcharge for this location and the buyer pays with a card subject to surcharge, this will be the total amount authorized. This value can be used to display the amount with surcharge on a custom payment prompt screen. If tax is applied to the surcharge, this value also includes that tax. This value will be null if a card surcharge is not applicable. Example:

## Functions

cancel
Link copied to clipboard
abstract fun cancel(): PaymentHandle.CancelResult

Cancels a pending payment, if one exists and can be canceled. In this case, the method returns CancelResult.CANCELED and the payment callbacks will be called with PaymentErrorCode.CANCELED to indicate the cancellation.

findMethod
Link copied to clipboard
abstract fun findMethod(type: AdditionalPaymentMethod.Type): AdditionalPaymentMethod?

Searches for a specific additional payment method by its type.