Commit 3322087
committed
fix(billing): admin sync reads period from items.data[0] (Stripe API ≥ 2025-08-27)
syncOrgFromStripe was reading current_period_start from the top-level
Stripe subscription object, which no longer exists on API version ≥ 2025-08-27.
The field moved to items.data[0].current_period_start. After an admin force-sync,
currentPeriodStart was written as null, silently dropping that subscription from
the weekly-reset sweep (findAllDueForResetByLastReset filters null out).
Mirror the dual-read fallback already used by the webhook handler:
items.data[0].current_period_start ?? current_period_start (top-level).
Fixes #3727.1 parent d42eb12 commit 3322087
2 files changed
Lines changed: 44 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
99 | 102 | | |
100 | 103 | | |
101 | 104 | | |
| |||
Lines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
242 | 281 | | |
243 | 282 | | |
244 | 283 | | |
| |||
0 commit comments