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_GSON
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
static Transfer
create
(TransferCreateParams params) To send funds from your Stripe account to a connected account, you create a new transfer object.static Transfer
create
(TransferCreateParams params, RequestOptions options) To send funds from your Stripe account to a connected account, you create a new transfer object.static Transfer
To send funds from your Stripe account to a connected account, you create a new transfer object.static Transfer
create
(Map<String, Object> params, RequestOptions options) To send funds from your Stripe account to a connected account, you create a new transfer object.boolean
Amount 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 expandablebalanceTransaction
object.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 expandabledestination
object.Get expandeddestination
.Get ID of expandabledestinationPayment
object.Get expandeddestinationPayment
.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.A list of reversals that have been applied to the transfer.Whether the transfer has been fully reversed.Get ID of expandablesourceTransaction
object.Get expandedsourceTransaction
.The source balance this transfer came from.A string that identifies this transaction as part of a group.int
hashCode()
static TransferCollection
list
(TransferListParams params) Returns a list of existing transfers sent to connected accounts.static TransferCollection
list
(TransferListParams params, RequestOptions options) Returns a list of existing transfers sent to connected accounts.static TransferCollection
Returns a list of existing transfers sent to connected accounts.static TransferCollection
list
(Map<String, Object> params, RequestOptions options) Returns a list of existing transfers sent to connected accounts.static Transfer
Retrieves the details of an existing transfer.static Transfer
retrieve
(String transfer, RequestOptions options) Retrieves the details of an existing transfer.static Transfer
retrieve
(String transfer, TransferRetrieveParams params, RequestOptions options) Retrieves the details of an existing transfer.static Transfer
Retrieves the details of an existing transfer.void
Amount in cents (or local equivalent) to be transferred.void
setAmountReversed
(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).void
void
setBalanceTransactionObject
(BalanceTransaction expandableObject) void
setCreated
(Long created) Time that this record of the transfer was first created.void
setCurrency
(String currency) Three-letter ISO currency code, in lowercase.void
setDescription
(String description) An arbitrary string attached to the object.void
setDestination
(String id) void
setDestinationObject
(Account expandableObject) void
void
setDestinationPaymentObject
(Charge expandableObject) 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
setReversals
(TransferReversalCollection reversals) A list of reversals that have been applied to the transfer.void
setReversed
(Boolean reversed) Whether the transfer has been fully reversed.void
void
setSourceTransactionObject
(Charge expandableObject) void
setSourceType
(String sourceType) The source balance this transfer came from.void
setTransferGroup
(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, 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
-
Transfer
public Transfer()
-
-
Method Details
-
getBalanceTransaction
Get ID of expandablebalanceTransaction
object. -
setBalanceTransaction
-
getBalanceTransactionObject
Get expandedbalanceTransaction
. -
setBalanceTransactionObject
-
getDestination
Get ID of expandabledestination
object. -
setDestination
-
getDestinationObject
Get expandeddestination
. -
setDestinationObject
-
getDestinationPayment
Get ID of expandabledestinationPayment
object. -
setDestinationPayment
-
getDestinationPaymentObject
Get expandeddestinationPayment
. -
setDestinationPaymentObject
-
getSourceTransaction
Get ID of expandablesourceTransaction
object. -
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:
update
in 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:
update
in 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: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 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). -
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. -
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
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). -
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. -
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
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:
getMetadata
in interfaceMetadataStore<Transfer>
-