# `Daraja.B2B.Response`
[🔗](https://github.com/okothkongo/daraja/blob/v0.1.1/lib/daraja/b2b/response.ex#L1)

Response structs for the B2B Payment Request API.

# `from_map`

```elixir
@spec from_map(map()) ::
  Daraja.B2B.Response.Success.t() | Daraja.B2B.Response.Error.t()
```

Parses a raw response map into a `Success` or `Error` struct.

Note: Safaricom may return the misspelled key `OriginatorCoversationID`
(missing the second 'n'). Both spellings are handled for resilience.

---

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