Blog

Crypto payments for API and developer-tool businesses

CoinStackUpdated 10 min read
Industries

API and developer-tool businesses that bill by usage are the easiest software companies to add crypto to, because they already sell prepaid credits. A developer buys credit with a stablecoin, a signed webhook adds it to the account, and usage draws it down. OpenRouter, NanoGPT, Runpod and Vast.ai all sell credits for crypto as of December 2026. The decisions that take thought are the smallest top-up, the zero-balance behavior, and the refund and abuse rules.

Which API and compute sellers take crypto for credits?

CompanyCrypto acceptedWhat its docs say about it
OpenRouter"cryptocurrency payments in USDC"A 5% fee on crypto purchases, against 5.5% with a $0.80 minimum on other purchases
NanoGPT"29 crypto payment options, including Monero, Bitcoin, Nano, USDC, and USDT"Crypto "gets a 3% bonus"
RunpodCrypto "via integrated payment processors""Complete any required KYC verification before your first crypto payment." Auto-pay reloads from a saved card only
Vast.ai"crypto payments through BitPay and Crypto.com"Autobilling is for credit cards only, and a backup card is advised even for crypto payers
Porkbun (domain registrar with an API)USDC, added as account creditAn AI assistant "can add account credit with USDC on the Base network" for the account holder

Two things stand out. Each of these sellers lets crypto fund a balance. And where their docs describe automatic reload, at Runpod and Vast.ai, it is for cards only.

A third point is a warning. OpenRouter's crypto API page says its old purchase endpoint "has been removed and now returns 410 Gone" because the Coinbase APIs behind it were deprecated, and Vast.ai's docs now label Coinbase Commerce as legacy. Keep the gateway's ID in a single column of your own purchase table, so that a change of gateway touches one module.

Why do prepaid credits and stablecoins fit usage billing?

Usage billing needs a balance that can be debited many times a second. A standard crypto payment cannot be pulled from the customer, so the only workable shape is a deposit made ahead of use. API sellers already work that way. OpenRouter's FAQ says "Credits are simply deposits on OpenRouter that you use for LLM inference."

Stablecoins fit because the balance is in dollars. NanoGPT states "your balance is held in US dollars". A developer who sends 20 USDC for a $20 top-up sees no exchange-rate question, and on CoinStack the amount quoted in a stablecoin has no time limit, while a BTC quote is held for 60 minutes and other tokens for 20.

The third reason is risk. Credit that has been spent on inference or compute cannot be taken back, which makes a disputed card payment a pure loss. Card rules at these sellers hint at that pressure: Runpod asks that prepaid cards "deposit at least $100 per transaction". A completed crypto payment has no chargeback process. That removes one risk and leaves another, which is covered below.

How small can a credit top-up be?

Small top-ups are where cards are weakest. Stripe's US pricing is 2.9% plus 30 cents. On a $5 top-up that is $0.45, or 8.9% of the sale. OpenRouter's fee on non-crypto purchases has the same shape, 5.5% with a $0.80 minimum, which on a $5 purchase comes to 16%.

A percentage-only fee scales down. CoinStack takes 0.8% with no fixed part, so the fee on $5 is 4 cents. The smallest CoinStack checkout is worth $1.

The cost that does not shrink sits with the developer, and it depends on where they pay from.

Paying fromWhat the developer pays to send $5Source
A self-custody wallet on an Ethereum layer 2 such as BaseA network fee that averages "less than one cent"a16z State of Crypto 2025, October 22, 2025
Kraken, USDC on Base1 USDC flat, 20% of the top-upKraken fee table, December 2, 2026
Kraken, USDC on Solana0.7083 USDC flat, 14% of the top-upSame table
Kraken, USDT on TRON1 USDT flat, 20% of the top-up. The smallest withdrawal is 6 USDT including the feeSame table

A $5 top-up suits developers who hold stablecoins in their own wallet; for anyone paying from an exchange, larger top-ups spread the flat withdrawal fee. Presets of $10, $25 and $100 with a line about flat exchange fees steer people to a sensible size. Small amounts are normal in crypto payments. In CoinGate's country data for the 12 months to August 2026, the median paid order was 12.19 EUR in the United States, 10.85 EUR in India and 8.86 EUR in Nigeria. The arithmetic for one payment is laid out in the real cost of a $29 crypto payment.

How do you credit an account automatically?

Create a checkout when the developer asks to buy credits, record it, and credit the account when the completed event arrives. The request needs only an amount and a currency. The other fields are described in the checkouts guide.

curl https://coinstack.net/api/v1/checkouts \
  -H "Authorization: Bearer $COINSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": "20.00",
    "currency": "USD",
    "reference": "credits-acct_8412",
    "description": "API credits",
    "success_url": "https://console.example.com/billing?checkout={CHECKOUT_ID}"
  }'

The response contains a checkout_id and the url of the hosted payment page. Store the first with the purchase and send the developer to the second. One table is enough:

CREATE TABLE credit_purchases (
  id          bigserial PRIMARY KEY,
  account_id  text NOT NULL,
  amount      numeric(12, 2) NOT NULL,
  checkout_id text NOT NULL UNIQUE,
  credited_at timestamptz
);

-- when the checkout is created
INSERT INTO credit_purchases (account_id, amount, checkout_id)
VALUES ($1, $2, $3);

-- when a verified checkout.completed event arrives
UPDATE credit_purchases
SET credited_at = now()
WHERE checkout_id = $1 AND credited_at IS NULL;

-- credit an account has bought
SELECT COALESCE(SUM(amount), 0)
FROM credit_purchases
WHERE account_id = $1 AND credited_at IS NOT NULL;

The spendable balance is that sum minus metered usage. The update is safe to run twice, which matters because the webhooks guide says the same event can arrive more than once. It also credits only checkouts you created, and the amount comes from your own row. Verify the CoinStack-Signature header before you run it, as verifying payment webhooks explains, and return a 2xx status within 10 seconds. The general build is in prepaid balances with crypto.

Credit on checkout.completed, which means the payment has been converted and the USDC is in your wallet. That usually takes seconds to a few minutes, depending on the network the developer paid on. A checkout.partial event means less than the full amount arrived. For credits, the simplest policy is to credit what came in and close the purchase: resolve the checkout as the underpayments guide describes, and set the row's amount to the part that arrived. Top-ups for a proxy dashboard has working code for that case.

What should the API do at a zero balance?

Compute sellers are blunt about it. Runpod's billing page says "When your balance reaches $0, Runpod automatically stops all of your running Pods", and Vast.ai, where instances also stop at zero, advises that "saving a credit card as a backup payment method helps protect your instances from deletion". Both reserve automatic reload for cards. A crypto-only customer has no safety net, so the design has to supply one.

For a request-based API, return a clear error with the balance and a way to fix it. HTTP has a status code set aside for this. MDN describes 402 Payment Required as a "nonstandard response status code reserved for future use" that was created for digital payment systems.

{
  "error": "insufficient_credits",
  "balance": "0.00",
  "top_up_url": "https://console.example.com/billing"
}

Around that, send low-balance alerts by email or webhook at a threshold the developer sets, show the balance in a response header or a balance endpoint, and consider a small overdraft for established accounts so a batch job does not die mid-run.

Can a script or an agent buy credits without a browser?

Porkbun shows one version of it. Its help page says an AI assistant can add credit in USDC on Base and that "Your credit is added within about a minute, less a network fee of about one cent." OpenRouter used to expose a purchase endpoint for the same purpose and has withdrawn it.

You can offer it through your own API. Add an endpoint that creates a top-up and returns payment details instead of a web page. With CoinStack, that means creating the checkout and then a quote for the token and network the caller chose. The quote returns an address, the remaining amount in the token's smallest unit, and a uri that wallets can read, as build your own checkout describes. A script with a funded wallet sends the exact amount to that address, and the same completed webhook credits the account. Each quote has its own address, so no memo is needed.

CoinStack's docs are also published for machines, as a single text file, an OpenAPI 3.1 file and an MCP server, which helps when an AI coding assistant writes the integration. The code samples in the docs are cURL, Node.js, Python and PHP, and building with an AI coding assistant shows the setup.

Which refund, expiry and abuse rules should you publish?

The published rules in this sector are strict:

  • OpenRouter: "cryptocurrency payments are never refundable", other unused credits can be refunded within 24 hours, and it reserves "the right to expire unused credits after one year of purchase".
  • Runpod: credits "are non-refundable and cannot be withdrawn once deposited".
  • Vast.ai: "We do not refund Vast credits bought with crypto."

Whether a no-refund rule holds for your customers depends on consumer law where they live, so have a lawyer read the policy. If you do refund, send a stablecoin from your own wallet to an address the developer confirms, and take the refunded amount off their balance when you send it.

On abuse, crypto removes the chargeback and nothing else. An attacker who funds an account with crypto can still run prohibited workloads or resell access. Runpod's answer is identity checks before the first crypto payment. Lighter controls are request caps on new accounts, a cap on the first top-up, and a delay before high-cost resources become available.

Where does CoinStack fit an API business?

It fits a usage-billed product that prices in dollars and wants stablecoin revenue in its own wallet. Whatever the developer paid with, every payment is converted to USDC and settles on the network you choose, to your own wallet or any address you name, such as a treasury wallet, and the fee is 0.8%. Developers pay from any wallet or exchange with USDC, USDT, PYUSD or USDG, or with BTC, ETH, SOL, BNB, TRX or HYPE.

There is no setup or monthly fee, a completed payment cannot be charged back, and the USDC is in your wallet as soon as the checkout completes, with no payout schedule. To see the flow, open the demo checkout. Crypto payments for AI, GPU and cloud sellers covers the compute side in more depth, and crypto payments for SaaS companies covers flat-priced plans.

Frequently asked questions

Should API credits be priced in dollars or in tokens and requests?

Keep the balance in dollars and meter usage against it. A dollar balance can be bought with a dollar checkout, survives price changes to individual models or endpoints, and is simple to refund. NanoGPT says its balance is held in US dollars, and OpenRouter calls its credits deposits. Units such as tokens or requests work better as a display on top of the dollar ledger than as the ledger itself.

Should crypto credit purchases carry a fee or a bonus?

Both exist. OpenRouter charges 5% on crypto purchases, slightly under its 5.5% card fee. NanoGPT gives a 3% bonus on crypto. With a gateway fee of 0.8% and no fixed part, a crypto top-up costs you less than a card charged at 2.9% plus 30 cents at every size, so a surcharge is hard to justify on cost. A small bonus on larger top-ups pushes customers toward fewer payments.

What is the smallest credit purchase worth offering?

On CoinStack the floor is a $1 checkout, and tokens on Bitcoin and TRON have higher minimums. In practice $5 is a reasonable floor for developers paying from their own wallet on a low-cost network. For anyone paying from an exchange, a flat withdrawal fee of around 1 USDC makes $10 to $25 the smallest amount that is good value.

Can crypto credits reload automatically when the balance is low?

Each crypto top-up is a payment the customer sends. What keeps a balance funded is low-balance alerts, larger top-ups, and a top-up endpoint in your own API that a customer's script can call and pay from a wallet it controls.

More posts