Failure injection

What if Razorpay creates the order, but Amana never receives the response?

Amana treats the outcome as unknown, reconciles provider state, and refuses to create a second order until truth is known.

An unknown create-order outcome must be reconciled before another provider order can be created.

Executed evidence trace

A side effect happened. The response did not.

Visualization of an executed deterministic Testcontainers proof case. No live provider call is performed.

  1. 01
    Authorization already valid

    Immutable proposal and bound approval enter the Execution Gate.

  2. 02
    Stable execution reserved

    One execution owns a stable idempotency identity and receipt.

  3. 03
    Provider create sent

    The inert provider receives exactly one create-order command.

  4. 04
    Response lost

    The provider creates the order, then a TIMEOUT hides the response.

  5. 05
    PAYMENT_UNCERTAIN

    The creation attempt is persisted as UNCERTAIN—never guessed failed or successful.

  6. 06
    Blind retry refused

    The uncertain attempt prevents another provider create call.

  7. 07
    Reconciliation

    Amana queries the inert provider by the stable execution receipt.

  8. 08
    Existing order found

    The original provider order is validated and bound to the execution.

  9. 09
    Execution converges

    Execution advances to PAYMENT_PENDING; payment truth remains uncertain.

  10. 10
    No duplicate provider order

    One reservation. One create call. One provider order.

Invariant heldNO DUPLICATE PROVIDER ORDER
Execution reservations
1
Provider create calls
1
Provider orders
1
Recovered by reconciliation
Yes
Duplicate orders
0

Measured fixture evidence

Production logic. Inert boundary. Exact result.

This is a replay of a generated artifact from the real execution and payment services running against PostgreSQL 17 with an in-process provider adapter.

Stable authority identity

Execution and receipt remain fixed

Execution ID
601b5215-fc49-4450-a710-ce16ab54b94f
Execution idempotency key
7ad1e3f410c0fd3e7d6930926f70a99b3f3d4cf14b882f04dddfd98e8f136e2e
Stable receipt
acg_601b5215fc494450a710ce16ab54b94f
Recovered provider order
order_601b5215fc49
Actual state transitions

Order recovery is not payment confirmation

ExecutionRESERVED
AttemptUNCERTAIN
Final executionPAYMENT_PENDING

Final payment state: PAYMENT_UNCERTAIN. Recovered order existence is not captured-payment evidence, so this proof does not claim PAYMENT_CONFIRMED.

Production guard

Uncertain means reconcile first

PaymentControlService.initiate persists the attempt. PaymentControlService.reconcile resolves the stable receipt, while PaymentRepository enforces one provider-order binding per execution.

  • ExecutionGate
  • PaymentControlService.initiate
  • PaymentControlService.reconcile
  • PaymentRepository
  • PaymentEvidenceReducer