Class Transfer

java.lang.Object
All Implemented Interfaces:
BalanceTransactionSource, HasId, MetadataStore<Transfer>, StripeObjectInterface

public class Transfer
extends ApiResource
implements MetadataStore<Transfer>, BalanceTransactionSource
  • Constructor Details

  • Method Details

    • getBalanceTransaction

      public java.lang.String getBalanceTransaction()
      Get id of expandable `balanceTransaction` object.
    • setBalanceTransaction

      public void setBalanceTransaction​(java.lang.String id)
    • getBalanceTransactionObject

      public BalanceTransaction getBalanceTransactionObject()
      Get expanded `balanceTransaction`.
    • setBalanceTransactionObject

      public void setBalanceTransactionObject​(BalanceTransaction expandableObject)
    • getDestination

      public java.lang.String getDestination()
      Get id of expandable `destination` object.
    • setDestination

      public void setDestination​(java.lang.String id)
    • getDestinationObject

      public Account getDestinationObject()
      Get expanded `destination`.
    • setDestinationObject

      public void setDestinationObject​(Account expandableObject)
    • getDestinationPayment

      public java.lang.String getDestinationPayment()
      Get id of expandable `destinationPayment` object.
    • setDestinationPayment

      public void setDestinationPayment​(java.lang.String id)
    • getDestinationPaymentObject

      public Charge getDestinationPaymentObject()
      Get expanded `destinationPayment`.
    • setDestinationPaymentObject

      public void setDestinationPaymentObject​(Charge expandableObject)
    • getSourceTransaction

      public java.lang.String getSourceTransaction()
      Get id of expandable `sourceTransaction` object.
    • setSourceTransaction

      public void setSourceTransaction​(java.lang.String id)
    • getSourceTransactionObject

      public Charge getSourceTransactionObject()
      Get expanded `sourceTransaction`.
    • setSourceTransactionObject

      public void setSourceTransactionObject​(Charge expandableObject)
    • create

      public static Transfer create​(java.util.Map<java.lang.String,​java.lang.Object> params) 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
    • create

      public static Transfer create​(java.util.Map<java.lang.String,​java.lang.Object> 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
    • create

      public static Transfer create​(TransferCreateParams params) 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
    • 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

      public static TransferCollection list​(java.util.Map<java.lang.String,​java.lang.Object> params) 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
    • list

      public static TransferCollection list​(java.util.Map<java.lang.String,​java.lang.Object> 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
    • list

      public static TransferCollection list​(TransferListParams params) 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
    • 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

      public static Transfer retrieve​(java.lang.String transfer) 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
    • retrieve

      public static Transfer retrieve​(java.lang.String transfer, 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
    • retrieve

      public static Transfer retrieve​(java.lang.String transfer, java.util.Map<java.lang.String,​java.lang.Object> 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
    • retrieve

      public static Transfer retrieve​(java.lang.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

      public Transfer update​(java.util.Map<java.lang.String,​java.lang.Object> params) throws StripeException
      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 interface MetadataStore<Transfer>
      Throws:
      StripeException
    • update

      public Transfer update​(java.util.Map<java.lang.String,​java.lang.Object> params, RequestOptions options) throws StripeException
      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 interface MetadataStore<Transfer>
      Throws:
      StripeException
    • update

      public Transfer update​(TransferUpdateParams params) throws StripeException
      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

      public Transfer update​(TransferUpdateParams params, RequestOptions options) throws StripeException
      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
    • getAmount

      public java.lang.Long getAmount()
      Amount in %s to be transferred.
    • getAmountReversed

      public java.lang.Long getAmountReversed()
      Amount in %s reversed (can be less than the amount attribute on the transfer if a partial reversal was issued).
    • getCreated

      public java.lang.Long getCreated()
      Time that this record of the transfer was first created.
    • getCurrency

      public java.lang.String getCurrency()
      Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
    • getDescription

      public java.lang.String getDescription()
      An arbitrary string attached to the object. Often useful for displaying to users.
    • getLivemode

      public java.lang.Boolean getLivemode()
      Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
    • getObject

      public java.lang.String getObject()
      String representing the object's type. Objects of the same type share the same value.

      Equal to `transfer`.

    • getReversals

      public TransferReversalCollection getReversals()
      A list of reversals that have been applied to the transfer.
    • getReversed

      public java.lang.Boolean getReversed()
      Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false.
    • getSourceType

      public java.lang.String getSourceType()
      The source balance this transfer came from. One of `card` or `bank_account`.
    • getTransferGroup

      public java.lang.String getTransferGroup()
      A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#grouping-transactions) for details.
    • setAmount

      public void setAmount​(java.lang.Long amount)
      Amount in %s to be transferred.
    • setAmountReversed

      public void setAmountReversed​(java.lang.Long amountReversed)
      Amount in %s reversed (can be less than the amount attribute on the transfer if a partial reversal was issued).
    • setCreated

      public void setCreated​(java.lang.Long created)
      Time that this record of the transfer was first created.
    • setCurrency

      public void setCurrency​(java.lang.String currency)
      Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
    • setDescription

      public void setDescription​(java.lang.String description)
      An arbitrary string attached to the object. Often useful for displaying to users.
    • setId

      public void setId​(java.lang.String id)
      Unique identifier for the object.
    • setLivemode

      public void setLivemode​(java.lang.Boolean livemode)
      Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
    • setMetadata

      public void setMetadata​(java.util.Map<java.lang.String,​java.lang.String> metadata)
      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

      public void setObject​(java.lang.String object)
      String representing the object's type. Objects of the same type share the same value.

      Equal to `transfer`.

    • setReversals

      public void setReversals​(TransferReversalCollection reversals)
      A list of reversals that have been applied to the transfer.
    • setReversed

      public void setReversed​(java.lang.Boolean reversed)
      Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false.
    • setSourceType

      public void setSourceType​(java.lang.String sourceType)
      The source balance this transfer came from. One of `card` or `bank_account`.
    • setTransferGroup

      public void setTransferGroup​(java.lang.String transferGroup)
      A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#grouping-transactions) for details.
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • canEqual

      protected boolean canEqual​(java.lang.Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • getId

      public java.lang.String getId()
      Unique identifier for the object.
      Specified by:
      getId in interface HasId
    • getMetadata

      public java.util.Map<java.lang.String,​java.lang.String> 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 interface MetadataStore<Transfer>