Cobranças
Obter uma cobrança
Retorna uma charge pelo ID.
curl -X GET "https://api.chargefy.io/v1/charges/ch_EpWdWJYgpa9Wo3Lp" \
-H "Authorization: Bearer {{API_KEY}}"
Retorna uma
charge acessível para a organização. Uma charge representa uma
tentativa de cobrar um payment_intent; ela nasce da confirmação do intent e
não é criada diretamente.
string
required
ID da charge (
ch_*).curl -X GET "https://api.chargefy.io/v1/charges/ch_EpWdWJYgpa9Wo3Lp" \
-H "Authorization: Bearer {{API_KEY}}"
200
{
"id": "ch_EpWdWJYgpa9Wo3Lp",
"object": "charge",
"amount": 9990,
"amount_captured": 9990,
"amount_refunded": 0,
"billing_details": {},
"captured": true,
"created_at": "2026-05-16T18:35:00Z",
"currency": "brl",
"customer": "cus_EJkL1xbU3Kzbwq5i",
"description": null,
"disputed": false,
"invoice": "inv_DxvFS96BwGTnT6bm",
"livemode": true,
"metadata": {},
"paid": true,
"payment_error": null,
"payment_intent": "pi_JTucwF8N1vyQRgdf",
"payment_method": "pm_4BVaHtKGuGE22Toz",
"payment_method_details": {
"card": {
"amount_authorized": 9990,
"authorization_code": "123456",
"brand": "visa",
"checks": {
"address_line1_check": "unchecked",
"address_postal_code_check": "unchecked",
"cvc_check": "pass"
},
"country": null,
"exp_month": 12,
"exp_year": 2030,
"funding": null,
"installments": 1,
"last4": "4242",
"network": null
},
"type": "credit_card"
},
"receipt_url": null,
"refunded": false,
"refunds": {
"object": "list",
"data": [],
"has_more": false,
"url": "/v1/refunds?charge=ch_EpWdWJYgpa9Wo3Lp"
},
"status": "succeeded",
"updated_at": "2026-05-16T18:35:00Z"
}
Erros comuns
401
{
"error": {
"code": "authentication_failed",
"message": "Invalid API key provided.",
"type": "authentication_error"
}
}
404
{
"error": {
"code": "resource_missing",
"message": "Charge not found.",
"param": "id",
"type": "invalid_request_error"
}
}
⌘I
curl -X GET "https://api.chargefy.io/v1/charges/ch_EpWdWJYgpa9Wo3Lp" \
-H "Authorization: Bearer {{API_KEY}}"

