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

The authentication flow of the source.

Link copied to clipboard
data class Klarna(val firstName: String?, val lastName: String?, val purchaseCountry: String?, val clientToken: String?, val payNowAssetUrlsDescriptive: String?, val payNowAssetUrlsStandard: String?, val payNowName: String?, val payNowRedirectUrl: String?, val payLaterAssetUrlsDescriptive: String?, val payLaterAssetUrlsStandard: String?, val payLaterName: String?, val payLaterRedirectUrl: String?, val payOverTimeAssetUrlsDescriptive: String?, val payOverTimeAssetUrlsStandard: String?, val payOverTimeName: String?, val payOverTimeRedirectUrl: String?, val paymentMethodCategories: Set<String>, val 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(val returnUrl: String?, val status: Source.Redirect.Status?, val 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

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

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.

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

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
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

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

Link copied to clipboard

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

Link copied to clipboard

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
Link copied to clipboard

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

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

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

Functions

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