Skip to content

✨ server: add card provisioning webhook fields - #1270

Open
aguxez wants to merge 1 commit into
mainfrom
provisioning-webhook
Open

✨ server: add card provisioning webhook fields#1270
aguxez wants to merge 1 commit into
mainfrom
provisioning-webhook

Conversation

@aguxez

@aguxez aguxez commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Card update webhooks now include an optional status change reason for card replacements and digital wallet provisioning.
    • Supported status values include card_replaced and wallet_provisioned.
  • Bug Fixes

    • Improved webhook validation and handling for card status change details.
  • Documentation

    • Updated webhook documentation to describe card replacements, wallet additions, and the new status change field.

@changeset-bot

changeset-bot Bot commented Aug 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8646c54

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@exactly/server Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Card-updated webhook schemas now accept an optional statusChangeReason with values card_replaced or wallet_provisioned. Tests and documentation cover the field. A patch changeset records the server release.

Changes

Card webhook status reason

Layer / File(s) Summary
Webhook schema support
server/utils/panda.ts, server/workers/hook/worker.ts
The card-updated webhook schemas accept an optional top-level statusChangeReason with card_replaced or wallet_provisioned values.
Webhook validation and release
server/test/workers/hook.test.ts, server/test/hooks/panda.test.ts, .changeset/nine-hands-shave.md
Tests construct and preserve wallet_provisioned in card-updated webhook payloads. A patch changeset records the server release.
Webhook documentation
docs/src/content/docs/webhooks.md
The Card updated webhook documentation covers card replacement, wallet provisioning, and the statusChangeReason field.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: 🟡 Moderate · up to 24dee

The webhook contract currently exposes statusChangeReason instead of the required pushProvisioningToken, so consumers will not receive the provisioning token promised by this PR. The PR should not merge until the field name and related schemas, worker handling, tests, and documentation are corrected.

Suggested reviewers: cruzdanilo, nfmelendez

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR adds and documents a statusChangeReason field for card.updated webhooks, including wallet_provisioned, and adds validation and tests. The provided changes do not show a push provisioning … Add the push provisioning token field to the card.updated webhook payload, preserve it through the webhook worker, and add corresponding schema validation, documentation, and tests for issue #1233 [#1233].
✅ Passed checks (3 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed The schema, worker, tests, documentation, and patch changeset all relate to card provisioning fields in card.updated webhooks. No unrelated code changes are evident.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: adding card provisioning fields to server webhooks. It is concise and directly related to the schema, worker, tests, and documentation updates.
Full details: Linked Issues check

Explanation

The PR adds and documents a statusChangeReason field for card.updated webhooks, including wallet_provisioned, and adds validation and tests. The provided changes do not show a push provisioning token being added or preserved as required by issue #1233.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch provisioning-webhook
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch provisioning-webhook

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: dcfbbb4a-06f9-44c7-a100-7f42691dd5d7

📥 Commits

Reviewing files that changed from the base of the PR and between 8f8adc3 and 2152433.

📒 Files selected for processing (5)
  • .changeset/slimy-webs-rule.md
  • server/test/hooks/panda.test.ts
  • server/test/workers/hook.test.ts
  • server/utils/panda.ts
  • server/workers/hook/worker.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.

Comment thread server/utils/panda.ts Outdated
@aguxez
aguxez force-pushed the provisioning-webhook branch from 2152433 to 9997244 Compare August 31, 2026 16:17
@aguxez aguxez changed the title ✨ server: add push provisioning token webhook ✨ server: add card provisioning webhook fields Aug 31, 2026
@aguxez
aguxez force-pushed the provisioning-webhook branch from 9997244 to 248e047 Compare August 31, 2026 16:59

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3350f202-dd64-401e-b279-e65ae83da3ca

📥 Commits

Reviewing files that changed from the base of the PR and between 2152433 and 248e047.

📒 Files selected for processing (5)
  • .changeset/nine-hands-shave.md
  • server/test/hooks/panda.test.ts
  • server/test/workers/hook.test.ts
  • server/utils/panda.ts
  • server/workers/hook/worker.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.

Comment thread server/utils/panda.ts
@aguxez
aguxez marked this pull request as ready for review August 31, 2026 18:12

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 248e04784e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread server/test/workers/hook.test.ts
Comment thread server/workers/hook/worker.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Team

Run ID: 871b4fa7-e329-4087-aa77-c30e087fae1c

📥 Commits

Reviewing files that changed from the base of the PR and between 248e047 and 24deeb0.

📒 Files selected for processing (2)
  • .changeset/nine-hands-shave.md
  • docs/src/content/docs/webhooks.md

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.

Comment thread .changeset/nine-hands-shave.md Outdated
Comment thread docs/src/content/docs/webhooks.md Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dabc3963a8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/src/content/docs/webhooks.md Outdated
@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.05%. Comparing base (f76c1f1) to head (8646c54).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1270      +/-   ##
==========================================
+ Coverage   72.51%   73.05%   +0.53%     
==========================================
  Files         275      276       +1     
  Lines       13254    13259       +5     
  Branches     4610     4610              
==========================================
+ Hits         9611     9686      +75     
+ Misses       3306     3236      -70     
  Partials      337      337              
Flag Coverage Δ
e2e 73.05% <ø> (+0.53%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant