Widget

Get authoritative state for this user's checkout

Returns the authoritative state of one of the calling end user's own top-up checkout sessions. Poll it after checkout instead of trusting the browser redirect.

get/credits/me/topups/{sessionId}

Request

  • Base URL
    https://api.paywithlocus.com/api
  • URL
    https://api.paywithlocus.com/api/credits/me/topups/{sessionId}
  • Auth
    • HTTP bearer
    • or HTTP bearer and API key in header X-Locus-Publishable-Key

Path parameters

sessionIdstring required

Headers

X-Locus-Session-Idstring

Required only when the end-user JWT carries sid. Send the original high-entropy session value; sid is its SHA-256 fingerprint. Ignored for secret-key authentication.

Response

Checkout state

successunknown required
sessionIdstring required
state'pending' | 'completed' | 'expired' required
paymentStatusstring required
fulfillment'awaiting_payment' | 'processing' | 'ready' | 'expired' | 'failed'

Ledger state. completed means Stripe was paid; credits are spendable once this is ready.

Changes

No recorded changes to this operation across all 1 revision of this API.