Salar Saeedi

Product management · Analysis

Where an x402 payment ends and an API service begins

Separate the internet payment, the billable request and the usable result when designing a paid endpoint.

Salar Saeedi2 min read
Three-stage illustration — Where an x402 payment ends and an API service begins

A client pays for a file conversion and receives a timeout. The payment and API response traveled through different systems. The customer needs a way to learn whether the conversion exists before choosing what to do next.

Use the rail for the payment question

Coinbase’s x402 documentation describes a payment protocol for web requests and the facilitator’s role in verification and settlement. The product still needs to define the service being bought, its parameters, price and how a payer recognizes a completed request.

Source · Coinbase · x402 documentation

Give the work a durable identity

Keep a service request reference paired with payment evidence. Decide whether an existing result can be fetched again, what happens while the job is running and when a retry is chargeable. This is a service entitlement rule in addition to any payment-layer rules.

Make the receipt actionable

For example, a paid conversion receipt can include its accepted file fingerprint, current work status and retrieval link. The distinction is familiar in hosted checkout, where fulfillment is a separate step after payment evidence.

Source · Stripe · Fulfill orders

What to take away

Before shipping a paid API, rehearse a successful payment followed by an interrupted response. The payer should recover either the result or a useful status.

References

Related work in the portfolio