Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Cria um novo endpoint de webhook
CHARGEFY_ACCESS_TOKEN
Authorization
url
string
events
array
subscription.created
subscription.canceled
secret
organizationId
id
status
active
disabled
createdAt
datetime
curl -X POST "https://api.chargefy.io/api/v1/webhook-endpoints/" \ -H "Authorization: Bearer $CHARGEFY_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "url": "https://meusite.com.br/webhooks/chargefy", "events": ["subscription.created", "subscription.canceled", "checkout.updated"], "organizationId": "org_abc" }'
import { Chargefy } from '@chargefy/sdk'; const chargefy = new Chargefy({ accessToken: process.env.CHARGEFY_ACCESS_TOKEN, }); const endpoint = await chargefy.webhookEndpoints.create({ url: 'https://meusite.com.br/webhooks/chargefy', events: ['subscription.created', 'subscription.canceled', 'checkout.updated'], organizationId: 'org_abc', });
{ "id": "we_abc123", "url": "https://meusite.com.br/webhooks/chargefy", "events": ["subscription.created", "subscription.canceled", "checkout.updated"], "secret": "whsec_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "status": "active", "organizationId": "org_abc", "createdAt": "2026-03-12T10:00:00Z" }