Tenzro LabsPlatform

Buying programmatically

Everything you can buy in the Platform UI — credit, packages, gift tickets, rentals and plans — you can buy from code or an agent, with a key that has manage.

Pricing is free on testnet. No machine offers rentals or plans and there are no credit packs right now, so those order types are refused until one is offered. GET /payment-methods says which payment methods are set up.

The flow

StepCallResult
1. Price itPOST /quotesThe amount, with nothing created
2. Order itPOST /ordersAn unpaid order and a pay_url
3. PayPOST /orders/{id}/payA Stripe Checkout link, or a stablecoin deposit address
4. ConfirmGET /orders/{id}Poll until status is paid
No API call charges anyone. Card payments are completed by a person on Stripe's page; stablecoin payments by sending funds from a wallet. An agent can prepare everything and hand the user a link or an address.

1–2. Quote and order

shell
curl https://platform.tenzro.xyz/api/orders \
  -H "Authorization: Bearer $TENZRO_API_KEY" -H "Content-Type: application/json" \
  -d '{"type": "credits", "amount_usd": 25}'
# While top-ups are closed (usage is free on testnet), this answers 400 with the reason.
typeFields
creditsamount_usd (the fiat amount paid; it buys credits once Tenzro Labs sets the rate), optional machine_id (pin), gift
packagepackage_id from GET /packages, optional gift
rentalmachine_id, gpu, cpu_cores, memory_gb, storage_gb, hours
subscriptionmachine_id, plan_id, optional renew_subscription_id

3a. Pay by card

shell
curl https://platform.tenzro.xyz/api/orders/ord_.../pay -H "Authorization: Bearer $TENZRO_API_KEY" \
  -H "Content-Type: application/json" -d '{"method": "card"}'

# → "payment": {"method": "card", "checkout_url": "https://checkout.stripe.com/c/pay/cs_..."}

Open checkout_url in a browser. Plans bought by card renew monthly until canceled.

3b. Pay with stablecoin

shell
curl https://platform.tenzro.xyz/api/payment-methods        # accepted chains and tokens

curl https://platform.tenzro.xyz/api/orders/ord_.../pay -H "Authorization: Bearer $TENZRO_API_KEY" \
  -H "Content-Type: application/json" -d '{"method": "stablecoin", "chain": "base", "token": "usdc"}'

# → "payment": {"method": "stablecoin",
#     "deposit": {"chain": "base", "token": "usdc", "amount": "25.00", "address": "0x...", "memo": null}}
  • Send exactly amount of token on chain to address, from any wallet or exchange.
  • A different token or network cannot be matched and is returned.
  • Calling pay again with the same chain and token returns the same address while it is waiting.
  • Stablecoin plans cover 30 days and do not renew themselves — renew with renew_subscription_id.

4. Confirm

shell
curl https://platform.tenzro.xyz/api/orders/ord_... -H "Authorization: Bearer $TENZRO_API_KEY"
# status: pending → processing → paid   (or failed / expired / canceled)

Poll every few seconds for card, every 10–30 seconds for stablecoin. Once paid: credit is in the balance, a rental is active, or a plan is active with its first month of credit. For a gift order, the response includes the ticket.code to hand over.

Tickets

Buy credit with gift: true to get a code instead of credit. Anyone can redeem it once with POST /credits/redeem or on the Credits page. List what you bought with GET /tickets.