Shopping
Shop inside a mandate
Undo's agent searches, checks the cart against the signed limits, and opens a PayPal checkout in AUTHORIZE
mode. Without a saved wallet the shopper approves at approveUrl; with one (and only if the mandate allows it)
the money is held straight away. One live purchase per mandate. Rate limited per visitor.
Path Parameters
mandateId*string
Mandate id.
Format
uuidRequest Body
application/json
Optional demo settings. Send {} for a normal run.
Options for a shopping run. Send an empty object for a normal run.
simulate?"unguarded_wrong_variant"
Demo agents that misbehave on purpose.
Value in
- "unguarded_wrong_variant"
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/mandates/2f4069f0-2367-4f08-acc6-d9cf1cf6669a/shop" \ -H "Content-Type: application/json" \ -d '{}'{ "orderId": "edd288bc-42d0-41d3-9b87-14915f3ff2c6", "approveUrl": "https://www.sandbox.paypal.com/checkoutnow?token=1X507517Y8961004F", "status": "CHECKOUT_CREATED", "windowEndsAt": null, "paidWith": "approval", "cart": { "title": "UA Infinite Pro Men's Running Shoes", "brand": "Under Armour", "variant": { "Size": "10.5", "Color": "Black" }, "price": 116.97, "currency": "USD", "quantity": 1, "retailer": "underarmour.com", "imageUrl": "https://cdn.trychannel3.com/aed9ec20-0e99-49b6-b011-2425732889be?aid=01M5BRG5D3YC8J46QPWBYB58RG&mid=oKaH" }, "agent": { "reasoning": "Picked UA Infinite Pro Men's Running Shoes in Black / 10.5 — looked like the best match.", "confidence": 0.9, "unverified": [], "guard": { "relaxed": [], "bypassed": true, "violations": [ { "rule": "attribute:size", "actual": "10.5", "expected": "10" } ] }, "considered": [ { "id": "w25336I", "ok": false, "price": 116.97, "title": "UA Infinite Pro Men's Running Shoes" } ] }, "undoWindow": { "minutes": 1080, "factors": [ { "factor": "order total $116.97", "minutes": 360 }, { "factor": "agent bypassed Undo's pre-purchase check", "minutes": 720 } ] }, "trust": { "score": 50, "tier": "neutral" }}