ProveProof
Gate G3: honor period and reauthorize
How long an authorization stays capturable, and whether reauthorize extends it. In progress, with a simulation beside it.
G3 IN PROGRESS
Question
How long does a PayPal stay capturable, and does reauthorize extend it? This decides how long an auction may run between a bid (a ) and the (the capture).
Status
Method
- Workflow:
gate-g3. A manual run onmainstarts the probe (day 0: a headless browser signs in as the sandbox buyer and approves four orders). It also runs on a schedule, every 6 hours, to pick the probe up again and do the checks at each checkpoint. The last run appends the entry todocs/GATES.md. - Scripts:
gates/g3.tsandgates/g3-timed.tsinpackages/payments. - Early reading:
gate-g3-earlyprobes two older G2 authorizations (a 1.00 partial capture and a once an authorization reaches its checkpoint age, 3.0 days for the wallet one and 3.5 for the card one). It never touches the G3 probe state. It is an extra early reading, not the full 5-day result. - Secrets by name:
PAYPAL_CLIENT_ID,PAYPAL_CLIENT_SECRET,SANDBOX_BUYER_EMAIL,SANDBOX_BUYER_PASSWORD.
Readings so far
| When | Reading | Where |
|---|---|---|
| 7 Nov 03:06 UTC, day 0 | An immediate reauthorize was refused with 422 UNPROCESSABLE_ENTITY REAUTHORIZATION_TOO_SOON, as expected. Three authorizations were approved, to be read at day 3.5, day 4 and day 5. | run 42332377547 |
| 8 Nov 17:36 UTC, early, older G2 wallet authorization at age 3.24 days | A partial capture of 1.00 was accepted (HTTP 201) and the authorization then read PARTIALLY_CAPTURED. The reauthorize call answered 422 UNPROCESSABLE_ENTITY with the issue PAYER_CANNOT_PAY. | run 42505780514 |
| 9 Nov 00:09 UTC, early, older G2 guest card authorization at age 3.5075 days | Still CREATED. A partial capture of 1.00 was accepted (HTTP 201) and the authorization then read PARTIALLY_CAPTURED. The reauthorize call answered 422 PAYER_CANNOT_PAY. No final_capture, no void. | run 42538613566 |
| About 12 Nov 06:17 UTC | Final reading on the day 3.5, 4 and 5 authorizations. | gate-g3 |
The 8 Nov reading was taken on an authorization that already had a partial capture, so it is an early data point, not the G3 result. The day 3.5, 4 and 5 authorizations have no capture on them, which makes them the clean reading.
What the nightly run said so far
The nightly spec R3 (reauthorize after a delay) answered HTTP 422 UNPROCESSABLE_ENTITY and reported inconclusive. Reauthorize is therefore unproven on that run. See the nightly record.
Simulated, not real
| Scenario | Title | Checks | Result |
|---|---|---|---|
| S1 | Hold at day 0, capture at day 1 | 6/6 | SIMULATED PASS |
| S2 | Auction closes at day 2.5, capture before the honor period ends | 6/6 | SIMULATED PASS |
| S3 | Capture at day 3.5, after the honor period, with reauthorization | 8/8 | SIMULATED PASS |
| S4 | Capture at day 5 after reauthorization at day 3 | 5/5 | SIMULATED PASS |
| S5 | Hold never reauthorized, capture at day 30 | 6/6 | SIMULATED PASS |
| S6 | Server crash and restart between hold and capture at day 2 | 10/10 | SIMULATED PASS |
| S7 | Webhook for an expired authorization arriving late | 5/5 | SIMULATED PASS |
| S8 | 30 simulated days, 100 bidders, random crashes | 7/7 | SIMULATED PASS |
Limits
- No result yet; nothing here may be quoted as a pass.
- It uses PayPal-account sandbox orders created by the probe, not a deployed auction.
- The expected failure modes it will confirm or correct are listed in the simulation file: whether a capture after 3 days still works, the exact error name, whether reauthorize inside the honor period is refused, whether it returns a new id, and whether PayPal sends a webhook on expiry.
What changes the decision
- A validity window shorter than the longest planned auction, or reauthorize that does not extend it: auctions are capped to the window and the demo stays short, or long auctions become no-go.
- A window that covers the planned auctions: go for card and wallet.
- Fallback in the meantime: keep auctions shorter than the validity window and reauthorize before the hammer. That is a plan, not a result.
- .github/workflows/gate-g3.ymlthe timed probe
- .github/workflows/gate-g3-early.ymlthe early reading
- packages/payments/gates/g3-timed.tscheckpoint logic
- docs/evidence/SIM/SIM-MULTIDAY.mdthe simulated 30 days
Edit on GitHub
Last updated on