View Source ExOAPI.Stripe.Schemas.Charge (exoapi_stripe v0.1.4)
description: To charge a credit or a debit card, you create a Charge
object. You can
retrieve and refund individual charges as well as list all charges. Charges
are identified by a unique, random ID.
Related guide: Accept a payment with the Charges API.
:receipt_url :: :string
This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt.
:payment_method :: ExOAPI.Stripe.Schemas.PaymentMethod
ID of the payment method used in this charge.
:livemode :: :boolean
Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
:calculated_statement_descriptor :: :string
The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined.
:metadata :: :map
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
:description :: :string
An arbitrary string attached to the object. Often useful for displaying to users.
:paid :: :boolean
true
if the charge succeeded, or was successfully authorized for later capture.
:application_fee :: ExOAPI.Stripe.Schemas.ApplicationFee | :string
The application fee (if any) for the charge. See the Connect documentation for details.
:failure_message :: :string
Message to user further explaining reason for charge failure if available.
:review :: ExOAPI.Stripe.Schemas.Review | :string
ID of the review associated with this charge if one exists.
:payment_intent :: ExOAPI.Stripe.Schemas.PaymentIntent | :string
ID of the PaymentIntent associated with this charge, if one exists.
::data :: ExOAPI.Stripe.Schemas.Refund
:has_more :: :boolean
True if this list has another page of items after this one that can be fetched.
:object :: :string
String representing the object's type. Objects of the same type share the same value. Always has the value list
.
:url :: :string
The URL where this list can be accessed.
:on_behalf_of :: ExOAPI.Stripe.Schemas.Account | :string
The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the Connect documentation for details.
:customer :: ExOAPI.Stripe.Schemas.DeletedCustomer | ExOAPI.Stripe.Schemas.Customer | :string
ID of the customer this charge is for if one exists.
:fraud_details :: ExOAPI.Stripe.Schemas.ChargeFraudDetails
Information on fraud assessments for the charge.
:amount :: :integer
Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
:outcome :: ExOAPI.Stripe.Schemas.ChargeOutcome
Details about whether the payment was accepted, and why. See understanding declines for details.
:invoice :: ExOAPI.Stripe.Schemas.Invoice | :string
ID of the invoice this charge is for if one exists.
:payment_method_details :: ExOAPI.Stripe.Schemas.PaymentMethodDetails
Details about the payment method at the time of the transaction.
:statement_descriptor :: :string
For card charges, use statement_descriptor_suffix
instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters.
:balance_transaction :: ExOAPI.Stripe.Schemas.BalanceTransaction | :string
ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes).
:application :: ExOAPI.Stripe.Schemas.Application | :string
ID of the Connect application that created the charge.
:receipt_email :: :string
This is the email address that the receipt for this charge was sent to.
:failure_balance_transaction :: ExOAPI.Stripe.Schemas.BalanceTransaction | :string
ID of the balance transaction that describes the reversal of the balance on your account due to payment failure.
:receipt_number :: :string
This is the transaction number that appears on email receipts sent for this charge. This attribute will be null
until a receipt has been sent.
:failure_code :: :string
Error code explaining reason for charge failure if available (see the errors section for a list of codes).
:object :: :string
String representing the object's type. Objects of the same type share the same value.
:amount_captured :: :integer
Amount in %s captured (can be less than the amount attribute on the charge if a partial capture was made).
:order :: ExOAPI.Stripe.Schemas.Order | :string
ID of the order this charge is for if one exists.
:billing_details :: ExOAPI.Stripe.Schemas.BillingDetails
:captured :: :boolean
If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured.
:amount_refunded :: :integer
Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued).
:refunded :: :boolean
Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false.
:currency :: :string
Three-letter ISO currency code, in lowercase. Must be a supported currency.
:created :: :integer
Time at which the object was created. Measured in seconds since the Unix epoch.
:transfer :: ExOAPI.Stripe.Schemas.Transfer | :string
ID of the transfer to the destination
account (only applicable if the charge was created using the destination
parameter).
:source_transfer :: ExOAPI.Stripe.Schemas.Transfer | :string
The transfer ID which created this charge. Only present if the charge came from another Stripe account. See the Connect documentation for details.
:status :: :string
The status of the payment is either succeeded
, pending
, or failed
.
:transfer_group :: :string
A string that identifies this transaction as part of a group. See the Connect documentation for details.
:disputed :: :boolean
Whether the charge has been disputed.
:application_fee_amount :: :integer
The amount of the application fee (if any) requested for the charge. See the Connect documentation for details.
:statement_descriptor_suffix :: :string
Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.
:transfer_data :: ExOAPI.Stripe.Schemas.ChargeTransferData
An optional dictionary including the account to automatically transfer to as part of a destination charge. See the Connect documentation for details.
:id :: :string
Unique identifier for the object.
:shipping :: ExOAPI.Stripe.Schemas.Shipping
Shipping information for the charge.
Link to this section Summary
Link to this section Types
@type params() :: map()
@type t() :: %ExOAPI.Stripe.Schemas.Charge{ amount: integer() | nil, amount_captured: integer() | nil, amount_refunded: integer() | nil, application: ExOAPI.EctoTypes.AnyOf.t() | nil, application_fee: ExOAPI.EctoTypes.AnyOf.t() | nil, application_fee_amount: integer() | nil, balance_transaction: ExOAPI.EctoTypes.AnyOf.t() | nil, billing_details: ExOAPI.Stripe.Schemas.BillingDetails.t() | nil, calculated_statement_descriptor: String.t() | nil, captured: boolean() | nil, created: integer() | nil, currency: String.t() | nil, customer: ExOAPI.EctoTypes.AnyOf.t() | nil, description: String.t() | nil, disputed: boolean() | nil, failure_balance_transaction: ExOAPI.EctoTypes.AnyOf.t() | nil, failure_code: String.t() | nil, failure_message: String.t() | nil, fraud_details: ExOAPI.EctoTypes.AnyOf.t() | nil, id: String.t() | nil, invoice: ExOAPI.EctoTypes.AnyOf.t() | nil, livemode: boolean() | nil, metadata: map() | nil, object: :charge | nil, on_behalf_of: ExOAPI.EctoTypes.AnyOf.t() | nil, order: ExOAPI.EctoTypes.AnyOf.t() | nil, outcome: ExOAPI.EctoTypes.AnyOf.t() | nil, paid: boolean() | nil, payment_intent: ExOAPI.EctoTypes.AnyOf.t() | nil, payment_method: String.t() | nil, payment_method_details: ExOAPI.EctoTypes.AnyOf.t() | nil, receipt_email: String.t() | nil, receipt_number: String.t() | nil, receipt_url: String.t() | nil, refunded: boolean() | nil, refunds: map() | nil, review: ExOAPI.EctoTypes.AnyOf.t() | nil, shipping: ExOAPI.EctoTypes.AnyOf.t() | nil, source_transfer: ExOAPI.EctoTypes.AnyOf.t() | nil, statement_descriptor: String.t() | nil, statement_descriptor_suffix: String.t() | nil, status: (:succeeded | :pending | :failed) | nil, transfer: ExOAPI.EctoTypes.AnyOf.t() | nil, transfer_data: ExOAPI.EctoTypes.AnyOf.t() | nil, transfer_group: String.t() | nil }
Link to this section Functions
@spec changeset(t(), params()) :: Ecto.Changeset.t()