Charges
To charge a customer voucher, 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.
Charge object
id
string
Unique identifier for the object.
amount
integer
Amount intended to be collected by this charge. A positive integer in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency.
currency
string
Three-letter ISO currency code (ISO-4217). Must be a supported currency.
payer[firstname]
string
The customer’s firstname.
payer[lastname]
string
The customer’s lastname.
payer[email]
string
The customer’s email.
payer[phone]
string
The customer’s phone number.
payer[address_city]
string
The customer’s city.
payer[address_country]
string
The customer’s country (Two-letter ISO code representing the country).
payer[address_line1]
string
The customer’s address line1.
payer[address_line2]
string
The customer’s address line2.
payer[address_state]
string
The customer’s state.
payerer[address_zip]
string
The customer’s zip.
payer[ip]
string
The customer’s ip address.
payer[id]
string
The customer’s id in your website.
voucher
string
Voucher serial
created_at
int
Time at which the object was created. Measured in seconds since the Unix epoch.
status
enum
The status of the charge is either “succeeded”, “pending”, or “failed”.
metadata
hash
A set of key-value pairs that you can attach to a charge object. It can be useful for storing additional information about the charge in a structured format.
livemode
bool
indicator about if the object if for production or test.
Last updated