Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/orb-sync-lib/src/orb-sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ export class OrbSync {
case 'customer.balance_transaction_created': {
const webhook = parsedData as CustomerWebhook;

this.config.logger?.info(`Received webhook ${webhook.id}: ${webhook.type} for customer ${webhook.customer.id}`);

// Orb ocassionally sends multiple credit notes with the same timestamp at roughly the same time - this leads to possibly persisting an old customer balance
// To prevent this, we will query the Orb customer via API to get the latest state
const customer = await this.orb.customers.fetch(webhook.customer.id);
Expand Down