Payments API

Hosted checkout on the same pool.

The Payments API is for products that already have a payment experience. Your server creates a Payment, Hypertron hosts checkout, the customer pays, you get a stateful object and signed events. Checkout can spend into the shielded pool; the API does not replace the protocol.

Auth

Secret keys on the server. Never in the browser.

Bearer sk_test_ / sk_live_. Environment-scoped: a test key cannot read live payments. Keys are shown once. Store a hash, prefix, and last four.

HeaderRule
AuthorizationRequired. Bearer secret. Not query, not body.
Content-Typeapplication/json on requests with a body.
Idempotency-KeyRequired on POST /v1/payments. 1–255 chars, retained ≥ 24h.
X-Request-IdOptional tracing. Response always echoes a request id.

Amounts are decimal strings. Never floats. IDs are opaque prefixes (pay_, evt_). Dashboard session routes under /api/* are a different control plane — they are not this API.

Quickstart

Create your first checkout.

Use a test key while you build. Retries with the same idempotency key cannot produce a second payment.

  1. 1.Create a test key

    Developer console → sk_test_ key. Copy it once.

  2. 2.Create a payment

    amount, currency, optional customer and metadata.

  3. 3.Track the result

    Poll the payment or subscribe to events.

POST /v1/payments
curl -X POST "$HYPERTRON_API/v1/payments" \
  -H "Authorization: Bearer $HYPERTRON_SECRET_KEY" \
  -H "Idempotency-Key: order_1234" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": "125.00",
    "currency": "USDC",
    "description": "Order #1234",
    "customer_email": "customer@example.com",
    "metadata": { "order_id": "ord_1234" }
  }'

Keep secret keys on your server. Never expose sk_test_ or sk_live_ in browser code. Supported currencies: USDC, EURC, XLM.

Canonical resource

Payment is the object. Checkout is a URL.

v1 does not expose PaymentLink as the developer abstraction. Links remain an internal checkout mechanism.

  1. 01Create

    POST /v1/payments with an idempotency key. Response includes checkout_url.

  2. 02Pay

    Customer opens hosted checkout and pays from a Stellar wallet — privately if they hold covering notes.

  3. 03Confirm

    Hypertron observes the chain (or pool events) and advances the payment object.

  4. 04Operate

    Poll GET /v1/payments/:id or handle signed webhooks. Cancel while still open.

Events

Signed delivery, not a polling substitute you ignore.

Register endpoints in the developer console. Signing secrets are shown once. Verify HMAC before acting. Test delivery does not create a real PaymentEvent.

EventWhen
payment.createdPayment object accepted.
payment.pendingCustomer action in flight.
payment.confirmedChain observation passed initial checks.
payment.completedTerminal success.
payment.failedTerminal failure.
payment.expiredWindow elapsed unpaid.
payment.canceledMerchant canceled an open payment.

Environments

Test first. Move live deliberately.

A key only accesses data created in its own environment. Testnet checkout still hits the live testnet pool (CB2SVTMG…) when privacy is on — see the protocol page for that trust model.

sk_test_Stellar testnet. Build and validate.
sk_live_Stellar public network. Production payments.