Buscar Sessão de Checkout por ID
curl --request GET \
--url https://api.billing.upag.io/v1/checkout-sessions/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.billing.upag.io/v1/checkout-sessions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.billing.upag.io/v1/checkout-sessions/{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));Sessões de Checkout
Buscar Sessão de Checkout por ID
Retorna os detalhes de uma sessão de checkout específica
GET
https://api.billing.upag.io
/
v1
/
checkout-sessions
/
{id}
Buscar Sessão de Checkout por ID
curl --request GET \
--url https://api.billing.upag.io/v1/checkout-sessions/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.billing.upag.io/v1/checkout-sessions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.billing.upag.io/v1/checkout-sessions/{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 uma sessão de checkout específica pelo seu ID.
Endpoint
cURL
curl https://api.billing.upag.io/v1/checkout-sessions/cs_abc123xyz \
-H "Authorization: Bearer {token}"
Parâmetros
string
required
ID único da sessão de checkout, começando com
cs_.Resposta
Response
{
"id": "cs_abc123xyz",
"status": "open",
"customerId": "cus_ahwDXrgYvur89iPs",
"url": "https://checkout.upag.io/cs_abc123xyz",
"billingAddressCollection": false,
"successUrl": "https://example.com/success",
"cancelUrl": "https://example.com/cancel",
"latitude": null,
"longitude": null,
"country": null,
"region": null,
"city": null,
"expiresAt": "2024-11-16T10:00:00.000Z",
"createdAt": "2024-11-15T10:00:00.000Z",
"updatedAt": "2024-11-15T10:00:00.000Z",
"items": [
{
"id": "csi_abc123xyz",
"priceId": "price_def456ghi",
"quantity": 1,
"price": {
"id": "price_def456ghi",
"name": "Plano Pro Mensal",
"billingType": "recurring",
"interval": "month",
"intervalCount": 1,
"currency": "BRL",
"amount": 9900,
"product": {
"id": "prod_xyz789abc",
"name": "Plano Pro",
"description": null,
"image": null
}
}
}
]
}