ch_…) records one confirmation attempt on a PaymentIntent. It holds the outcome, authorization details, decline details, and settlement status. Ionic creates Charges when a PaymentIntent is confirmed; you read them but do not create them. A Charge can later be returned through a Refund.
Each Charge references its PaymentIntent in intent_id and the PaymentMethod used in payment_method. For how these objects connect, see Key concepts. For refunds and captures, see Refunds and captures.
Attributes
string
The charge id (
ch_…).string
The payment intent this charge belongs to (
pi_…).integer
The charge amount, in minor units. Always positive.
integer
Total refunded so far, in minor units.
string
The charge’s currency, matching
amount’s currency.string
uncertain means the final outcome is not known yet. Retrieve the Charge again before retrying.string | null
Machine-readable decline reason, such as
insufficient_funds.string | null
One of
authorization (a card or funds issue), authentication (a fraud signal such as a lost or stolen card), or infrastructure (a processing or network problem). Set only when the Charge was declined; null otherwise.string | null
A human-readable failure detail. Nullable; present when the charge failed.
string
The payment method (
pm_…) used. Always present.Endpoints
Statuses
See how payment status changes for how Charge outcomes move the PaymentIntent.
Decline details
A declined or failed Charge carriesdecline_code, decline_type, and failure_message. Decline codes lists every code and what to do about it.
A PaymentIntent’s charges list is ordered oldest first. Use latest_charge_id on the PaymentIntent to find the most recent attempt.
