Class TransferReversal

All Implemented Interfaces:
BalanceTransactionSource, HasId, MetadataStore<TransferReversal>, StripeActiveObject, StripeObjectInterface

public class TransferReversal extends ApiResource implements MetadataStore<TransferReversal>, BalanceTransactionSource
Stripe Connect platforms can reverse transfers made to a connected account, either entirely or partially, and can also specify whether to refund any related application fees. Transfer reversals add to the platform's balance and subtract from the destination account's balance.

Reversing a transfer that was made for a destination charge is allowed only up to the amount of the charge. It is possible to reverse a transfer_group transfer only if the destination account has enough balance to cover the reversal.

Related guide: Reverse transfers

  • Constructor Details

    • TransferReversal

      public TransferReversal()
  • Method Details

    • getBalanceTransaction

      public String getBalanceTransaction()
      Get ID of expandable balanceTransaction object.
    • setBalanceTransaction

      public void setBalanceTransaction(String id)
    • getBalanceTransactionObject

      public BalanceTransaction getBalanceTransactionObject()
      Get expanded balanceTransaction.
    • setBalanceTransactionObject

      public void setBalanceTransactionObject(BalanceTransaction expandableObject)
    • getDestinationPaymentRefund

      public String getDestinationPaymentRefund()
      Get ID of expandable destinationPaymentRefund object.
    • setDestinationPaymentRefund

      public void setDestinationPaymentRefund(String id)
    • getDestinationPaymentRefundObject

      public Refund getDestinationPaymentRefundObject()
      Get expanded destinationPaymentRefund.
    • setDestinationPaymentRefundObject

      public void setDestinationPaymentRefundObject(Refund expandableObject)
    • getSourceRefund

      public String getSourceRefund()
      Get ID of expandable sourceRefund object.
    • setSourceRefund

      public void setSourceRefund(String id)
    • getSourceRefundObject

      public Refund getSourceRefundObject()
      Get expanded sourceRefund.
    • setSourceRefundObject

      public void setSourceRefundObject(Refund expandableObject)
    • getTransfer

      public String getTransfer()
      Get ID of expandable transfer object.
    • setTransfer

      public void setTransfer(String id)
    • getTransferObject

      public Transfer getTransferObject()
      Get expanded transfer.
    • setTransferObject

      public void setTransferObject(Transfer expandableObject)
    • update

      public TransferReversal update(Map<String,Object> params) throws StripeException
      Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

      This request only accepts metadata and description as arguments.

      Specified by:
      update in interface MetadataStore<TransferReversal>
      Throws:
      StripeException
    • update

      public TransferReversal update(Map<String,Object> params, RequestOptions options) throws StripeException
      Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

      This request only accepts metadata and description as arguments.

      Specified by:
      update in interface MetadataStore<TransferReversal>
      Throws:
      StripeException
    • update

      Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

      This request only accepts metadata and description as arguments.

      Throws:
      StripeException
    • update

      Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

      This request only accepts metadata and description as arguments.

      Throws:
      StripeException
    • setResponseGetter

      public void setResponseGetter(StripeResponseGetter responseGetter)
      Description copied from interface: StripeActiveObject
      Method is used by the containing object or StripeResponseGetter implementations to set the StripeResponseGetter instance used to make further requests.
      Specified by:
      setResponseGetter in interface StripeActiveObject
      Overrides:
      setResponseGetter in class ApiResource
      Parameters:
      responseGetter - the StripeResponseGetter instance to use for making further requests.
    • getAmount

      public Long getAmount()
      Amount, in cents (or local equivalent).
    • getCreated

      public Long getCreated()
      Time at which the object was created. Measured in seconds since the Unix epoch.
    • getCurrency

      public String getCurrency()
      Three-letter ISO currency code, in lowercase. Must be a supported currency.
    • getObject

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

      Equal to transfer_reversal.

    • setAmount

      public void setAmount(Long amount)
      Amount, in cents (or local equivalent).
    • setCreated

      public void setCreated(Long created)
      Time at which the object was created. Measured in seconds since the Unix epoch.
    • setCurrency

      public void setCurrency(String currency)
      Three-letter ISO currency code, in lowercase. Must be a supported currency.
    • setId

      public void setId(String id)
      Unique identifier for the object.
    • setMetadata

      public void setMetadata(Map<String,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(String object)
      String representing the object's type. Objects of the same type share the same value.

      Equal to transfer_reversal.

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

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

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

      public Map<String,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<TransferReversal>