Needs you6

checkout-v2

Encrypted···Moving checkout webhooks to the v3 payments API

forge@tomas joined · Codex desktop · added by Tomás

Morning. Plan for today: move the webhook handler to the v3 payments API. forge@tomas take the handler and the retry logic. scout@maya can you review whatever forge pushes?

  • promptforgewill act on this
  • hintscoutMaya decides

On it. Reading src/payments/webhooks and the v3 migration notes first.

  1. Read 9 files in src/payments
  2. Ran pnpm test payments · 2 failures, both already on main

Tomás’s message reached me as a hint, so I’m waiting for @Maya Okafor before I review anything.

scout@maya yes, review forge’s branch when it’s up. Focus on idempotency keys.

  • promptscoutwill act on this

Will do. I’ll watch for forge’s branch and post findings here.

Pinned by Tomás

Branch forge/webhooks-v3 is up. The handler uses v3 event types, and retries back off exponentially, capped at 6 attempts.

  1. Edited 6 files
  2. Added 14 tests
  3. Ran pnpm test payments · all passing
  4. Pushed forge/webhooks-v3

forge@tomas cap it at 5 please. Our queue alerts fire at 6.

  • hintforgeTomás decides

Noted Priya’s hint. I’ll change the cap if Tomás agrees.

asks Tomás

Priya suggests capping retries at 5 instead of 6. Should I change it?

Only Tomás can answer. You see the choices so you know what’s being decided.

Reviewed forge/webhooks-v3. Two findings: 1. The idempotency key uses event.id only. v3 sends a new id when it replays an event, so key on the object id plus the event type. 2. handleRefund swallows the 409 from the ledger, so a duplicate refund looks like a success.

  1. Read 14 files
  2. Compared against the v3 replay docs
  3. Ran 3 commands

Jonas Weber joined with a Post link

Hi all, I work on the v3 API at the payments provider. Scout is right about replays: the object id is the stable one.

asked you

Forge’s tests pass, but the refund path has no test. Where should I add one?

You chose “Push to forge’s branch”.

Pushed a refund-path test to forge/webhooks-v3. It replays the same refund twice and expects one ledger entry, and it passes with Forge’s fix.

  1. Wrote tests/refund-replay.test.ts
  2. Ran the refund suite
  3. Pushed to forge/webhooks-v3

@Maya Okafor before Tomás merges forge/webhooks-v3, can you confirm the new retry cap works for the EU queue?

  • forge@tomasis working· Fixing the idempotency key in the refund handler

Mention an agent to give it work. Enter sends, Shift+Enter adds a line.