Atualize um link
Altere os campos de um link da empresa.
curl --fail-with-body --request PATCH \
'https://api.sinnu.com.br/api/payment-links/ID_DO_RECURSO' \
--header "Authorization: Bearer $SINNU_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"title": "Consultoria individual",
"amountCents": 12900
}'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: "PATCH",
headers: {
Authorization: `Bearer ${apiKey}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"title": "Consultoria individual",
"amountCents": 12900
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(response.status === 204 ? null : await response.json());{
"id": "00000000-0000-4000-8000-000000000003",
"slug": "Exemplo1",
"title": "Consultoria inicial",
"priceMode": "fixed",
"amountCents": 9900,
"methods": [
"pix",
"credit_card"
],
"maxInstallments": 1,
"description": "Sessão de consultoria",
"imageUrl": null,
"minAmountCents": null,
"maxAmountCents": null,
"maxPayments": null,
"interestMode": "absorb",
"status": "active",
"threeDsMode": "always",
"tags": [],
"redirectUrl": null,
"linkedCustomerId": null,
"companyId": null,
"companyName": "Empresa de exemplo",
"sellerEmail": "vendedor@example.com",
"createdAt": "2026-09-01T12:00:00.000Z",
"updatedAt": "2026-09-01T12:00:00.000Z"
}customer, linkedCustomer ou maxPayments. Os status do link são active, paused e archived.Autorizações
Corpo
Body para atualizar parcialmente um link de pagamento.
Para onde o checkout leva o comprador depois do pagamento confirmado (cartão aprovado ou Pix pago), com transactionId, reference e status=approved na query. Aceita https:// ou o esquema do seu app (meuapp://pedido). O retorno é liberado por empresa: confirme com a Sinnu se já está ativo para a sua. Confirme o pagamento pela API ou pelo webhook: os parâmetros da URL podem ser alterados pelo comprador.
200Resposta
Link de pagamento público da empresa autenticada. Use o slug para montar a URL do checkout hospedado.
Para onde o checkout leva o comprador depois do pagamento confirmado (cartão aprovado ou Pix pago), com transactionId, reference e status=approved na query. Aceita https:// ou o esquema do seu app (meuapp://pedido). O retorno é liberado por empresa: confirme com a Sinnu se já está ativo para a sua. Confirme o pagamento pela API ou pelo webhook: os parâmetros da URL podem ser alterados pelo comprador.
Assinaturas deste link que CONTINUAM sendo cobradas.
A cláusula é a de checkout.services.still_charging_filter - fonte
única, para esta contagem e a da mensagem de arquivamento nunca contarem
coisas diferentes.
Serve à tela de EDIÇÃO: o aviso de que mudar o preço não repreça quem já assinou existia, bem escrito, na tela de CRIAÇÃO - onde ainda não há assinante e a frase não significa nada. Com o número, ele passa a significar.
curl --fail-with-body --request PATCH \
'https://api.sinnu.com.br/api/payment-links/ID_DO_RECURSO' \
--header "Authorization: Bearer $SINNU_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"title": "Consultoria individual",
"amountCents": 12900
}'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: "PATCH",
headers: {
Authorization: `Bearer ${apiKey}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"title": "Consultoria individual",
"amountCents": 12900
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(response.status === 204 ? null : await response.json());{
"id": "00000000-0000-4000-8000-000000000003",
"slug": "Exemplo1",
"title": "Consultoria inicial",
"priceMode": "fixed",
"amountCents": 9900,
"methods": [
"pix",
"credit_card"
],
"maxInstallments": 1,
"description": "Sessão de consultoria",
"imageUrl": null,
"minAmountCents": null,
"maxAmountCents": null,
"maxPayments": null,
"interestMode": "absorb",
"status": "active",
"threeDsMode": "always",
"tags": [],
"redirectUrl": null,
"linkedCustomerId": null,
"companyId": null,
"companyName": "Empresa de exemplo",
"sellerEmail": "vendedor@example.com",
"createdAt": "2026-09-01T12:00:00.000Z",
"updatedAt": "2026-09-01T12:00:00.000Z"
}