diff --git a/src/api/webhooks/trolley/handlers/recipient-verification.handler.ts b/src/api/webhooks/trolley/handlers/recipient-verification.handler.ts index 48742d1..b25a669 100644 --- a/src/api/webhooks/trolley/handlers/recipient-verification.handler.ts +++ b/src/api/webhooks/trolley/handlers/recipient-verification.handler.ts @@ -27,9 +27,14 @@ export class RecipientVerificationHandler { where: { trolley_id: payload.recipientId }, }); - if (payload.type !== RecipientVerificationType.individual) { + if ( + ![ + RecipientVerificationType.individual, + RecipientVerificationType.business, + ].includes(payload.type) + ) { this.logger.log( - `Handling only individual status updates, ignoring phone verification for recipient ${payload.recipientId}. Verification type: ${payload.type}.`, + `Handling only individual/business status updates, ignoring phone verification for recipient ${payload.recipientId}. Verification type: ${payload.type}.`, ); return; } diff --git a/src/api/webhooks/trolley/handlers/recipient-verification.types.ts b/src/api/webhooks/trolley/handlers/recipient-verification.types.ts index f53d21d..5060a0b 100644 --- a/src/api/webhooks/trolley/handlers/recipient-verification.types.ts +++ b/src/api/webhooks/trolley/handlers/recipient-verification.types.ts @@ -5,6 +5,7 @@ export enum RecipientVerificationWebhookEvent { export enum RecipientVerificationType { phone = 'phone', individual = 'individual', + business = 'business', } interface VerifiedIdentityData {