Skip to content

Persist attempts, bound PSP timeouts and recover unknown outcomes #102

Todo

Description

@v-rudkovskiy

Background

Provider calls occur inside database transactions. A PSP can accept a request before the process crashes or the DB transaction rolls back, leaving an unknown outcome. Slow provider calls can also hold database connections for a long time.

Scope

Proposed scope: Persist a stable attempt ID before the PSP call; separate short DB transactions from network work; configure bounded HTTP connect/read timeouts for Stripe and PayPal (Stripe currently defaults to ~80s read timeout, PayPal has no explicit timeouts); define reconciliation and PSP idempotency.

Acceptance criteria

Crash/timeout after a PSP side effect, DB rollback and restart neither lose the attempt nor cause another charge; a slow PSP fails within the configured timeout without exhausting DB/HTTP pools.

Questions to resolve

Which attempt identifier survives restarts and is used for PSP idempotency? How are unknown results reconciled before any retry?

References

Proposed priority: High (subject to project triage).

Activity

  1. self-assigned this
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions