CashPaymentFlow
Keywords: net.corda.finance.flows.CashPaymentFlow class
Date: 2023-09-18

net.corda.finance.flows

## Class CashPaymentFlow

- net.corda.core.flows.FlowLogic<T>
- - AbstractCashFlow
  - - net.corda.finance.flows.CashPaymentFlow

-     @StartableByRPC
       @InitiatingFlow
      public class CashPaymentFlow
      extends AbstractCashFlow

  Initiates a flow that sends cash to a recipient.

- - ### Constructor Detail

    - #### CashPaymentFlow

          public CashPaymentFlow(@NotNull
                                 Amount<java.util.Currency> amount,
                                 @NotNull
                                 Party recipient,
                                 boolean anonymous,
                                 @NotNull
                                 ProgressTracker progressTracker,
                                 @NotNull
                                 java.util.Set<net.corda.core.identity.Party> issuerConstraint,
                                 @Nullable
                                 Party notary)

      Initiates a flow that sends cash to a recipient.

      Parameters:
        `amount` - the amount of a currency to pay to the recipient.
        `recipient` - the party to pay the currency to.
        `anonymous` - whether to anonymous the recipient party. Should be true for normal usage, but may be false
        `issuerConstraint` - if specified, the payment will be made using only cash issued by the given parties.
        `notary` - if not specified, the first notary of the network map is selectedfor testing purposes.

    - #### CashPaymentFlow

          public CashPaymentFlow(@NotNull
                                 Amount<java.util.Currency> amount,
                                 @NotNull
                                 Party recipient)

      A straightforward constructor that constructs spends using cash states of any issuer.

    - #### CashPaymentFlow

          public CashPaymentFlow(@NotNull
                                 Amount<java.util.Currency> amount,
                                 @NotNull
                                 Party recipient,
                                 boolean anonymous)

      A straightforward constructor that constructs spends using cash states of any issuer.

    - #### CashPaymentFlow

          public CashPaymentFlow(@NotNull
                                 Amount<java.util.Currency> amount,
                                 @NotNull
                                 Party recipient,
                                 boolean anonymous,
                                 @NotNull
                                 Party notary)

    - #### CashPaymentFlow

          public CashPaymentFlow(@NotNull
                                 net.corda.finance.flows.CashPaymentFlow.PaymentRequest request)

  - ### Method Detail

    - #### call

          @Suspendable
           @NotNull
          public net.corda.finance.flows.AbstractCashFlow.Result call()

      This is where you fill out your business logic.

    - #### getAmount

          @NotNull
          public Amount<java.util.Currency> getAmount()

      the amount of a currency to pay to the recipient.

    - #### getRecipient

          @NotNull
          public Party getRecipient()

      the party to pay the currency to.

    - #### getAnonymous

          public boolean getAnonymous()

      whether to anonymous the recipient party.

      Should be true for normal usage, but may be false

    - #### getIssuerConstraint

          @NotNull
          public java.util.Set<net.corda.core.identity.Party> getIssuerConstraint()

      if specified,

      the payment will be made using only cash issued by the given parties.

    - #### getNotary

          @Nullable
          public Party getNotary()

      if not specified,

      the first notary of the network map is selectedfor testing purposes.