S76 Stripe v0.1.6 Stripe.Charge View Source

The Stripe Charge object.

See https://stripe.com/docs/api/curl#charges for further details.

Link to this section Summary

Functions

See https://stripe.com/docs/api/curl#capture_charge

See https://stripe.com/docs/api/curl#create_charge

Link to this section Types

Link to this type

t()

View Source
t() :: %Stripe.Charge{
  amount: Decimal.t(),
  amount_refunded: Decimal.t(),
  application_fee: nil | String.t(),
  balance_transaction: Stripe.reference(Stripe.BalanceTransaction.t()),
  captured: boolean(),
  created: DateTime.t(),
  currency: Stripe.currency_code(),
  description: nil | String.t(),
  dispute: nil | String.t(),
  failure_code: nil | String.t(),
  failure_message: nil | String.t(),
  fraud_details:
    nil
    | %{
        optional(:user_report) => :safe | :fraudulent,
        optional(:stripe_report) => :fraudulent
      },
  id: nil | String.t(),
  invoice: nil | String.t(),
  livemode: boolean(),
  metadata: Stripe.metadata(),
  outcome:
    nil
    | %{
        network_status:
          :approved_by_network
          | :declined_by_network
          | :not_sent_to_network
          | :reversed_after_approval,
        reason: String.t(),
        risk_level: :normal | :elevated | :highest,
        seller_message: String.t(),
        type:
          :authorized | :manual_review | :issuer_declined | :blocked | :invalid
      },
  paid: boolean(),
  receipt_email: nil | String.t(),
  receipt_number: nil | String.t(),
  refunded: boolean(),
  review: nil | String.t(),
  shipping:
    nil
    | %{
        address: %{
          city: nil | String.t(),
          country: nil | String.t(),
          line1: nil | String.t(),
          line2: nil | String.t(),
          postal_code: nil | String.t(),
          state: nil | String.t()
        },
        carrier: String.t(),
        name: String.t(),
        phone: String.t(),
        tracking_number: String.t()
      },
  statement_descriptor: nil | String.t(),
  status: :pending | :succeeded | :failed
}

Link to this section Functions

Link to this function

capture(id_or_charge)

View Source
capture(map()) :: Stripe.API.response(t())

See https://stripe.com/docs/api/curl#capture_charge

Link to this function

create(params)

View Source
create(map()) :: Stripe.API.response(t())

See https://stripe.com/docs/api/curl#create_charge