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_GSONFields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON -
Constructor Summary
Constructors -
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 booleanstatic Topupcreate(TopupCreateParams params) Top up the balance of an account.static Topupcreate(TopupCreateParams params, RequestOptions options) Top up the balance of an account.static TopupTop up the balance of an account.static Topupcreate(Map<String, Object> params, RequestOptions options) Top up the balance of an account.booleanAmount transferred.Get ID of expandablebalanceTransactionobject.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 valuetrueif the object exists in live mode or the valuefalseif 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.inthashCode()static TopupCollectionlist(TopupListParams params) Returns a list of top-ups.static TopupCollectionlist(TopupListParams params, RequestOptions options) Returns a list of top-ups.static TopupCollectionReturns a list of top-ups.static TopupCollectionlist(Map<String, Object> params, RequestOptions options) Returns a list of top-ups.static TopupRetrieves the details of a top-up that has previously been created.static Topupretrieve(String topup, RequestOptions options) Retrieves the details of a top-up that has previously been created.static Topupretrieve(String topup, TopupRetrieveParams params, RequestOptions options) Retrieves the details of a top-up that has previously been created.static TopupRetrieves the details of a top-up that has previously been created.voidAmount transferred.voidvoidsetBalanceTransactionObject(BalanceTransaction expandableObject) voidsetCreated(Long created) Time at which the object was created.voidsetCurrency(String currency) Three-letter ISO currency code, in lowercase.voidsetDescription(String description) An arbitrary string attached to the object.voidsetExpectedAvailabilityDate(Long expectedAvailabilityDate) Date the funds are expected to arrive in your Stripe account for payouts.voidsetFailureCode(String failureCode) Error code explaining reason for top-up failure if available (see the errors section for a list of codes).voidsetFailureMessage(String failureMessage) Message to user further explaining reason for top-up failure if available.voidUnique identifier for the object.voidsetLivemode(Boolean livemode) Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.voidsetMetadata(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.voidString representing the object's type.voidsetResponseGetter(StripeResponseGetter responseGetter) Method is used by the containing object orStripeResponseGetterimplementations to set theStripeResponseGetterinstance used to make further requests.voidThe source field is deprecated.voidsetStatementDescriptor(String statementDescriptor) Extra information about a top-up.voidThe status of the top-up is eithercanceled,failed,pending,reversed, orsucceeded.voidsetTransferGroup(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, setGlobalResponseGetter, urlEncode, urlEncodeIdMethods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.stripe.model.StripeActiveObject
trySetResponseGetterMethods inherited from interface com.stripe.model.StripeObjectInterface
getLastResponse, setLastResponse
-
Constructor Details
-
Topup
public Topup()
-
-
Method Details
-
getBalanceTransaction
Get ID of expandablebalanceTransactionobject. -
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:
updatein interfaceMetadataStore<Topup>- Throws:
StripeException
-
update
Updates the metadata of a top-up. Other top-up details are not editable by design.- Specified by:
updatein 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:StripeActiveObjectMethod is used by the containing object orStripeResponseGetterimplementations to set theStripeResponseGetterinstance used to make further requests.- Specified by:
setResponseGetterin interfaceStripeActiveObject- Overrides:
setResponseGetterin classApiResource- Parameters:
responseGetter- theStripeResponseGetterinstance 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 valuetrueif the object exists in live mode or the valuefalseif 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 valuetrueif the object exists in live mode or the valuefalseif 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:
getMetadatain interfaceMetadataStore<Topup>
-