Charges#

Charges represent actual money movements created by PaymentIntents. A PaymentIntent may create multiple charges if the first attempt fails and is retried.

The Charge object#

AttributeTypeDescription
idstringUnique identifier with ch_ prefix
objectstringAlways "charge"
amountintegerAmount charged in smallest currency unit
currencystringISO 4217 currency code
statusenumsucceeded, pending, failed
customerstringCustomer ID
payment_intentstringAssociated PaymentIntent ID
payment_methodstringPayment Method used
descriptionstringCharge description
refundedbooleanWhether fully refunded
amount_refundedintegerAmount refunded
failure_codestringError code if failed
failure_messagestringHuman-readable failure message
receipt_urlstringURL of the charge receipt
metadatahashKey-value pairs
createdtimestampTime at which the object was created
{
  "id": "ch_abc123",
  "object": "charge",
  "amount": 120000,
  "currency": "eur",
  "status": "succeeded",
  "customer": "cus_123456789",
  "payment_intent": "pi_1a2b3c4d",
  "payment_method": "pm_card_visa",
  "description": "Rent payment — February 2025",
  "refunded": false,
  "amount_refunded": 0,
  "receipt_url": "https://pay.casapay.com/receipts/ch_abc123",
  "created": 1706140800
}

Retrieve a Charge#

GET /v1/charges/:id

curl https://api.casapay.com/v1/charges/ch_abc123 \
  -H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc"

List Charges#

GET /v1/charges

ParameterTypeDescription
customerstringFilter by customer
payment_intentstringFilter by PaymentIntent
created[gte]timestampCreated on or after
limitintegerNumber of objects (1–100)
curl "https://api.casapay.com/v1/charges?payment_intent=pi_1a2b3c4d" \
  -H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc"