Skip to content

PayPal sandbox only. No real money moves.

ProveProof

Gate G1: partial capture and remainder

Authorize 500.00, capture 350.00 with final_capture, then look at the 150.00 remainder. Method, evidence and limits.

Passa real sandbox run passed

Verified againstGate G1: PASS. Read from docs/GATES.md when the site is built.

Page last changed 7 Nov 2026 (from the git history)

G1 PASS

Question

After authorizing 500.00 and capturing 350.00 with final_capture=true, is the 150.00 remainder released, or still active? GAVEL charges only the winning price, so this decides whether the saga must void the remainder itself.

Method

  • Workflow: gate-g1, by hand, main only. A headless browser signs in as the sandbox buyer to approve the order.
  • Script: gates/g1.ts in packages/payments (package script gate:g1).
  • Steps: create order (AUTHORIZE 500.00), buyer approval, authorize, capture 350.00 with final_capture, read the authorization and the order, then try an explicit void of the remainder.
  • Two buyers, two runs: a wallet buyer (4 Nov) and a second buyer funded by a card (5 Nov, run G1-20261105T123116Z). Both orders use payment_source.paypal, so both are PayPal-account orders. The second buyer is a personal sandbox account, not a guest card checkout.

Observed

StepResult
capture 350.00 with final_captureHTTP 201 COMPLETED
authorization and order afterwardsauthorization CAPTURED, order COMPLETED
explicit void of the remainderHTTP 422 PREVIOUSLY_CAPTURED
decisionA

Decision A means the saga treats a void refused with PREVIOUSLY_CAPTURED on the winner's remainder as already released (packages/payments/src/errorMap.ts and saga/remainder.ts).

Evidence

  • G1-20261104T231047Z.jsonl, sha256 8ac39be0...22bb8.
  • G1-20261105T123116Z.jsonl, sha256 2c8ff2e1...4cb.
  • A test, test/gates/gatesResultEvidence.test.ts, fails when an evidence file no longer matches its recorded sha256, and when a gate flag leaves its safe value without a closed section.
  • The nightly sandbox job adds R1, R5 to R8 and R10 on the same gate; see the nightly record.

Limits

  • PayPal-account buyers only. Capture of a guest card order was never run on the sandbox.
  • It does not measure latency or webhooks.
Edit on GitHub

Last updated on