Package com.stripe.model
Class Transfer
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.Transfer
- All Implemented Interfaces:
BalanceTransactionSource,HasId,MetadataStore<Transfer>,StripeActiveObject,StripeObjectInterface
public class Transfer
extends ApiResource
implements MetadataStore<Transfer>, BalanceTransactionSource
A
Transfer object is created when you move funds between Stripe accounts as part of
Connect.
Before April 6, 2017, transfers also represented movement of funds from a Stripe account to a card or bank account. This behavior has since been split out into a Payout object, with corresponding payout endpoints. For more information, read about the transfer/payout split.
Related guide: Creating separate charges and transfers
-
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 TypeMethodDescriptionprotected booleanstatic Transfercreate(TransferCreateParams params) To send funds from your Stripe account to a connected account, you create a new transfer object.static Transfercreate(TransferCreateParams params, RequestOptions options) To send funds from your Stripe account to a connected account, you create a new transfer object.static TransferTo send funds from your Stripe account to a connected account, you create a new transfer object.static Transfercreate(Map<String, Object> params, RequestOptions options) To send funds from your Stripe account to a connected account, you create a new transfer object.booleanAmount in cents (or local equivalent) to be transferred.Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued).Get ID of expandableapplicationFeeobject.Get expandedapplicationFee.Get ID of expandablebalanceTransactionobject.Get expandedbalanceTransaction.Time that this record of the transfer was first created.Three-letter ISO currency code, in lowercase.An arbitrary string attached to the object.Get ID of expandabledestinationobject.Get expandeddestination.Get ID of expandabledestinationPaymentobject.Get expandeddestinationPayment.The FX Quote used for the transfer.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.A list of reversals that have been applied to the transfer.Whether the transfer has been fully reversed.Get ID of expandablesourceTransactionobject.Get expandedsourceTransaction.The source balance this transfer came from.A string that identifies this transaction as part of a group.inthashCode()static TransferCollectionlist(TransferListParams params) Returns a list of existing transfers sent to connected accounts.static TransferCollectionlist(TransferListParams params, RequestOptions options) Returns a list of existing transfers sent to connected accounts.static TransferCollectionReturns a list of existing transfers sent to connected accounts.static TransferCollectionlist(Map<String, Object> params, RequestOptions options) Returns a list of existing transfers sent to connected accounts.static TransferRetrieves the details of an existing transfer.static Transferretrieve(String transfer, RequestOptions options) Retrieves the details of an existing transfer.static Transferretrieve(String transfer, TransferRetrieveParams params, RequestOptions options) Retrieves the details of an existing transfer.static TransferRetrieves the details of an existing transfer.voidAmount in cents (or local equivalent) to be transferred.voidsetAmountReversed(Long amountReversed) Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued).voidvoidsetApplicationFeeAmount(Long applicationFeeAmount) voidsetApplicationFeeObject(ApplicationFee expandableObject) voidvoidsetBalanceTransactionObject(BalanceTransaction expandableObject) voidsetCreated(Long created) Time that this record of the transfer was first created.voidsetCurrency(String currency) Three-letter ISO currency code, in lowercase.voidsetDescription(String description) An arbitrary string attached to the object.voidsetDestination(String id) voidsetDestinationObject(Account expandableObject) voidvoidsetDestinationPaymentObject(Charge expandableObject) voidsetFxQuote(String fxQuote) The FX Quote used for the transfer.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.voidsetReversals(TransferReversalCollection reversals) A list of reversals that have been applied to the transfer.voidsetReversed(Boolean reversed) Whether the transfer has been fully reversed.voidvoidsetSourceTransactionObject(Charge expandableObject) voidsetSourceType(String sourceType) The source balance this transfer came from.voidsetTransferGroup(String transferGroup) A string that identifies this transaction as part of a group.update(TransferUpdateParams params) Updates the specified transfer by setting the values of the parameters passed.update(TransferUpdateParams params, RequestOptions options) Updates the specified transfer by setting the values of the parameters passed.Updates the specified transfer by setting the values of the parameters passed.update(Map<String, Object> params, RequestOptions options) Updates the specified transfer by setting the values of the parameters passed.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
-
Transfer
public Transfer()
-
-
Method Details
-
getApplicationFee
Get ID of expandableapplicationFeeobject. -
setApplicationFee
-
getApplicationFeeObject
Get expandedapplicationFee. -
setApplicationFeeObject
-
getBalanceTransaction
Get ID of expandablebalanceTransactionobject. -
setBalanceTransaction
-
getBalanceTransactionObject
Get expandedbalanceTransaction. -
setBalanceTransactionObject
-
getDestination
Get ID of expandabledestinationobject. -
setDestination
-
getDestinationObject
Get expandeddestination. -
setDestinationObject
-
getDestinationPayment
Get ID of expandabledestinationPaymentobject. -
setDestinationPayment
-
getDestinationPaymentObject
Get expandeddestinationPayment. -
setDestinationPaymentObject
-
getSourceTransaction
Get ID of expandablesourceTransactionobject. -
setSourceTransaction
-
getSourceTransactionObject
Get expandedsourceTransaction. -
setSourceTransactionObject
-
create
To send funds from your Stripe account to a connected account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.- Throws:
StripeException
-
create
public static Transfer create(Map<String, Object> params, RequestOptions options) throws StripeExceptionTo send funds from your Stripe account to a connected account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.- Throws:
StripeException
-
create
To send funds from your Stripe account to a connected account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.- Throws:
StripeException
-
create
public static Transfer create(TransferCreateParams params, RequestOptions options) throws StripeException To send funds from your Stripe account to a connected account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.- Throws:
StripeException
-
list
Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.- Throws:
StripeException
-
list
public static TransferCollection list(Map<String, Object> params, RequestOptions options) throws StripeExceptionReturns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.- Throws:
StripeException
-
list
Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.- Throws:
StripeException
-
list
public static TransferCollection list(TransferListParams params, RequestOptions options) throws StripeException Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.- Throws:
StripeException
-
retrieve
Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information.- Throws:
StripeException
-
retrieve
Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information.- Throws:
StripeException
-
retrieve
public static Transfer retrieve(String transfer, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information.- Throws:
StripeException
-
retrieve
public static Transfer retrieve(String transfer, TransferRetrieveParams params, RequestOptions options) throws StripeException Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information.- Throws:
StripeException
-
update
Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.This request accepts only metadata as an argument.
- Specified by:
updatein interfaceMetadataStore<Transfer>- Throws:
StripeException
-
update
Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.This request accepts only metadata as an argument.
- Specified by:
updatein interfaceMetadataStore<Transfer>- Throws:
StripeException
-
update
Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.This request accepts only metadata as an argument.
- Throws:
StripeException
-
update
Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.This request accepts only metadata as an argument.
- 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 in cents (or local equivalent) to be transferred. -
getAmountReversed
Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). -
getApplicationFeeAmount
-
getCreated
Time that this record of the transfer was first created. -
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. -
getFxQuote
The FX Quote used for the transfer. -
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
transfer. -
getReversals
A list of reversals that have been applied to the transfer. -
getReversed
Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. -
getSourceType
The source balance this transfer came from. One ofcard,fpx, orbank_account. -
getTransferGroup
A string that identifies this transaction as part of a group. See the Connect documentation for details. -
setAmount
Amount in cents (or local equivalent) to be transferred. -
setAmountReversed
Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). -
setApplicationFeeAmount
-
setCreated
Time that this record of the transfer was first created. -
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. -
setFxQuote
The FX Quote used for the transfer. -
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
transfer. -
setReversals
A list of reversals that have been applied to the transfer. -
setReversed
Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. -
setSourceType
The source balance this transfer came from. One ofcard,fpx, orbank_account. -
setTransferGroup
A string that identifies this transaction as part of a group. See the Connect documentation for details. -
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<Transfer>
-