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

net.corda.finance.flows

## Class CashIssueAndPaymentFlow

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

-     @StartableByRPC
      public class CashIssueAndPaymentFlow
      extends AbstractCashFlow

  Initiates a flow that self-issues cash and then send this to a recipient.

  We issue cash only to ourselves so that all KYC/AML checks on payments are enforced consistently, rather than risk checks for issuance and payments differing. Outside of test scenarios it would be extremely unusual to issue cash and immediately transfer it, so impact of this limitation is considered minimal.

- - ### Field Detail

    - #### Companion

          public static net.corda.finance.flows.CashIssueAndPaymentFlow.Companion Companion

  - ### Constructor Detail

    - #### CashIssueAndPaymentFlow

          public CashIssueAndPaymentFlow(@NotNull
                                         Amount<java.util.Currency> amount,
                                         @NotNull
                                         OpaqueBytes issueRef,
                                         @NotNull
                                         Party recipient,
                                         boolean anonymous,
                                         @NotNull
                                         Party notary,
                                         @NotNull
                                         ProgressTracker progressTracker)

      Initiates a flow that self-issues cash and then send this to a recipient.

      We issue cash only to ourselves so that all KYC/AML checks on payments are enforced consistently, rather than risk checks for issuance and payments differing. Outside of test scenarios it would be extremely unusual to issue cash and immediately transfer it, so impact of this limitation is considered minimal.

      Parameters:
        `amount` - the amount of currency to issue.
        `issueRef` - a reference to put on the issued currency.
        `recipient` - the recipient of the currency
        `anonymous` - if true, the recipient of the cash will be anonymous. Should be true for normal usage
        `notary` - the notary to set on the output states.

    - #### CashIssueAndPaymentFlow

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

    - #### CashIssueAndPaymentFlow

          public CashIssueAndPaymentFlow(@NotNull
                                         net.corda.finance.flows.CashIssueAndPaymentFlow.IssueAndPaymentRequest 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 currency to issue.

    - #### getIssueRef

          @NotNull
          public OpaqueBytes getIssueRef()

      a reference to put on the issued currency.

    - #### getRecipient

          @NotNull
          public Party getRecipient()

      the recipient of the currency

    - #### getAnonymous

          public boolean getAnonymous()

      if true,

      the recipient of the cash will be anonymous. Should be true for normal usage

    - #### getNotary

          @NotNull
          public Party getNotary()

      the notary to set on the output states.