Skip to content

Retry delayed SPT retrieval in MPP pay - #369

Merged
raubrey-stripe merged 1 commit into
mainfrom
spt-retrieval-backoff
Sep 25, 2026
Merged

raubrey-stripe merged 1 commit into
mainfrom
spt-retrieval-backoff

Conversation

@staubman-stripe

@staubman-stripe staubman-stripe commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds defined schedule for retrying SPT retrieval, and extends it to the _next agent path

  • SPT retrieval schedule is now based on SPT_RETRIEVAL_DELAYS_MS
  • Previously it would only try 3 times at 1s delay, now it tries 8 times at 11 total seconds
  • Adds this retry logic to runMppPayWithSpendRequest as well, whereas previously it would only try once

Motivation

I observed that link cli mpp pay would often fail with "Failed to retrieve shared payment token".

image

I ran a few trials of time between the the spend request transitioning to approved and the SPT being available:

In 7 SPT issuance trials, every trial returned status: approved before shared_payment_token was present

  • Test mode: 2.263s, 10.877s, 8.579s, 9.905s
  • Live mode: 2.128s, 4.527s, 2.281s

This is also likely the cause of https://jira.corp.stripe.com/browse/MACHINE-101

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>

@raubrey-stripe raubrey-stripe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sickk nice work

@raubrey-stripe
raubrey-stripe merged commit a4497ca into main Sep 25, 2026
11 checks passed
@raubrey-stripe
raubrey-stripe deleted the spt-retrieval-backoff branch September 25, 2026 21:55
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.

2 participants