Orders

Undo a purchase

POST
/api/orders/{orderId}/undo

The Undo button. Must be signed by the mandate's shopper key over undo-request-v1:<orderId>:<sha256 hex of reason>:<sha256 hex of photo bytes, or ->:<requestedAt>. requestedAt must be within 15 minutes of now. Runs the fault check, then routes the money: a void inside the window, or a refund, merchant claim, return or human review after capture. Rate limited per visitor.

Path Parameters

orderId*string

Undo order id.

Formatuuid

Request Body

application/json

Why the shopper is undoing, an optional photo, and their signature.

An Undo, signed by the shopper's device key.

reason*string

What went wrong, in the shopper's words.

Length3 <= length <= 500
photo?string

Optional photo of what arrived, as a base64 JPEG, PNG or WebP data URL (max 4 MB).

Match^data:image/(jpeg|png|webp);base64,[A-Za-z0-9+/=]+$
requestedAt*string

When the shopper pressed Undo. Must be within 15 minutes of the server's clock.

Formatdate-time
signature*string

Base64 Ed25519 signature of the undo signing message.

Length80 <= length <= 100

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/orders/edd288bc-42d0-41d3-9b87-14915f3ff2c6/undo" \  -H "Content-Type: application/json" \  -d '{    "reason": "This isn\'t what I asked for.",    "requestedAt": "2026-10-20T16:30:00.000Z",    "signature": "derQBgmEoL8kvl3vfHVsmqTVAkGTSvb2ShqDoVFKdSC5U5PpGkYAUsDzgSd80QyEpGEPh4966mrEQ9CzBw0IDA=="  }'
{  "orderId": "edd288bc-42d0-41d3-9b87-14915f3ff2c6",  "decision": {    "verdict": "AGENT_FAULT",    "evidence": [      {        "source": "shopper",        "finding": "This isn't what I asked for."      },      {        "source": "mandate_check",        "finding": "attribute:size: mandate required 10, agent bought 10.5"      }    ],    "liability": "agent_operator",    "confidence": 1  },  "outcome": {    "action": {      "type": "REFUND_FULL",      "reason": "agent broke the mandate: full refund, liability on the agent operator"    },    "status": "REFUNDED",    "paypal": {}  }}