Charge
The Charge object represents a single attempt to move money into your Stripe account.
PaymentIntent confirmation is the most common way to create Charges, but Account Debits may also create Charges.
Some legacy payment flows create Charges directly, which is not recommended for new integrations.
Summary
Types
@type t() :: %Stripe.Resources.Charge{ amount: integer(), amount_captured: integer(), amount_refunded: integer(), application: String.t() | Stripe.Resources.Application.t(), application_fee: String.t() | Stripe.Resources.ApplicationFee.t(), application_fee_amount: integer(), authorization_code: String.t() | nil, balance_transaction: String.t() | Stripe.Resources.BalanceTransaction.t(), billing_details: Stripe.Resources.Charge.BillingDetails.t(), calculated_statement_descriptor: String.t(), captured: boolean(), created: integer(), currency: String.t(), customer: String.t() | Stripe.Resources.Customer.t(), description: String.t(), disputed: boolean(), failure_balance_transaction: String.t() | Stripe.Resources.BalanceTransaction.t(), failure_code: String.t(), failure_message: String.t(), fraud_details: Stripe.Resources.Charge.FraudDetails.t(), id: String.t(), invoice: String.t() | Stripe.Resources.Invoice.t() | nil, level3: Stripe.Resources.Charge.Level3.t() | nil, livemode: boolean(), metadata: %{required(String.t()) => String.t()}, object: String.t(), on_behalf_of: String.t() | Stripe.Resources.Account.t(), outcome: Stripe.Resources.Charge.Outcome.t(), paid: boolean(), payment_intent: String.t() | Stripe.Resources.PaymentIntent.t(), payment_method: String.t(), payment_method_details: Stripe.Resources.Charge.PaymentMethodDetails.t(), presentment_details: Stripe.Resources.Charge.PresentmentDetails.t() | nil, radar_options: Stripe.Resources.Charge.RadarOptions.t() | nil, receipt_email: String.t(), receipt_number: String.t(), receipt_url: String.t(), refunded: boolean(), refunds: Stripe.Resources.Charge.Refunds.t() | nil, review: String.t() | Stripe.Resources.Review.t(), shipping: Stripe.Resources.ShippingDetails.t(), source: Stripe.Resources.PaymentSource.t(), source_transfer: String.t() | Stripe.Resources.Transfer.t(), statement_descriptor: String.t(), statement_descriptor_suffix: String.t(), status: String.t(), transfer: String.t() | Stripe.Resources.Transfer.t() | nil, transfer_data: Stripe.Resources.Charge.TransferData.t(), transfer_group: String.t() }
amount- 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).amount_captured- Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made).amount_refunded- Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued).application- ID of the Connect application that created the charge. Nullable. Expandable.application_fee- The application fee (if any) for the charge. See the Connect documentation for details. Nullable. Expandable.application_fee_amount- The amount of the application fee (if any) requested for the charge. See the Connect documentation for details. Nullable.authorization_code- Authorization code on the charge. Max length: 5000.balance_transaction- ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). Nullable. Expandable.billing_details- Expandable.calculated_statement_descriptor- 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. This value only exists for card payments. Max length: 5000. Nullable.captured- If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured.created- Time at which the object was created. Measured in seconds since the Unix epoch. Format: Unix timestamp.currency- Three-letter ISO currency code, in lowercase. Must be a supported currency. Format: ISO 4217 currency code.customer- ID of the customer this charge is for if one exists. Nullable. Expandable.description- An arbitrary string attached to the object. Often useful for displaying to users. Max length: 40000. Nullable.disputed- Whether the charge has been disputed.failure_balance_transaction- ID of the balance transaction that describes the reversal of the balance on your account due to payment failure. Nullable. Expandable.failure_code- Error code explaining reason for charge failure if available (see the errors section for a list of codes). Max length: 5000. Nullable.failure_message- Message to user further explaining reason for charge failure if available. Max length: 5000. Nullable.fraud_details- Information on fraud assessments for the charge. Nullable. Expandable.id- Unique identifier for the object. Max length: 5000.invoice- ID of the invoice this charge is for if one exists. Nullable.level3- Expandable.livemode- Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.metadata- 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.object- String representing the object's type. Objects of the same type share the same value. Possible values:charge.on_behalf_of- The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the Connect documentation for details. Nullable. Expandable.outcome- Details about whether the payment was accepted, and why. See understanding declines for details. Nullable. Expandable.paid-trueif the charge succeeded, or was successfully authorized for later capture.payment_intent- ID of the PaymentIntent associated with this charge, if one exists. Nullable. Expandable.payment_method- ID of the payment method used in this charge. Max length: 5000. Nullable.payment_method_details- Details about the payment method at the time of the transaction. Nullable. Expandable.presentment_details- Expandable.radar_options- Expandable.receipt_email- This is the email address that the receipt for this charge was sent to. Max length: 5000. Nullable.receipt_number- This is the transaction number that appears on email receipts sent for this charge. This attribute will benulluntil a receipt has been sent. Max length: 5000. Nullable.receipt_url- 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. Max length: 5000. Nullable.refunded- Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false.refunds- A list of refunds that have been applied to the charge. Nullable. Expandable.review- ID of the review associated with this charge if one exists. Nullable. Expandable.shipping- Shipping information for the charge. Nullable. Expandable.source- This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer topayment_methodorpayment_method_detailsinstead. Nullable. Expandable.source_transfer- The transfer ID which created this charge. Only present if the charge came from another Stripe account. See the Connect documentation for details. Nullable. Expandable.statement_descriptor- For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see the Statement Descriptor docs.
For a card charge, this value is ignored unless you don't specify a statement_descriptor_suffix, in which case this value is used as the suffix. Max length: 5000. Nullable.
statement_descriptor_suffix- Provides information about a card charge. Concatenated to the account's statement descriptor prefix to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. Max length: 5000. Nullable.status- The status of the payment is eithersucceeded,pending, orfailed. Possible values:failed,pending,succeeded.transfer- ID of the transfer to thedestinationaccount (only applicable if the charge was created using thedestinationparameter). Expandable.transfer_data- An optional dictionary including the account to automatically transfer to as part of a destination charge. See the Connect documentation for details. Nullable. Expandable.transfer_group- A string that identifies this transaction as part of a group. See the Connect documentation for details. Max length: 5000. Nullable.