Class OutboundPayment

All Implemented Interfaces:
HasId, StripeActiveObject, StripeObjectInterface

public class OutboundPayment extends ApiResource implements HasId
Use OutboundPayments to send funds to another party's external bank account or FinancialAccount. To send money to an account belonging to the same user, use an OutboundTransfer.

Simulate OutboundPayment state changes with the /v1/test_helpers/treasury/outbound_payments endpoints. These methods can only be called on test mode objects.

  • Constructor Details

    • OutboundPayment

      public OutboundPayment()
  • Method Details

    • getTransaction

      public String getTransaction()
      Get ID of expandable transaction object.
    • setTransaction

      public void setTransaction(String id)
    • getTransactionObject

      public Transaction getTransactionObject()
      Get expanded transaction.
    • setTransactionObject

      public void setTransactionObject(Transaction expandableObject)
    • cancel

      public OutboundPayment cancel() throws StripeException
      Cancel an OutboundPayment.
      Throws:
      StripeException
    • cancel

      public OutboundPayment cancel(RequestOptions options) throws StripeException
      Cancel an OutboundPayment.
      Throws:
      StripeException
    • cancel

      public OutboundPayment cancel(Map<String,Object> params) throws StripeException
      Cancel an OutboundPayment.
      Throws:
      StripeException
    • cancel

      public OutboundPayment cancel(Map<String,Object> params, RequestOptions options) throws StripeException
      Cancel an OutboundPayment.
      Throws:
      StripeException
    • cancel

      Cancel an OutboundPayment.
      Throws:
      StripeException
    • cancel

      Cancel an OutboundPayment.
      Throws:
      StripeException
    • create

      public static OutboundPayment create(Map<String,Object> params) throws StripeException
      Creates an OutboundPayment.
      Throws:
      StripeException
    • create

      public static OutboundPayment create(Map<String,Object> params, RequestOptions options) throws StripeException
      Creates an OutboundPayment.
      Throws:
      StripeException
    • create

      public static OutboundPayment create(OutboundPaymentCreateParams params) throws StripeException
      Creates an OutboundPayment.
      Throws:
      StripeException
    • create

      public static OutboundPayment create(OutboundPaymentCreateParams params, RequestOptions options) throws StripeException
      Creates an OutboundPayment.
      Throws:
      StripeException
    • list

      public static OutboundPaymentCollection list(Map<String,Object> params) throws StripeException
      Returns a list of OutboundPayments sent from the specified FinancialAccount.
      Throws:
      StripeException
    • list

      public static OutboundPaymentCollection list(Map<String,Object> params, RequestOptions options) throws StripeException
      Returns a list of OutboundPayments sent from the specified FinancialAccount.
      Throws:
      StripeException
    • list

      Returns a list of OutboundPayments sent from the specified FinancialAccount.
      Throws:
      StripeException
    • list

      Returns a list of OutboundPayments sent from the specified FinancialAccount.
      Throws:
      StripeException
    • retrieve

      public static OutboundPayment retrieve(String id) throws StripeException
      Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.
      Throws:
      StripeException
    • retrieve

      public static OutboundPayment retrieve(String id, RequestOptions options) throws StripeException
      Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.
      Throws:
      StripeException
    • retrieve

      public static OutboundPayment retrieve(String id, Map<String,Object> params, RequestOptions options) throws StripeException
      Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.
      Throws:
      StripeException
    • retrieve

      public static OutboundPayment retrieve(String id, OutboundPaymentRetrieveParams params, RequestOptions options) throws StripeException
      Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.
      Throws:
      StripeException
    • getTestHelpers

      public OutboundPayment.TestHelpers getTestHelpers()
    • 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) transferred.
    • getCancelable

      public Boolean getCancelable()
      Returns true if the object can be canceled, and false otherwise.
    • 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.
    • getCustomer

      public String getCustomer()
      ID of the customer to whom an OutboundPayment is sent.
    • getDescription

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

      public String getDestinationPaymentMethod()
      The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using destination_payment_method_data.
    • getDestinationPaymentMethodDetails

      public OutboundPayment.DestinationPaymentMethodDetails getDestinationPaymentMethodDetails()
      Details about the PaymentMethod for an OutboundPayment.
    • getEndUserDetails

      public OutboundPayment.EndUserDetails getEndUserDetails()
      Details about the end user.
    • getExpectedArrivalDate

      public Long getExpectedArrivalDate()
      The date when funds are expected to arrive in the destination account.
    • getFinancialAccount

      public String getFinancialAccount()
      The FinancialAccount that funds were pulled from.
    • getHostedRegulatoryReceiptUrl

      public String getHostedRegulatoryReceiptUrl()
      A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
    • getLivemode

      public Boolean getLivemode()
      Has the value true if the object exists in live mode or the value false if the object exists in test mode.
    • 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.
    • getObject

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

      Equal to treasury.outbound_payment.

    • getReturnedDetails

      public OutboundPayment.ReturnedDetails getReturnedDetails()
      Details about a returned OutboundPayment. Only set when the status is returned.
    • getStatementDescriptor

      public String getStatementDescriptor()
      The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer).
    • getStatus

      public String getStatus()
      Current status of the OutboundPayment: processing, failed, posted, returned, canceled. An OutboundPayment is processing if it has been created and is pending. The status changes to posted once the OutboundPayment has been "confirmed" and funds have left the account, or to failed or canceled. If an OutboundPayment fails to arrive at its destination, its status will change to returned.

      One of canceled, failed, posted, processing, or returned.

    • getStatusTransitions

      public OutboundPayment.StatusTransitions getStatusTransitions()
    • setAmount

      public void setAmount(Long amount)
      Amount (in cents) transferred.
    • setCancelable

      public void setCancelable(Boolean cancelable)
      Returns true if the object can be canceled, and false otherwise.
    • 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.
    • setCustomer

      public void setCustomer(String customer)
      ID of the customer to whom an OutboundPayment is sent.
    • setDescription

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

      public void setDestinationPaymentMethod(String destinationPaymentMethod)
      The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using destination_payment_method_data.
    • setDestinationPaymentMethodDetails

      public void setDestinationPaymentMethodDetails(OutboundPayment.DestinationPaymentMethodDetails destinationPaymentMethodDetails)
      Details about the PaymentMethod for an OutboundPayment.
    • setEndUserDetails

      public void setEndUserDetails(OutboundPayment.EndUserDetails endUserDetails)
      Details about the end user.
    • setExpectedArrivalDate

      public void setExpectedArrivalDate(Long expectedArrivalDate)
      The date when funds are expected to arrive in the destination account.
    • setFinancialAccount

      public void setFinancialAccount(String financialAccount)
      The FinancialAccount that funds were pulled from.
    • setHostedRegulatoryReceiptUrl

      public void setHostedRegulatoryReceiptUrl(String hostedRegulatoryReceiptUrl)
      A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
    • setId

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

      public void setLivemode(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(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 treasury.outbound_payment.

    • setReturnedDetails

      public void setReturnedDetails(OutboundPayment.ReturnedDetails returnedDetails)
      Details about a returned OutboundPayment. Only set when the status is returned.
    • setStatementDescriptor

      public void setStatementDescriptor(String statementDescriptor)
      The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer).
    • setStatus

      public void setStatus(String status)
      Current status of the OutboundPayment: processing, failed, posted, returned, canceled. An OutboundPayment is processing if it has been created and is pending. The status changes to posted once the OutboundPayment has been "confirmed" and funds have left the account, or to failed or canceled. If an OutboundPayment fails to arrive at its destination, its status will change to returned.

      One of canceled, failed, posted, processing, or returned.

    • setStatusTransitions

      public void setStatusTransitions(OutboundPayment.StatusTransitions statusTransitions)
    • 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