Credits
Read your prepaid balance and top it up. Every rental is metered against the credits in your account, so this is the endpoint that tells you how much runway you have.
IPX is prepaid. You hold a balance of credits, we meter each rental per second from tunnel-connect to teardown, and we draw that balance down. You cannot be charged past your balance, so before you provision a box it is worth checking that you have enough to cover it. The Credits API gives you two things: a way to read the current balance, and a way to start a Stripe top-up without leaving your code.
All amounts the API returns are in micro-USD. One US dollar is 1,000,000 micro. A balance of 5000000 is $5.00, and a box at $0.68/hr meters at 680000 per hour.
Authentication
Both endpoints require a bearer token. Create or rotate one under Settings → API access, then send it on every request:
Authorization: Bearer $IPX_TOKEN
Get your balance
Returns the current credit balance for the account that owns the token. There are no parameters and no pagination. The single field balance_micro_usd is your spendable credits in micro-USD.
$ curl https://gpu.ipxtechholding.com/api/v1/credits \\
-H "Authorization: Bearer $IPX_TOKEN"
Response
5000000 is $5.00.{
"balance_micro_usd": 5000000
}
Poll this before you rent. A box meters per second, so confirm balance_micro_usd comfortably exceeds the hourly rate times how long you expect to run. Set a hard spend cap on the rental if you want a guaranteed ceiling.
Add credits
Starts a top-up by creating a Stripe PaymentIntent for the amount you ask for. This does not charge a card on its own. It returns a client_secret that you confirm with Stripe (in a browser, mobile SDK, or your own server-side flow). Once Stripe confirms the payment, the credits land on your balance.
Body parameters
500 tops up $5.00. Note this is cents, not micro-USD.# top up $5.00 = 500 cents
$ curl -X POST https://gpu.ipxtechholding.com/api/v1/credits \\
-H "Authorization: Bearer $IPX_TOKEN" \\
-H "Content-Type: application/json" \\
-d '{ "amount_cents": 500 }'
Response
Returns 201 Created with the Stripe identifiers you need to finish the payment.
pi_3Q.... Use it to track or reconcile the charge.{
"payment_intent_id": "pi_3QabcDEF456ghiJK0lmno",
"client_secret": "pi_3QabcDEF456ghiJK0lmno_secret_XyZ"
}
The top-up is not complete until Stripe confirms the PaymentIntent. The returned client_secret only authorizes the charge. Your balance updates after confirmation succeeds, so re-read GET /api/v1/credits to verify the credits landed.
Confirm the payment
-
Create the intent
Call
POST /api/v1/creditswithamount_centsand keep theclient_secretfrom the response. -
Confirm with Stripe
Hand the
client_secretto Stripe.js, a mobile SDK, or a server-side confirm call to collect and charge the card. This step happens against Stripe, not IPX. -
Verify the balance
Once Stripe reports success, re-read your balance. The new credits are reflected in
balance_micro_usd.terminal$ curl https://gpu.ipxtechholding.com/api/v1/credits \\ -H "Authorization: Bearer $IPX_TOKEN" # { "balance_micro_usd": 5500000 }
Prefer not to script payments? Top up from the console at Billing with a single click. The API is there for when you want balances and top-ups in your own tooling.
Units at a glance
Two different units show up around credits. Keep them straight:
- amount_cents (request input) is US cents.
500· $5.00. - balance_micro_usd (response) is micro-USD.
5000000· $5.00.
The two differ by a factor of 10,000: cents times 10,000 equals micro-USD. So 500 cents adds 5000000 micro to your balance.