Getting Started
Sandbox & Simulators
Every asynchronous settlement, KYB verification, maker-checker approval, x402 mandate check, and HMAC-SHA512 webhook delivery is deterministically testable without waiting on manual approvals or on-chain gas.
Environment Boundary
Sandbox keys (
fp_test_* and sk_test_*) strictly target simulated ledgers. Responses carry simulated: true. Live keys (sk_live_*) are refused with 403 wrong_environment.Simulator Endpoint Reference
| Method | Path | Description |
|---|---|---|
| POST | /api/sandbox/keys | Mint a 24-hour self-serve sandbox trial key (fp_test_*) and webhook signing secret (whsec_sbx_*). |
| POST | /api/sandbox/customers | Create a sandbox individual or business entity with synchronous sanctions/country screening. |
| POST | /api/sandbox/customers/{id}/simulate-kyb | Transition a pending entity to approved or rejected and emit an entity KYB URN event. |
| POST | /api/sandbox/quotes | Lock a 10-minute forward (sourceAmount) or reverse (destinationAmount) decimal-string quote. |
| POST | /api/sandbox/settlements | Create an idempotent settlement bound to an unexpired, unused quote and KYB-approved entity. |
| POST | /api/sandbox/settlements/{id}/simulate-deposit | Trigger deposit detection -> settled (or pending_approval when requireMakerChecker is true). |
| POST | /api/sandbox/settlements/{id}/simulate-approval | Simulate a maker-checker approver signing or rejecting a pending settlement. |
| POST | /api/sandbox/x402/simulate-settlement | Evaluate an HTTP 402 (x402) or MPP transaction against maxPolicyAmount and settle deterministically. |
| GET | /api/sandbox/events | Cursor-paginated PULL webhook event stream returning rawBody bytes and X-FurlPay-Signature. |
| POST | /api/sandbox/webhooks/test | Emit a sample event envelope showing exact headers and the versioned raw-body signature (v1 HMAC-SHA256, v2 HMAC-SHA512). |
Simulating Agent Spend Policies (x402 & MPP)
Test both successful policy execution (201 settled) and mandate ceiling blocks (403 ERR_POLICY_LIMIT_EXCEEDED):
bash
# Policy DENY example: amount exceeds maxPolicyAmount -> 403 ERR_POLICY_LIMIT_EXCEEDED
curl -sS -X POST https://furlpay.com/api/sandbox/x402/simulate-settlement \
-H "Authorization: Bearer $FP_KEY" \
-H "Content-Type: application/json" \
-d '{"resource":"/api/x402/market-data","amount":"12.50","maxPolicyAmount":"5.00","chain":"base","protocol":"x402"}'Testing Maker-Checker Holds
| Parameter | Type | Description |
|---|---|---|
| requireMakerCheckeroptional | boolean | Pass true to simulate-deposit to pause settlement in pending_approval until simulate-approval runs. |
| decisionoptional | "approve" | "reject" | Passed to simulate-approval to finalize settled receipt or record rejection. |
| Idempotency-Keyrequired | header (8-128 chars) | Required on settlement creation; mismatched payload returns 422 ERR_IDEMPOTENCY_CONFLICT. |
Prefer an interactive browser runner? Launch /developer to step through every simulator in one click.
Did this page help?
Edit this page on GitHub