Buscar Pagamento por ID
curl --request GET \
--url https://api.billing.upag.io/v1/payments/{paymentId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.billing.upag.io/v1/payments/{paymentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.billing.upag.io/v1/payments/{paymentId}';
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));Pagamentos
Buscar Pagamento por ID
Retorna os detalhes de um pagamento específico
GET
https://api.billing.upag.io
/
v1
/
payments
/
{paymentId}
Buscar Pagamento por ID
curl --request GET \
--url https://api.billing.upag.io/v1/payments/{paymentId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.billing.upag.io/v1/payments/{paymentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.billing.upag.io/v1/payments/{paymentId}';
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 pagamento específico pelo seu ID.
Endpoint
curl https://api.billing.upag.io/v1/payments/pay_xyz789abc \
-H "Authorization: Bearer {token}"
import { Upag } from 'upag';
const upag = new Upag('sk_test_your_api_key');
const payment = await upag.payments.retrieve('pay_xyz789abc');
Parâmetros
string
required
ID único do pagamento, começando com
pay_.Resposta
Response
{
"id": "pay_xyz789abc",
"livemode": false,
"customer": {
"id": "cus_ahwDXrgYvur89iPs",
"name": "John Doe",
"email": "john.doe@example.com"
},
"paymentMethod": {
"id": "pm_abc123xyz",
"type": "credit_card",
"lastDigits": "1111",
"brand": "visa"
},
"amount": 10000,
"gross": 10000,
"mdr": 0,
"net": 10000,
"interest": 0,
"currency": "BRL",
"status": "paid",
"pixQrCode": null,
"refuseReason": null,
"installments": 1,
"createdAt": 1731622178441,
"updatedAt": 1731622178441,
"dueAt": null
}