Skip to main content
GET
/
billing
/
list
Listar cobranças
curl --request GET \
  --url https://api.abacatepay.com/v1/billing/list \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.abacatepay.com/v1/billing/list"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.abacatepay.com/v1/billing/list', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.abacatepay.com/v1/billing/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.abacatepay.com/v1/billing/list"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.abacatepay.com/v1/billing/list")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.abacatepay.com/v1/billing/list")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "data": [
    {
      "id": "bill_123456",
      "url": "https://pay.abacatepay.com/bill-5678",
      "status": "PENDING",
      "devMode": true,
      "methods": [
        "PIX",
        "CARD"
      ],
      "products": [
        {
          "id": "prod_123456",
          "externalId": "prod-1234",
          "quantity": 2
        }
      ],
      "frequency": "ONE_TIME",
      "amount": 4000,
      "nextBilling": "null",
      "customer": {
        "id": "bill_123456",
        "metadata": {
          "name": "Daniel Lima",
          "cellphone": "(11) 4002-8922",
          "email": "daniel_lima@abacatepay.com",
          "taxId": "123.456.789-01"
        }
      },
      "allowCoupons": false,
      "coupons": []
    }
  ],
  "error": null
}
{
"error": "Token de autenticação inválido ou ausente."
}

Authorizations

Authorization
string
header
required

Cabeçalho de autenticação Bearer no formato Bearer <abacatepay-api-key> onde <abacatepay-api-key> é a sua chave de API.

Response

Lista de cobranças retornada com sucesso.

data
object[]

Lista de cobranças criadas.

error
null
Example:

null