Listar links de pagamento
curl --request GET \
--url https://api.upag.io/v1/payment-links \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.upag.io/v1/payment-links', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.upag.io/v1/payment-links';
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));Links de pagamento
Listar links de pagamento
Lista os links da conta, do mais novo para o mais antigo
GET
https://api.upag.io
/
v1
/
payment-links
Listar links de pagamento
curl --request GET \
--url https://api.upag.io/v1/payment-links \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.upag.io/v1/payment-links', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.upag.io/v1/payment-links';
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));Permissão:
payment_link.read (chave secreta).
Endpoint
curl -G https://api.upag.dev/v1/payment-links \
-H "Authorization: Bearer sk_test_your_api_key" \
-d "active=true" \
-d "page=1" \
-d "limit=15"
import { Upag } from 'upag';
const upag = new Upag('sk_test_your_api_key');
const { data, count } = await upag.paymentLinks.list({
active: true,
page: 1,
limit: 15,
});
Em produção use
https://api.upag.io/v1 com sk_live_....Parâmetros
integer
default:"1"
Página (mínimo 1).
integer
default:"15"
Itens por página (mínimo 1).
string
Filtra por nome.
boolean
true ou false.string (uuid)
Filtra links que vendem esse produto.
Resposta
200 OK
Response
{
"data": [
{
"id": "d4e5f6a7-b8c9-4d0e-9f1a-2b3c4d5e6f70",
"name": "Plano Pro com trial",
"description": null,
"checkoutLayout": null,
"active": true,
"amount": 4990,
"url": "https://checkout.upag.io/buy/Xk3mPq9RtVw2Zd7B",
"paymentMethods": ["pix", "card"],
"couponEnabled": false,
"billingAddressCollection": "auto",
"successUrl": null,
"cancelUrl": null,
"subscriptionData": {
"trial": null,
"trialSettings": { "endBehavior": { "missingPaymentMethod": "create_invoice" } }
},
"paymentMethodCollection": "always",
"items": [
{
"id": "e5f6a7b8-c9d0-4e1f-8a2b-3c4d5e6f7a81",
"product": "0b9c1f3e-6a4d-4c1e-9d55-3f1f6a7c2e10",
"price": "5f2d7a90-3b1c-4e8a-8f6d-1c9e4b7a2d33",
"quantity": 1,
"amount": 4990
}
],
"bumps": [],
"createdAt": "2026-03-18T11:20:00.000Z",
"updatedAt": "2026-03-18T11:20:00.000Z"
}
],
"count": 1
}