Buscar Cliente por ID
curl --request GET \
--url https://api.billing.upag.io/v1/customers/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.billing.upag.io/v1/customers/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.billing.upag.io/v1/customers/{id}';
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
Buscar Cliente por ID
Retorna os detalhes de um cliente específico
GET
https://api.billing.upag.io
/
v1
/
customers
/
{id}
Buscar Cliente por ID
curl --request GET \
--url https://api.billing.upag.io/v1/customers/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.billing.upag.io/v1/customers/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.billing.upag.io/v1/customers/{id}';
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 as informações completas de um cliente específico pelo seu ID.
Endpoint
curl https://api.billing.upag.io/v1/customers/cus_ahwDXrgYvur89iPs \
-H "Authorization: Bearer {token}"
import { Upag } from 'upag';
const upag = new Upag('sk_test_your_api_key');
const customer = await upag.customers.retrieve('cus_ahwDXrgYvur89iPs');
Parâmetros
string
required
ID único do cliente, começando com
cus_.Resposta
Response
{
"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
}