curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/billing/credits/purchase' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"amount_dollars": 1.5
}'
Purchase credits handler
Required scope: billing:write
POST
/
api
/
v1
/
billing
/
credits
/
purchase
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/billing/credits/purchase' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"amount_dollars": 1.5
}'
Required scope:
billing:write
Request body
PurchaseCreditsRequest
number (double)
required
Amount in dollars to purchase as prepaid credits.
Response
No response body. Credit purchase initiated.Status codes
| Code | Meaning |
|---|---|
200 | Credit purchase initiated |
401 | Unauthorized — missing or invalid credentials |
403 | Forbidden — the key/token lacks the required scope |
404 | No Stripe customer for this org |
429 | Rate limited — see Retry-After / X-RateLimit-Reset |
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/billing/credits/purchase' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"amount_dollars": 1.5
}'
Last modified on August 31, 2026