Source
Model for a Sources API object.
Types
Information related to the code verification flow. Present if the source is authenticated by a verification code (flow is Flow.CodeVerification).
The authentication flow
of the source.
Information related to the receiver flow. Present if flow is Source.Flow.Receiver.
Information related to the redirect flow. Present if the source is authenticated by a redirect (flow is Flow.Redirect).
The status of the source, one of canceled
, chargeable
, consumed
, failed
, or pending
. Only chargeable
sources can be used to create a charge.
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
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.
The client secret of the source. Used for client-side retrieval using a publishable key.
Information related to the code verification flow. Present if the source is authenticated by a verification code (flow
is code_verification
).
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.
The authentication flow
of the source. flow
is one of redirect
, receiver
, code_verification
, none
.
Has the value true if the object exists in live mode or the value false if the object exists in test mode.
Information about the owner of the payment instrument that may be used or required by particular source types.
Information related to the receiver flow. Present if the source is a receiver (flow is Flow.Receiver).
Information related to the redirect flow. Present if the source is authenticated by a redirect (flow is Flow.REDIRECT).
Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.
Extra information about a source. This will appear on your customer’s statement every time you charge the source.
The status of the source, one of canceled
, chargeable
, consumed
, failed
, or pending
. Only chargeable
sources can be used to create a charge.
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.
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
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.