Source

data class Source : StripeModel, StripePaymentSource

Model for a Sources API object.

See Sources API Reference.

Types

Link copied to clipboard
data class CodeVerification : StripeModel

Information related to the code verification flow. Present if the source is authenticated by a verification code (flow is Flow.CodeVerification).

Link copied to clipboard
object Companion
Link copied to clipboard
enum Flow : Enum<Source.Flow>

The authentication flow of the source.

Link copied to clipboard
data class Klarna(firstName: String?, lastName: String?, purchaseCountry: String?, clientToken: String?, payNowAssetUrlsDescriptive: String?, payNowAssetUrlsStandard: String?, payNowName: String?, payNowRedirectUrl: String?, payLaterAssetUrlsDescriptive: String?, payLaterAssetUrlsStandard: String?, payLaterName: String?, payLaterRedirectUrl: String?, payOverTimeAssetUrlsDescriptive: String?, payOverTimeAssetUrlsStandard: String?, payOverTimeName: String?, payOverTimeRedirectUrl: String?, paymentMethodCategories: Set<String>, customPaymentMethods: Set<String>) : StripeModel
Link copied to clipboard
data class Owner : StripeModel

Information about the owner of the payment instrument that may be used or required by particular source types.

Link copied to clipboard
data class Receiver : StripeModel

Information related to the receiver flow. Present if flow is Source.Flow.Receiver.

Link copied to clipboard
data class Redirect(returnUrl: String?, status: Source.Redirect.Status?, url: String?) : StripeModel

Information related to the redirect flow. Present if the source is authenticated by a redirect (flow is Flow.Redirect).

Link copied to clipboard
annotation class SourceType
Link copied to clipboard
enum Status : Enum<Source.Status>

The status of the source, one of canceled, chargeable, consumed, failed, or pending. Only chargeable sources can be used to create a charge.

Link copied to clipboard
enum Usage : Enum<Source.Usage>

Either reusable or single_use. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned.

Functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)

Properties

Link copied to clipboard
val amount: Long? = null

A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for single_use sources.

Link copied to clipboard
val clientSecret: String? = null

The client secret of the source. Used for client-side retrieval using a publishable key.

Link copied to clipboard
val codeVerification: Source.CodeVerification? = null

Information related to the code verification flow. Present if the source is authenticated by a verification code (flow is code_verification).

Link copied to clipboard
val created: Long? = null

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

Link copied to clipboard
val currency: String? = null

Three-letter ISO code for the currency associated with the source. This is the currency for which the source will be chargeable once ready. Required for single_use sources.

Link copied to clipboard
val flow: Source.Flow? = null

The authentication flow of the source. flow is one of redirect, receiver, code_verification, none.

Link copied to clipboard
open override val id: String?

Unique identifier for the object.

Link copied to clipboard
val isLiveMode: Boolean? = null

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
val klarna: Source.Klarna
Link copied to clipboard
val owner: Source.Owner? = null

Information about the owner of the payment instrument that may be used or required by particular source types.

Link copied to clipboard
val receiver: Source.Receiver? = null

Information related to the receiver flow. Present if the source is a receiver (flow is Flow.Receiver).

Link copied to clipboard
val redirect: Source.Redirect? = null

Information related to the redirect flow. Present if the source is authenticated by a redirect (flow is Flow.REDIRECT).

Link copied to clipboard
val sourceOrder: SourceOrder? = null

Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.

Link copied to clipboard
val sourceTypeData: Map<String, Any?>? = null
Link copied to clipboard
val sourceTypeModel: SourceTypeModel? = null
Link copied to clipboard
val statementDescriptor: String? = null

Extra information about a source. This will appear on your customer’s statement every time you charge the source.

Link copied to clipboard
val status: Source.Status? = null

The status of the source, one of canceled, chargeable, consumed, failed, or pending. Only chargeable sources can be used to create a charge.

Link copied to clipboard
val type: String

The SourceType of this Source, as one of the enumerated values. If a custom source type has been created, this returns SourceType.UNKNOWN. To get the raw value of an SourceType.UNKNOWN type, use typeRaw.

Link copied to clipboard
val typeRaw: String

Gets the type of this source as a String. If it is a known type, this will return a string equal to the SourceType returned from type. This method is not restricted to known types

Link copied to clipboard
val usage: Source.Usage? = null

Either reusable or single_use. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned.

Link copied to clipboard
val weChat: WeChat