# `Daraja.Express.Request`
[🔗](https://github.com/okothkongo/daraja/blob/v0.1.1/lib/daraja/express/request.ex#L1)

Input struct for an STK Push request.

Required fields: `amount`, `phone_number`, `account_reference`.

Phone numbers in local `07XXXXXXXX` form are normalized to `254XXXXXXXXX`.
Account reference is displayed to the customer in the USSD prompt (max 12 chars).
Transaction description is optional (max 13 chars).

# `t`

```elixir
@type t() :: %Daraja.Express.Request{
  account_reference: String.t(),
  amount: pos_integer(),
  phone_number: String.t(),
  transaction_desc: String.t() | nil,
  transaction_type: String.t()
}
```

# `new`

```elixir
@spec new(map()) ::
  {:ok, t()}
  | {:error, :invalid_request,
     [
       atom()
       | {:amount, String.t()}
       | {:phone_number, String.t()}
       | {:account_reference, String.t()}
       | {:transaction_desc, String.t()}
       | {:transaction_type, String.t()}
     ]}
```

---

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