Skip to content

🐛 server: fix forwarded card webhook status - #1186

Open
nfmelendez wants to merge 1 commit into
mainfrom
card-locked
Open

🐛 server: fix forwarded card webhook status#1186
nfmelendez wants to merge 1 commit into
mainfrom
card-locked

Conversation

@nfmelendez

@nfmelendez nfmelendez commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes

    • Fixed forwarded card webhooks to report the locked status as LOCKED.
    • Updated card status validation and payloads for locked and canceled cards.
  • Documentation

    • Updated the Card updated webhook documentation to list LOCKED instead of FROZEN.
  • Tests

    • Added coverage for locked-card webhook forwarding and strengthened payload validation.

@nfmelendez
nfmelendez requested a review from cruzdanilo as a code owner July 30, 2026 18:30
@changeset-bot

changeset-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 00b068e

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 Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Card webhook forwarding and validation now use LOCKED instead of FROZEN for locked cards. Documentation, forwarding assertions, locked-card fixtures, and the server patch changeset were updated accordingly.

Changes

Card webhook status alignment

Layer / File(s) Summary
Card status contract and forwarding
server/hooks/panda.ts, docs/src/content/docs/webhooks.md
Card payload mapping, webhook validation, and documented status values use LOCKED for locked cards.
Forwarding tests and release metadata
server/test/hooks/panda.test.ts, .changeset/brave-otters-listen.md
Forwarding tests assert complete payloads, cover locked-card forwarding, add its fixture, and record a patch release.

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

Suggested reviewers: cruzdanilo

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: fixing the forwarded card webhook status handling in the server.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Fix failing CI checks
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch card-locked
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch card-locked

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: 4fab94aa-fc90-4eea-9138-459c7f98473a

📥 Commits

Reviewing files that changed from the base of the PR and between 6606e65 and 00b068e.

📒 Files selected for processing (4)
  • .changeset/brave-otters-listen.md
  • docs/src/content/docs/webhooks.md
  • server/hooks/panda.ts
  • server/test/hooks/panda.test.ts

| body.limit.amount | number | spending limit amount | 1000000 |
| body.limit.frequency | "per24HourPeriod" \| "per7DayPeriod" \| "per30DayPeriod" \| "perYearPeriod" | frequency of the spending limit | per7DayPeriod |
| body.status | "ACTIVE" \| "FROZEN" \| "DELETED" \| "INACTIVE" | current status of the card | ACTIVE |
| body.status | "ACTIVE" \| "LOCKED" \| "DELETED" \| "INACTIVE" | current status of the card | ACTIVE |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Document the trigger for LOCKED card updates.

The enum now includes LOCKED, and the forwarding tests cover locked-card updates, but the description at Line 644 still says this webhook is triggered only when a card is added to a digital wallet. Update it to describe when locked-card events can arrive.

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