{"uid":"cap_6sso47Gi2A6n_SJ4GL-P4","slug":"delx-commerce-await-async-promise-creation-1b8eee48","name":"Delx Commerce Await — Async Promise Creation","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/await?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"ttl_ms":{"type":"integer","default":86400000,"maximum":604800000,"minimum":1},"delivery":{"type":"object","required":["mode"],"properties":{"url":{"type":"string","format":"uri","description":"HTTPS endpoint; required for webhook delivery."},"mode":{"enum":["claim","webhook"],"type":"string"}},"additionalProperties":false},"condition":{"type":"object","oneOf":[{"required":["kind","at"],"properties":{"at":{"type":"string","format":"date-time"},"kind":{"type":"string","const":"time"}},"additionalProperties":false},{"required":["kind","event_type"],"properties":{"kind":{"type":"string","const":"webhook"},"event_type":{"type":"string","maxLength":128,"minLength":1}},"additionalProperties":false}],"description":"A future timestamp or an inbound event type. External HTTP polling is intentionally disabled."},"idempotency_key":{"type":"string","maxLength":256,"minLength":1,"description":"Stable client key. Replaying the same paid request returns the same promise and capability."},"resume_envelope":{"type":"string","maxLength":32768,"minLength":1,"description":"Opaque client-owned continuation ciphertext. Delx stores and releases it only after capability authorization."}}},"responseSchema":{"type":"json","example":{"state":"waiting","schema":"delx/await/v1","receipt":{"schema":"delx/await-receipt/v1","algorithm":"Ed25519"},"delivery":{"mode":"claim","state":"claim_only","attempts":0,"event_id":null},"condition":{"kind":"webhook","event_type":"build.completed"},"capability":"opaque-capability-returned-on-create","created_at":"2026-08-04T16:00:00Z","expires_at":"2026-08-04T17:00:00Z","promise_id":"123e4567-e89b-12d3-a456-426614174000","resume_envelope_sha256":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_pp0tkYsgne-ob3sPv4_Gm","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Creates a pay-per-result asynchronous promise that waits for a scheduled time or inbound webhook event, then delivers a stored continuation envelope via claim or webhook","exampleAgentPrompt":"Wait for a webhook event called 'build.completed' for up to 1 hour, then deliver the result to https://myapp.example.com/resume using webhook mode — store this continuation payload so it's only released once the condition is met.","exampleUseCases":[{"title":"CI pipeline agent resumption","prompt":"Pause my deployment agent until a 'pipeline.succeeded' webhook event comes in — store the continuation so it resumes automatically, and expire the promise after 4 hours if nothing fires."},{"title":"Scheduled agent wakeup at midnight","prompt":"Put my report-generation agent to sleep until tomorrow at midnight UTC, then deliver its stored continuation via webhook to https://agents.myco.com/wake so it picks up right where it left off."},{"title":"Idempotent event-driven task unlock","prompt":"Register a promise that waits for an 'order.fulfilled' event and releases the checkout continuation to my claim endpoint — use idempotency key 'order-8821' so if I replay this request I get the same promise back."}],"resultDescription":"Returns a promise object containing a unique promise_id, an opaque capability token, the condition and delivery configuration, timestamps for creation and expiry, the delivery state (claim_only or webhook), and a SHA-256 hash of the stored resume envelope. The receipt includes an Ed25519 signature for verifiable delivery.","failureModes":["Invalid condition schema (missing required 'at' or 'event_type' field) returns a 400 validation error","TTL exceeding 604800000ms (7 days) is rejected","Malformed resume_envelope exceeding 32768 characters is rejected","Duplicate idempotency_key with a different payload may return conflict or the original promise","Webhook delivery URL missing or not HTTPS when mode is 'webhook' causes rejection","Payment not received or insufficient USDC causes 402 response blocking promise creation"],"whenToPreferThis":"Choose this endpoint when an AI agent needs to park execution and resume only after a future event or scheduled time — especially when you need cryptographic proof of delivery, idempotent replay safety, and a pay-per-result model without account signup. Prefer this over polling or sleep-loop patterns when the trigger is an external webhook event or a precise timestamp, and you need the continuation payload stored securely off-agent until authorization.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:34.108Z","isFirstParty":false,"canonicalSlug":"delx-commerce-await-async-promise-creation-1b8eee48"}