# `Daraja.C2B.SimulateRequest`
[🔗](https://github.com/okothkongo/daraja/blob/v0.1.1/lib/daraja/c2b/simulate_request.ex#L1)

Input struct for a C2B Simulate transaction request (sandbox only).

Required fields: `short_code`, `command_id`, `amount`, `msisdn`.
Optional fields: `bill_ref_number`.

`command_id` must be either:
- `"CustomerPayBillOnline"` — payment to a Paybill number.
- `"CustomerBuyGoodsOnline"` — payment to a Till number.

`bill_ref_number` is the account reference for Paybill payments.
It should be `nil` for Till number payments (`CustomerBuyGoodsOnline`).

# `t`

```elixir
@type t() :: %Daraja.C2B.SimulateRequest{
  amount: pos_integer(),
  bill_ref_number: String.t() | nil,
  command_id: String.t(),
  msisdn: String.t(),
  short_code: String.t()
}
```

# `new`

```elixir
@spec new(map()) ::
  {:ok, t()} | {:error, :invalid_request, [atom() | {:command_id, String.t()}]}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
