Consultar cobrança
curl --request GET \
--url https://onlyascent.pro/api/v1/charges/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://onlyascent.pro/api/v1/charges/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://onlyascent.pro/api/v1/charges/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"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",
"checkout_url": "<string>",
"pix": {
"copy_paste": "<string>",
"qr_code": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Cobranças
Consultar cobrança
Recupere status, valores e dados de pagamento de uma cobrança.
GET
/
charges
/
{id}
Consultar cobrança
curl --request GET \
--url https://onlyascent.pro/api/v1/charges/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://onlyascent.pro/api/v1/charges/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://onlyascent.pro/api/v1/charges/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"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",
"checkout_url": "<string>",
"pix": {
"copy_paste": "<string>",
"qr_code": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Response
Consulta concluída.