Listar cobranças
curl --request GET \
--url https://onlyascent.pro/api/v1/charges \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://onlyascent.pro/api/v1/charges', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://onlyascent.pro/api/v1/charges"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"object": "list",
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount_cents": 123,
"fee_cents": 123,
"external_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"object": "charge",
"status": "pending",
"method": "<string>",
"description": "<string>",
"net_cents": 123,
"paid_at": "2023-11-07T05:31:56Z"
}
],
"has_more": true
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Cobranças
Listar cobranças
Consulte da mais recente à mais antiga. created_before aplica um limite exclusivo à data de criação. A lista contém resumos.
GET
/
charges
Listar cobranças
curl --request GET \
--url https://onlyascent.pro/api/v1/charges \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://onlyascent.pro/api/v1/charges', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://onlyascent.pro/api/v1/charges"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"object": "list",
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount_cents": 123,
"fee_cents": 123,
"external_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"object": "charge",
"status": "pending",
"method": "<string>",
"description": "<string>",
"net_cents": 123,
"paid_at": "2023-11-07T05:31:56Z"
}
],
"has_more": true
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}