reference
API reference
The public WebSoroban backend endpoints, request bodies, responses, and which ones sign with your wallet.
Every endpoint is under the base path /api and requires a Bearer token unless
marked otherwise. IDE operations (compile, deploy, invoke, test, wallet) run
against the Stellar testnet. Payments and PayLoop also run on mainnet
when you ask for it explicitly, as described in their sections.
Reading the badges
read-only never signs.
signed signs with your testnet wallet and pays a fee.
queued returns a jobId; poll the job for the result.
Compile#
POST /api/compile#
queuedQueue a build of a project to Wasm. Does not sign. Unlimited on every plan.
projectIdstringrequiredfilesobjectrequiredsuccessbooleantrue when the job is queued (HTTP 202).jobIdstringlogsarrayDeploy#
POST /api/deploy#
signed queuedQueue a deploy: upload the Wasm hash, then instantiate a contract id. The worker signs with your wallet. Counts one deploy against your quota.
projectIdstringrequiredwasmBase64stringrequiredsuccessbooleantrue when the job is queued (HTTP 202).jobIdstringlogsarrayThe network is fixed to testnet server-side. Two non-202 cases:
- Over the plan limit, HTTP
403with{ error, current, limit, upgradeRequired: true }. See Plans and limits. - Workspace needs a target, HTTP
400with{ code: "DEPLOY_TARGET_REQUIRED", choices }when the workspace has more than one deployable crate. See Troubleshooting.
Invoke#
GET /api/contracts/:contractId/spec#
read-onlyReturn the parsed function list used to render the typed Invoke form. Auth is optional.
successbooleantrue on success.contractIdstringfunctionsarrayname, inputs (name + type), and return type.Returns 404 if no spec is stored or recoverable from chain.
POST /api/contracts/:contractId/invoke#
read-only signedInvoke a function. Always simulates first. A read returns immediately; a write
submits a signed transaction only when execute is true.
functionNamestringrequiredargsobjectScVal.executebooleanfalse (default) simulates only. true signs and submits a state-changing call.clientRefstringsubmitted → pending → confirmed status.successbooleantrue on success, false with a humanized error on failure.readOnlybooleanstatusstringsimulated, submitted, success, or failed.returnValueanyresourceFeestringtxHashstringeventsarrayinvocationIdstringTest#
POST /api/test#
queuedQueue cargo test over the project. Does not sign and does not touch the network.
Unlimited on every plan.
projectIdstringrequiredfilesobjectrequiredsuccessbooleantrue when the job is queued (HTTP 202).jobIdstringlogsarrayPOST /api/contracts/:contractId/tests/run#
read-onlyReplay the requesting user's saved function tests by simulation and assert each expected return. Counts one function-test run against your quota when at least one test runs.
functionNamestringsuccessbooleantrue on completion.totalnumberpassednumberresultsarray{ testId, name, functionName, status, actual, expected, error }.Returns 403 with upgradeRequired: true when over the function-test limit. See
Plans and limits.
Payments#
GET /api/pay/resource/:slug and /api/pay/live/resource/:slug#
x402 paymentPublic hosted resource, on testnet and mainnet respectively. An unpaid request
returns HTTP 402, a PAYMENT-REQUIRED header, and a JSON summary containing
endpoint, price, asset, and network. Retry with a valid
PAYMENT-SIGNATURE to receive the configured JSON response and a
PAYMENT-RESPONSE settlement header. A slug requested on the wrong network
returns 404 with NETWORK_MISMATCH.
GET /api/pay/networks, /api/pay/wallets, /api/pay/trustline#
read-onlyPublic. networks lists which networks this server can settle on. wallets
lists auth-entry wallet compatibility. trustline?address=&network= reports
whether an account can hold USDC (ready, missing_account,
missing_trustline, not_authorized, not_applicable, or unknown) with a fix.
GET /api/pay/overview#
read-onlyReturn Payment Studio metrics, configured endpoints, recent events, settlement
success rates (metrics.settlement for 24h, 7d, and 30d), failure reasons with
fixes, webhooks with their last delivery, and agent wallets.
POST /api/pay/endpoints#
Create a hosted endpoint. The request accepts name, slug, price, payTo,
responseMessage, optional network (stellar:testnet by default, or
stellar:pubnet), and optional projectId. The payout address must be able to
receive USDC; otherwise the response is 400 PAYOUT_NOT_READY with the
trustline report. The response returns the endpoint key once; store it as a
server-side secret.
PATCH /api/pay/endpoints/:id#
Pause or resume an endpoint with { "active": boolean }.
POST /api/pay/endpoints/:id/rotate-key#
Invalidate the existing endpoint key and return its replacement once.
Webhooks#
POST /api/pay/webhooks registers a URL for payment.settled,
payment.failed, or wallet.spend_limit_exceeded and returns its signing
secret once. PATCH /api/pay/webhooks/:id pauses or resumes it,
POST /api/pay/webhooks/:id/test sends a signed webhook.test delivery,
GET /api/pay/webhooks/:id/deliveries lists recent attempts, and
DELETE /api/pay/webhooks/:id removes it.
/api/pay/facilitator/supported, /verify, and /settle#
Endpoint-key-authenticated proxy to the managed x402 facilitator. It accepts only payments to the endpoint's payout address, in USDC, on the endpoint's network, and allows 120 calls per endpoint per minute. Developer credentials are removed before the server adds its own facilitator credentials. See x402 payments for the complete flow.
PayLoop#
Every PayLoop route takes ?network=testnet (default) or ?network=mainnet.
A network without a deployed contract returns 404. All routes are public
except reconcile. See PayLoop subscriptions.
GET /api/payloop/config#
read-onlyReturn the network's contract id, USDC token, explorer base, and demo merchant,
plus networks (each network and whether it is deployed) and audited (whether
the mainnet deployment recorded an independent audit; null when not deployed).
GET /api/payloop/policies#
read-onlyList indexed policies, newest first, up to 100. Requires subscriber or
merchant; status filters by active, paused, revoked, or completed.
Amounts are strings in stroops, with amountUsdc, capUsdc, and spentUsdc
alongside.
GET /api/payloop/policies/:policyId#
read-onlyOne policy and its last 50 charges. Each charge has outcome (charged,
insufficient_balance, or insufficient_allowance), txHash, dueAt, and
delaySeconds.
GET /api/payloop/stats#
read-onlyPolicies by status, charge outcomes, and on-schedule metrics (share of recurring charges within a minute of their due time, p50 and p95 lateness).
Wallet#
POST /api/wallet/fund#
queuedTop up your testnet wallet from Friendbot if its balance is low. No body.
successbooleantrue on success.publicKeystringG…).fundedbooleanbalancestringGET /api/wallet/me#
read-onlyReturn the public details of your server-managed wallet. The secret key is never returned.
successbooleantrue on success.publicKeystringG…).fundedbooleanbalancestringUsage#
GET /api/usage#
read-onlyReturn your current usage and limits, plus recent activity. No body.
successbooleantrue on success.usageobjectdeployments and functionTests, each { count, limit, remaining, lastResetDate }. limit is -1 and remaining is "unlimited" on uncapped plans.statisticsobjectlogsarrayNext#
- Glossary, terms used across these docs.
- Plans and limits, what the quotas mean.
