AirtelMoney.Webhooks.Parser (airtel_money v0.1.0)

Copy Markdown View Source

Parses Airtel Money webhook payloads.

Examples

iex> # This would normally parse the JSON, but for doctest we skip the actual parsing
iex> :ok
:ok

Summary

Functions

Parses a webhook payload.

Functions

parse(payload)

@spec parse(String.t()) :: {:ok, map()} | {:error, :invalid_json}

Parses a webhook payload.

Parameters

  • payload - The raw JSON payload (string)

Returns

  • {:ok, map()} if parsing succeeds
  • {:error, :invalid_json} if parsing fails