Listar Clientes
curl --request GET \
--url https://api.billing.upag.io/v1/customers \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.billing.upag.io/v1/customers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.billing.upag.io/v1/customers';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));Clientes
Listar Clientes
Retorna uma lista de todos os clientes cadastrados
GET
https://api.billing.upag.io
/
v1
/
customers
Listar Clientes
curl --request GET \
--url https://api.billing.upag.io/v1/customers \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.billing.upag.io/v1/customers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.billing.upag.io/v1/customers';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));Retorna uma lista paginada de todos os clientes cadastrados na sua conta.
Endpoint
curl -G https://api.billing.upag.io/v1/customers \
-H "Authorization: Bearer {token}" \
-d page=1 \
-d limit=10
import { Upag } from 'upag';
const upag = new Upag('sk_test_your_api_key');
const customers = await upag.customers.list({
limit: 10,
offset: 0
});
Parâmetros
integer
Limita o número de clientes retornados. Padrão:
10, máximo: 100.integer
Número da página a ser retornada. Padrão:
1.Resposta
Response
{
"data": [
{
"id": "cus_ahwDXrgYvur89iPs",
"livemode": false,
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+5511999999999",
"taxId": "12345678900",
"line1": "Rua Example, 123",
"line2": "Apto 45",
"city": "São Paulo",
"state": "SP",
"country": "BR",
"zipCode": "01234567",
"createdAt": 1731622178441,
"updatedAt": 1731622178441
}
],
"total": 1
}