PaymentIntent

data class PaymentIntent @RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP]) constructor(val id: String?, val paymentMethodTypes: List<String>, val amount: Long?, val canceledAt: Long = 0, val cancellationReason: PaymentIntent.CancellationReason? = null, val captureMethod: PaymentIntent.CaptureMethod = CaptureMethod.Automatic, val clientSecret: String?, val confirmationMethod: PaymentIntent.ConfirmationMethod = ConfirmationMethod.Automatic, val countryCode: String?, val created: Long, val currency: String?, val description: String? = null, val isLiveMode: Boolean, val paymentMethod: PaymentMethod? = null, val paymentMethodId: String? = null, val receiptEmail: String? = null, val status: StripeIntent.Status? = null, val setupFutureUsage: StripeIntent.Usage? = null, val lastPaymentError: PaymentIntent.Error? = null, val shipping: PaymentIntent.Shipping? = null, val unactivatedPaymentMethods: List<String>, val linkFundingSources: List<String> = emptyList(), val nextActionData: StripeIntent.NextActionData? = null, paymentMethodOptionsJsonString: String? = null) : StripeIntent

A PaymentIntent tracks the process of collecting a payment from your customer.

Constructors

Link copied to clipboard
constructor(id: String?, paymentMethodTypes: List<String>, amount: Long?, canceledAt: Long = 0, cancellationReason: PaymentIntent.CancellationReason? = null, captureMethod: PaymentIntent.CaptureMethod = CaptureMethod.Automatic, clientSecret: String?, confirmationMethod: PaymentIntent.ConfirmationMethod = ConfirmationMethod.Automatic, countryCode: String?, created: Long, currency: String?, description: String? = null, isLiveMode: Boolean, paymentMethod: PaymentMethod? = null, paymentMethodId: String? = null, receiptEmail: String? = null, status: StripeIntent.Status? = null, setupFutureUsage: StripeIntent.Usage? = null, lastPaymentError: PaymentIntent.Error? = null, shipping: PaymentIntent.Shipping? = null, unactivatedPaymentMethods: List<String>, linkFundingSources: List<String> = emptyList(), nextActionData: StripeIntent.NextActionData? = null, paymentMethodOptionsJsonString: String? = null)

Types

Link copied to clipboard

Reason for cancellation of this PaymentIntent, either user-provided (duplicate, fraudulent, requested_by_customer, or abandoned) or generated by Stripe internally (failed_invoice, void_invoice, or automatic).

Link copied to clipboard

Controls when the funds will be captured from the customer’s account.

Link copied to clipboard
object Companion
Link copied to clipboard
data class Error : StripeModel

The payment error encountered in the previous PaymentIntent confirmation.

Link copied to clipboard
data class Shipping(val address: Address, val carrier: String? = null, val name: String? = null, val phone: String? = null, val trackingNumber: String? = null) : StripeModel

Shipping information for this PaymentIntent.

Properties

Link copied to clipboard
val amount: Long?

Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).

Link copied to clipboard
val canceledAt: Long = 0

Populated when status is canceled, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. If unavailable, will return 0.

Link copied to clipboard

Reason for cancellation of this PaymentIntent.

Link copied to clipboard

Controls when the funds will be captured from the customer’s account. See CaptureMethod.

Link copied to clipboard
open override val clientSecret: String?

The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key.

Link copied to clipboard

One of automatic (default) or manual. See ConfirmationMethod.

Link copied to clipboard
open override val countryCode: String?

Country code of the user.

Link copied to clipboard
open override val created: Long

Time at which the object was created. Measured in seconds since the Unix epoch.

Link copied to clipboard

Three-letter ISO currency code, in lowercase. Must be a supported currency.

Link copied to clipboard
open override val description: String? = null

An arbitrary string attached to the object. Often useful for displaying to users.

Link copied to clipboard
open override val id: String?

Unique identifier for the object.

Link copied to clipboard
open override val isConfirmed: Boolean

Whether confirmation has succeeded and all required actions have been handled.

Link copied to clipboard
open override val isLiveMode: Boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

Link copied to clipboard
open override val lastErrorMessage: String?
Link copied to clipboard

The payment error encountered in the previous PaymentIntent confirmation.

Link copied to clipboard
open override val linkFundingSources: List<String>

Payment types that are accepted when paying with Link.

Link copied to clipboard
open override val nextActionData: StripeIntent.NextActionData? = null
Link copied to clipboard
Link copied to clipboard
open override val paymentMethod: PaymentMethod? = null

The expanded PaymentMethod represented by paymentMethodId.

Link copied to clipboard
open override val paymentMethodId: String? = null

ID of the payment method (a PaymentMethod, Card, BankAccount, or saved Source object) to attach to this PaymentIntent.

Link copied to clipboard
open override val paymentMethodTypes: List<String>

The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.

Link copied to clipboard
val receiptEmail: String? = null

Email address that the receipt for the resulting payment will be sent to.

Link copied to clipboard
Link copied to clipboard

Shipping information for this PaymentIntent.

Link copied to clipboard
open override val status: StripeIntent.Status? = null

Status of this PaymentIntent.

Link copied to clipboard

Payment types that have not been activated in livemode, but have been activated in testmode.

Functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
open override fun getPaymentMethodOptions(): Map<String, Any?>
Link copied to clipboard
Link copied to clipboard
open override fun requiresAction(): Boolean
Link copied to clipboard
open override fun requiresConfirmation(): Boolean
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)