View Source Stripe.ApiErrors (stripity_stripe v3.1.1)

Link to this section Summary

Types

t()

The api_errors type.

Link to this section Types

@type t() :: %Stripe.ApiErrors{
  charge: binary(),
  code: binary(),
  decline_code: binary(),
  doc_url: binary(),
  message: binary(),
  param: binary(),
  payment_intent: Stripe.PaymentIntent.t(),
  payment_method: Stripe.PaymentMethod.t(),
  payment_method_type: binary(),
  request_log_url: binary(),
  setup_intent: Stripe.SetupIntent.t(),
  source: Stripe.PaymentSource.t(),
  type: binary()
}

The api_errors type.

  • charge For card errors, the ID of the failed charge.
  • code For some errors that could be handled programmatically, a short string indicating the error code reported.
  • decline_code For card errors resulting from a card issuer decline, a short string indicating the card issuer's reason for the decline if they provide one.
  • doc_url A URL to more information about the error code reported.
  • message A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.
  • param If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.
  • payment_intent
  • payment_method
  • payment_method_type If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.
  • request_log_url A URL to the request log entry in your dashboard.
  • setup_intent
  • source
  • type The type of error returned. One of api_error, card_error, idempotency_error, or invalid_request_error