Package com.stripe.model
Class Topup
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.Topup
- All Implemented Interfaces:
BalanceTransactionSource
,HasId
,MetadataStore<Topup>
,StripeActiveObject
,StripeObjectInterface
To top up your Stripe balance, you create a top-up object. You can retrieve individual top-ups,
as well as list all top-ups. Top-ups are identified by a unique, random ID.
Related guide: Topping up your platform account
-
Nested Class Summary
Nested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod
-
Field Summary
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSON, INTERNAL_GSON
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncancel()
Cancels a top-up.cancel
(RequestOptions options) Cancels a top-up.cancel
(TopupCancelParams params) Cancels a top-up.cancel
(TopupCancelParams params, RequestOptions options) Cancels a top-up.Cancels a top-up.cancel
(Map<String, Object> params, RequestOptions options) Cancels a top-up.protected boolean
static Topup
create
(TopupCreateParams params) Top up the balance of an account.static Topup
create
(TopupCreateParams params, RequestOptions options) Top up the balance of an account.static Topup
Top up the balance of an account.static Topup
create
(Map<String, Object> params, RequestOptions options) Top up the balance of an account.boolean
Amount transferred.Get ID of expandablebalanceTransaction
object.Get expandedbalanceTransaction
.Time at which the object was created.Three-letter ISO currency code, in lowercase.An arbitrary string attached to the object.Date the funds are expected to arrive in your Stripe account for payouts.Error code explaining reason for top-up failure if available (see the errors section for a list of codes).Message to user further explaining reason for top-up failure if available.getId()
Unique identifier for the object.Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.Set of key-value pairs that you can attach to an object.String representing the object's type.The source field is deprecated.Extra information about a top-up.The status of the top-up is eithercanceled
,failed
,pending
,reversed
, orsucceeded
.A string that identifies this top-up as part of a group.int
hashCode()
static TopupCollection
list
(TopupListParams params) Returns a list of top-ups.static TopupCollection
list
(TopupListParams params, RequestOptions options) Returns a list of top-ups.static TopupCollection
Returns a list of top-ups.static TopupCollection
list
(Map<String, Object> params, RequestOptions options) Returns a list of top-ups.static Topup
Retrieves the details of a top-up that has previously been created.static Topup
retrieve
(String topup, RequestOptions options) Retrieves the details of a top-up that has previously been created.static Topup
retrieve
(String topup, TopupRetrieveParams params, RequestOptions options) Retrieves the details of a top-up that has previously been created.static Topup
Retrieves the details of a top-up that has previously been created.void
Amount transferred.void
void
setBalanceTransactionObject
(BalanceTransaction expandableObject) void
setCreated
(Long created) Time at which the object was created.void
setCurrency
(String currency) Three-letter ISO currency code, in lowercase.void
setDescription
(String description) An arbitrary string attached to the object.void
setExpectedAvailabilityDate
(Long expectedAvailabilityDate) Date the funds are expected to arrive in your Stripe account for payouts.void
setFailureCode
(String failureCode) Error code explaining reason for top-up failure if available (see the errors section for a list of codes).void
setFailureMessage
(String failureMessage) Message to user further explaining reason for top-up failure if available.void
Unique identifier for the object.void
setLivemode
(Boolean livemode) Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.void
setMetadata
(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.void
String representing the object's type.void
setResponseGetter
(StripeResponseGetter responseGetter) Method is used by the containing object orStripeResponseGetter
implementations to set theStripeResponseGetter
instance used to make further requests.void
The source field is deprecated.void
setStatementDescriptor
(String statementDescriptor) Extra information about a top-up.void
The status of the top-up is eithercanceled
,failed
,pending
,reversed
, orsucceeded
.void
setTransferGroup
(String transferGroup) A string that identifies this top-up as part of a group.update
(TopupUpdateParams params) Updates the metadata of a top-up.update
(TopupUpdateParams params, RequestOptions options) Updates the metadata of a top-up.Updates the metadata of a top-up.update
(Map<String, Object> params, RequestOptions options) Updates the metadata of a top-up.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, setStripeResponseGetter, urlEncode, urlEncodeId
Methods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.stripe.model.StripeActiveObject
trySetResponseGetter
Methods inherited from interface com.stripe.model.StripeObjectInterface
getLastResponse, setLastResponse
-
Constructor Details
-
Topup
public Topup()
-
-
Method Details
-
getBalanceTransaction
Get ID of expandablebalanceTransaction
object. -
setBalanceTransaction
-
getBalanceTransactionObject
Get expandedbalanceTransaction
. -
setBalanceTransactionObject
-
cancel
Cancels a top-up. Only pending top-ups can be canceled.- Throws:
StripeException
-
cancel
Cancels a top-up. Only pending top-ups can be canceled.- Throws:
StripeException
-
cancel
Cancels a top-up. Only pending top-ups can be canceled.- Throws:
StripeException
-
cancel
Cancels a top-up. Only pending top-ups can be canceled.- Throws:
StripeException
-
cancel
Cancels a top-up. Only pending top-ups can be canceled.- Throws:
StripeException
-
cancel
Cancels a top-up. Only pending top-ups can be canceled.- Throws:
StripeException
-
create
Top up the balance of an account.- Throws:
StripeException
-
create
public static Topup create(Map<String, Object> params, RequestOptions options) throws StripeExceptionTop up the balance of an account.- Throws:
StripeException
-
create
Top up the balance of an account.- Throws:
StripeException
-
create
Top up the balance of an account.- Throws:
StripeException
-
list
Returns a list of top-ups.- Throws:
StripeException
-
list
public static TopupCollection list(Map<String, Object> params, RequestOptions options) throws StripeExceptionReturns a list of top-ups.- Throws:
StripeException
-
list
Returns a list of top-ups.- Throws:
StripeException
-
list
public static TopupCollection list(TopupListParams params, RequestOptions options) throws StripeException Returns a list of top-ups.- Throws:
StripeException
-
retrieve
Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.- Throws:
StripeException
-
retrieve
Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.- Throws:
StripeException
-
retrieve
public static Topup retrieve(String topup, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.- Throws:
StripeException
-
retrieve
public static Topup retrieve(String topup, TopupRetrieveParams params, RequestOptions options) throws StripeException Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.- Throws:
StripeException
-
update
Updates the metadata of a top-up. Other top-up details are not editable by design.- Specified by:
update
in interfaceMetadataStore<Topup>
- Throws:
StripeException
-
update
Updates the metadata of a top-up. Other top-up details are not editable by design.- Specified by:
update
in interfaceMetadataStore<Topup>
- Throws:
StripeException
-
update
Updates the metadata of a top-up. Other top-up details are not editable by design.- Throws:
StripeException
-
update
Updates the metadata of a top-up. Other top-up details are not editable by design.- Throws:
StripeException
-
setResponseGetter
Description copied from interface:StripeActiveObject
Method is used by the containing object orStripeResponseGetter
implementations to set theStripeResponseGetter
instance used to make further requests.- Specified by:
setResponseGetter
in interfaceStripeActiveObject
- Overrides:
setResponseGetter
in classApiResource
- Parameters:
responseGetter
- theStripeResponseGetter
instance to use for making further requests.
-
getAmount
Amount transferred. -
getCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
getCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
getDescription
An arbitrary string attached to the object. Often useful for displaying to users. -
getExpectedAvailabilityDate
Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up. -
getFailureCode
Error code explaining reason for top-up failure if available (see the errors section for a list of codes). -
getFailureMessage
Message to user further explaining reason for top-up failure if available. -
getLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
topup
. -
getSource
The source field is deprecated. It might not always be present in the API response. -
getStatementDescriptor
Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. -
getStatus
The status of the top-up is eithercanceled
,failed
,pending
,reversed
, orsucceeded
.One of
canceled
,failed
,pending
,reversed
, orsucceeded
. -
getTransferGroup
A string that identifies this top-up as part of a group. -
setAmount
Amount transferred. -
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
setDescription
An arbitrary string attached to the object. Often useful for displaying to users. -
setExpectedAvailabilityDate
Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up. -
setFailureCode
Error code explaining reason for top-up failure if available (see the errors section for a list of codes). -
setFailureMessage
Message to user further explaining reason for top-up failure if available. -
setId
Unique identifier for the object. -
setLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
setMetadata
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
topup
. -
setSource
The source field is deprecated. It might not always be present in the API response. -
setStatementDescriptor
Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. -
setStatus
The status of the top-up is eithercanceled
,failed
,pending
,reversed
, orsucceeded
.One of
canceled
,failed
,pending
,reversed
, orsucceeded
. -
setTransferGroup
A string that identifies this top-up as part of a group. -
equals
-
canEqual
-
hashCode
public int hashCode() -
getId
Unique identifier for the object. -
getMetadata
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.- Specified by:
getMetadata
in interfaceMetadataStore<Topup>
-