# `MishkaPay.Errors.Declined`
[🔗](https://github.com/mishka-group/mishka_pay/blob/v0.0.1/lib/mishka_pay/__errors/declined.ex#L5)

The provider refused the payment or the refund: a declined card, not enough funds, a blocked
buyer.

  * `:provider`: the provider's id, such as `"stripe"`.
  * `:reason`: the provider's own short code, such as `"card_declined"`.
  * `:answer`: the provider's whole answer, for the log. Never shown to a buyer.
  * `:request_id`: the provider's id of the request (Stripe's `Request-Id` header, PayPal's
    debug id), when it gave one, for its support and the log. Never shown to a buyer.
  * `:doc_url`: the provider's page about the decline, when it named one.

# `exception`

```elixir
@spec exception(opts :: Keyword.t()) :: %MishkaPay.Errors.Declined{
  __exception__: term(),
  answer: term(),
  bread_crumbs: term(),
  class: term(),
  doc_url: term(),
  path: term(),
  provider: term(),
  reason: term(),
  request_id: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}
```

Create an `Elixir.MishkaPay.Errors.Declined` without raising it.

## Keys

- :provider
- :reason
- :answer
- :request_id
- :doc_url

---

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