Controlled Test Website

riskapi test surface

This site tests one boundary: free API calls should work without Stripe, while paid API calls should only work after a sandbox purchase has provisioned an API key.

The website is static. The live backend is controlled separately, and some routes stay IP-restricted during testing.

Free checks

These are the baseline checks. If they work from an approved operator IP and fail from elsewhere, the access boundary is behaving as intended.

Free

Ping

Basic no-charge liveness check.

GET https://alpha-swan.duckdns.org/v1/free/ping
Free

Current UTC Time

Return current UTC time and a Unix epoch value.

GET https://alpha-swan.duckdns.org/v1/free/time/utc

Paid checks

These exist only to validate key provisioning. They stay simple so billing behavior remains the thing under test.

Text Cleanup

Normalize whitespace and trim edges in a string.

POST https://alpha-swan.duckdns.org/v1/tools/text/cleanup

Time Shift

Move a timestamp by a chosen number of minutes.

POST https://alpha-swan.duckdns.org/v1/tools/time/shift

Quickstart

Start with the free routes. Use the paid routes only when you want to verify the Stripe sandbox purchase and key-provisioning path.

curl https://alpha-swan.duckdns.org/v1/free/ping

curl https://alpha-swan.duckdns.org/v1/free/time/utc

curl -X POST https://alpha-swan.duckdns.org/v1/tools/text/cleanup \
  -H "Content-Type: application/json" \
  -H "X-API-Key: rk_live_your_key_here" \
  -d '{"text":"   keep   this tidy   "}'

The full machine-readable contract is available in the OpenAPI reference linked above.

Test paid flow

Use this only for Stripe sandbox testing. It creates a Checkout Session for the test product and returns you here with a provisioned API key if payment succeeds.

This page uses Stripe sandbox only. No real payment should occur here.