Webhooks
client.webhooks.create(params)
const webhook = await client.webhooks.create({
url: "https://yourapp.com/webhooks/astrapay",
events: ["payment.completed", "payment.canceled"],
});
// Store this securely — only returned once
console.log(webhook.secret); // "whsec_..."client.webhooks.list()
const webhooks = await client.webhooks.list();client.webhooks.get(id)
const webhook = await client.webhooks.get("c3d4e5f6-...");client.webhooks.update(id, params)
client.webhooks.delete(id)
Last updated