The Charge object
A Charge represents a single direct debit collection against the bank account tied to an active Subscription, with its amount, currency, and status. It is created when you charge a Subscription, and its status changes as the collection is processed.
{
"id": "ch_m7N9rAWJS9dWDKEe",
"object": "charge",
"amount": 5000,
"business_profile": {
"category": "011210",
"name": "Merchant Name",
"tax_id": "777777777"
},
"created_at": "2021-11-11T02:29:16Z",
"currency": "CLP",
"failure_code": null,
"metadata": {},
"mode": "live",
"status": "pending"
}| Attribute | Type | Description |
|---|---|---|
id | string | Unique identifier for the Charge |
object | string | Identifier for the type of object. Its value for Charges will always correspond to charge |
amount | integer | Amount to be charged from the subscribed account, represented as an integer. This value must always be greater than 0. |
business_profile | hash | Optional object to identify multiple enrolled merchants for category-based pricing. |
created_at | string | Charge's creation date, using ISO 8601 |
currency | string | Currency ISO code. For now, we only support CLP |
failure_code | string | Short string with a brief explanation of the error. Its values can be insufficient_funds, subscription_inactive, charge_amount_limit_exceeded or other. It can be null |
metadata | hash | 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. |
mode | string | Indicates whether the Charge is in live mode or in test mode (for the sandbox) |
status | string | Charge status. Can be pending, in_progress, succeeded, failed. |
The Business Profile object (within the Charge object)
The business_profile field holds the enrolled merchant's information.
| Attribute | Type | Description |
|---|---|---|
category | string | Identifier of the category of the enrolled merchant. In Chile, it corresponds to a 6 character SII activity code. |
name | string | Enrolled merchant´s name. |
tax_id | string | Enrolled merchant's tax identifier. In Chile, it corresponds to a RUT. |