---
agentTools:
  projectIndex: https://elements-pay.readme.io/llms.txt
---

# The charge object

[block:api-header]
{
  "title": "Attributes"
}
[/block]

[block:parameters]
{
  "data": {
    "0-0": "id",
    "1-0": "type",
    "0-1": "string",
    "1-1": "string",
    "0-2": "Unique identifier for the object.",
    "1-2": "The resource type of the return object. The value is \"charge\".",
    "h-0": "Field Name",
    "h-1": "Data Type",
    "h-2": "Description",
    "2-0": "status",
    "2-1": "string",
    "2-2": "Status of the charge(payment). \n**pending** - Payment is initiated\n**authorized** - Authorized and ready to capture\n**expired** - Self-explanatory\n**canceled** - Self-explanatory\n**failed** - Payment is failed\n**succeeded** - Payment is successfully captured.",
    "3-0": "amount_subunit",
    "3-1": "integer",
    "3-2": "Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit.",
    "4-0": "captured_amount_subunit",
    "4-1": "integer",
    "4-2": "Amount in cents captured (can be less than the amount attribute on the charge if a partial capture was made).",
    "5-0": "refunded_amount_subunit",
    "5-1": "integer",
    "5-2": "Amount in cents refunded (can be less than the amount attribute on the charge if a partial refund was issued).",
    "6-0": "currency",
    "6-1": "string",
    "6-2": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a supported currency.",
    "7-0": "metadata",
    "7-1": "hash",
    "7-2": "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.\n\n**gateway_metadata**  is reserved keyword used by Elements, original request metadata contains \"gateway_metadata\" will be rejected",
    "8-0": "description",
    "8-1": "string",
    "8-2": "An arbitrary string attached to the object. Often useful for displaying to users.",
    "9-0": "captured",
    "9-1": "boolean",
    "10-0": "refunded",
    "10-1": "boolean",
    "11-0": "disputed",
    "11-1": "boolean",
    "11-2": "Whether the charge has been disputed.",
    "10-2": "Whether the charge has been refunded.",
    "9-2": "Whether the charge has been captured.",
    "14-0": "created_at",
    "14-1": "integer",
    "14-2": "A timestamp indicates when the charge is created",
    "15-0": "reference_id",
    "15-1": "string",
    "15-2": "the payment reference id from PSP.",
    "16-0": "external_customer_id",
    "16-1": "string",
    "16-2": "external customer id from merchant associated with this charge",
    "12-0": "refunds",
    "12-1": "list",
    "12-2": "A list of refunds that have been applied to the charge. With few children fields:\n**refunds.object** - \nstring, value is \"list\": \nString representing the object’s type. Objects of the same type share the same value. Always has the value list.\n\n**refunds.data** - array of hashes: \nDetails about each object.\n\n**refunds.has_more** - Boolean:\nTrue if this list has another page of items after this one that can be fetched.\n\n**refunds.url**  - String: \nThe URL where this list can be accessed.",
    "13-0": "dispute",
    "13-1": "hash",
    "13-2": "A Dispute Object associated with this charge."
  },
  "cols": 3,
  "rows": 17
}
[/block]