Links de pagamento
Arquive um link
Retire um link de circulação.
cURL
curl --fail-with-body --request DELETE \
'https://api.sinnu.com.br/api/payment-links/ID_DO_RECURSO' \
--header "Authorization: Bearer $SINNU_API_KEY"const apiKey = process.env.SINNU_API_KEY;
if (!apiKey) throw new Error("Configure SINNU_API_KEY no servidor.");
const response = await fetch("https://api.sinnu.com.br/api/payment-links/ID_DO_RECURSO", {
method: "DELETE",
headers: {
Authorization: `Bearer ${apiKey}`,
},
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(response.status === 204 ? null : await response.json());{
"outcome": "archived",
"status": "<string>",
"archivedPrices": 123,
"activeSubscriptions": 123,
"message": "<string>"
}Arquivar o link não estorna transações anteriores. O método
sinnu.links.archive(id) não retorna um objeto.Autorizações
Resposta
Desfecho de DELETE /api/payment-links/{id} - o que aconteceu, em pt-BR.
O endpoint deixou de ser um DELETE puro (decisão do dono, 10/09/2026): link
com venda ou plano de assinatura é arquivado, e as assinaturas vivas seguem
sendo cobradas. Só um link sem histórico nenhum é realmente apagado. Como as
duas coisas atendem o mesmo clique, a resposta precisa dizer QUAL delas
aconteceu - daí o corpo, no lugar do 204 vazio.
message já vem pronta para a tela: painel e app mostram a MESMA frase, com o
número real de assinaturas ativas. Nenhum dos dois monta texto por conta.
⌘I
cURL
curl --fail-with-body --request DELETE \
'https://api.sinnu.com.br/api/payment-links/ID_DO_RECURSO' \
--header "Authorization: Bearer $SINNU_API_KEY"const apiKey = process.env.SINNU_API_KEY;
if (!apiKey) throw new Error("Configure SINNU_API_KEY no servidor.");
const response = await fetch("https://api.sinnu.com.br/api/payment-links/ID_DO_RECURSO", {
method: "DELETE",
headers: {
Authorization: `Bearer ${apiKey}`,
},
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(response.status === 204 ? null : await response.json());{
"outcome": "archived",
"status": "<string>",
"archivedPrices": 123,
"activeSubscriptions": 123,
"message": "<string>"
}