# `MPP.Methods.Shared`
[🔗](https://github.com/ZenHive/mpp/blob/v0.10.0/lib/mpp/methods/shared.ex#L1)

Verification helpers shared by the payment-method modules
(`MPP.Methods.EVM`, `MPP.Methods.Tempo`, `MPP.Methods.Stripe`).

These are small, method-agnostic building blocks. `require_config/3` takes a
human-readable method `label` so its error message names the calling method.

# `check_receipt_status`

```elixir
@spec check_receipt_status(map()) :: :ok | {:error, MPP.Errors.t()}
```

Assert an on-chain transaction receipt succeeded (`status == 1`).

Returns `:ok`, or a `:verification_failed` error when the transaction reverted.

# `parse_charge_amount`

```elixir
@spec parse_charge_amount(String.t()) :: {:ok, integer()} | {:error, MPP.Errors.t()}
```

Parse a charge amount string into an integer.

Returns `{:ok, integer}`, or a `:verification_failed` error when `amount` is
not a valid integer string.

# `require_config`

```elixir
@spec require_config(map(), term(), String.t()) ::
  {:ok, term()} | {:error, MPP.Errors.t()}
```

Fetch a required key from a method's config map.

Returns `{:ok, value}`, or a `:verification_failed` error naming the method via
`label` (e.g. `"EVM"`, `"Tempo"`, `"Stripe"`) and the missing `key`.

---

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