OpenPermit Docs
Guides

Verify Receipts and Subscribe to Webhooks

Connect payment evidence to operational systems.

Use receipts when a consumer needs to prove a payment, seller, resource, settlement, and delivery status.

const receipt = await openpermit.getReceipt('receipt_...');

Verify the audit hash locally:

import { verifyReceipt } from '@openpermit/sdk/primitives';

if (!verifyReceipt(receipt)) {
	throw new Error('receipt verification failed');
}

Create a webhook subscription for operational events:

await openpermit.createWebhookSubscription({
	url: 'https://example.com/openpermit/webhook',
	events: ['receipt.recorded', 'webhook.delivered'],
});

Webhook handlers should verify the source, store event IDs for idempotency, and avoid assuming delivery order.