Solana RPC for payments and stablecoin apps

Confirm a payment, get a signed webhook when an address is paid, reconcile it with your orders and send payouts, on one key at services.carbium.sh. Carbium is the read and send layer under your payment flow: it holds no funds and moves no money.

Confirm

2 reads

Find the order's reference, then read its transaction

Watch

100,000

Addresses one webhook watches on Pro

Reconcile

30 days

Of signatures per address, from Carbium's own index

Confirm

How do I confirm a Solana payment?

With two reads from your server. List the signatures that name the order's reference, then read the transaction and check who was paid, in which token and how much. The receipt names the call behind each line.

Order 1042Sample order

Paid

25.00USDC

reference
7Yk2…m4Qd
paid to
your USDC account
base units
25000000

Confirmed by

  1. getSignaturesForAddress55find the reference
  2. getTransaction55read who was paid
  3. getSignatureStatuses5follow it to final

3 calls115 credits

Commitment level

  1. The node has seen it, and it can still be dropped with its fork. Show that a payment was detected. Credit nothing.

  2. One level short of final. Tell the customer it arrived. What you release at this level is your own risk policy.

  3. It can no longer be undone. Credit the order and book the ledger row. Carbium's webhooks fire at this level.

  1. Give each order a reference

    A fresh public key per order, added to the payment request as a read‑only account, as Solana Pay does. It never holds funds: the signature list under it is where the payment shows.

  2. Find it

    getSignaturesForAddress on the reference, from your server, with the key in x-api-key. An empty page is the normal state of an unpaid order: keep waiting.

  3. Read it

    getTransaction, allowing version 1 transactions as the sample does. Check that it succeeded, the mint, the wallet that gained and the amount in base units. A name is not a check: the mint address is.

  4. Credit at finalized

    Name finalized on every call of one check, so its reads agree. Key your ledger on the signature, so a second look never credits twice.

confirm-payment.mjs
// confirm-payment.mjs: was this order paid? Two reads, both at finalized.
// Node 18 or later: fetch is built in. Run it on your server, so the
// key never reaches a browser. It reads only: nothing is signed or sent.
// CARBIUM_KEY=your-key node confirm-payment.mjs <reference> <wallet> <due>
const URL = "https://services.carbium.sh";
const USDC = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
const FINAL = { commitment: "finalized" };

async function rpc(method, params) {
  const res = await fetch(URL, {
    method: "POST",
    headers: {
      "content-type": "application/json",
      "x-api-key": process.env.CARBIUM_KEY,
    },
    body: JSON.stringify({ jsonrpc: "2.0", id: 1, method, params }),
  });
  const { result, error } = await res.json();
  if (error) throw new Error(method + ": " + error.message);
  return result;
}

// What one owner holds of one mint, summed over its token accounts.
const held = (balances, owner, mint) =>
  balances
    .filter((b) => b.owner === owner && b.mint === mint)
    .reduce((sum, b) => sum + BigInt(b.uiTokenAmount.amount), 0n);

// reference: the order's own public key, added to the payment request.
// wallet: the wallet you are paid at. due: base units ("25000000" = 25 USDC).
async function isPaid(reference, wallet, due) {
  // 1 find: the signatures that name the reference. None: not paid yet.
  const page = await rpc("getSignaturesForAddress", [
    reference,
    { limit: 10, ...FINAL },
  ]);
  const hit = page.reverse().find((entry) => entry.err === null);
  if (!hit) return { paid: false, why: "no payment yet" };
  // 2 read: what the transaction moved to the wallet, in USDC.
  const tx = await rpc("getTransaction", [
    hit.signature,
    { encoding: "json", maxSupportedTransactionVersion: 1, ...FINAL },
  ]);
  if (!tx) return { paid: false, why: "not readable yet, ask again" };
  const got =
    held(tx.meta.postTokenBalances, wallet, USDC) -
    held(tx.meta.preTokenBalances, wallet, USDC);
  // Key your ledger on the signature: a second look never credits twice.
  return {
    paid: got >= BigInt(due),
    got: String(got),
    signature: hit.signature,
  };
}

const [reference, wallet, due] = process.argv.slice(2);
console.log(await isPaid(reference, wallet, due));
Run on 26 November 2026 against the live service: a payment in full, one short by a unit, and a reference nobody had paid. The two reads cost 110 credits. RPC reference.
  • USDC lands in a token account

    A token transfer names the receiving token account and can leave the owner's wallet out. To list or watch token payments, use the token account's address. SOL changes the wallet itself.

    Deposit alerts, in code
  • An empty poll still costs a read

    Each getSignaturesForAddress call costs 55 credits, paid or not. Poll on an interval sized to your plan, or let a webhook tell you: a delivered event costs 1 credit.

    Webhooks for deposits
  • Keep the key on your server

    The checkout page asks your server whether an order is paid, and your server asks Carbium. A payment page that polls from the browser puts the key in its bundle.

    Keys and browser apps

Deposits

How do I get a webhook when a Solana address is paid?

Register an HTTPS address and a list of Solana addresses. Each finalized transaction that touches one of them arrives as one signed POST, with no socket to hold open. A delivery with no 2xx answer is tried again, 8 tries over about 27 hours.

One delivery

POST https://your-server.example/hook

webhook-id
the event's id, the same on every try
webhook-timestamp
Unix seconds: refuse one over 300 s old
webhook-signature
HMAC-SHA256 over the raw body

one transaction, in the shape getTransaction returns

8 tries · about 27 hours

  1. try 1at once
  2. try 2+5 s
  3. try 3+5 min
  4. try 4+30 min
  5. try 5+2 h
  6. try 6+5 h
  7. try 7+10 h
  8. try 8+10 h

Answer 2xx within 15 s and the tries stopthen dropped

Webhooks on each Carbium RPC plan: how many, the addresses each may watch, the addresses in all, and deliveries a second
PlanWebhooksAddresses a webhookAddresses in allDeliveries a second
FreeNoneNoneNoneNone
Dev51,0005,00010
Business2525,000625,00050
Pro50100,0005,000,000200
Addresses in all is webhooks times addresses a webhook. A delivered event costs 1 credit; a failed try and the calls that manage a webhook cost none. Read 26 November 2026: webhooks and rate limits.
  • Verify, answer, then work

    Check the signature over the raw body before any parse, answer 2xx within 15 seconds, and do the work after. Events arrive at least once and in no promised order: dedupe on webhook-id.

    WebSockets and webhooks
  • Watch the token account

    A webhook fires for a transaction that touches a listed address. For USDC, list the token account that receives it. The System and Token programs themselves are refused as addresses.

  • Fill a gap from history

    Up to 10,000 events wait per webhook while your server is down. After a longer gap, page getSignaturesForAddress from the last signature you booked.

    Missed webhook backfill

Reconcile

How do I reconcile Solana payments with my orders?

Page an address's signatures back from the newest one you booked, read each transaction once, and key your ledger on the signature. Carbium answers the pages from its own address index, which keeps up to 30 days.

  • Your orders: #104225.00due

    paid

    Found on chain: 25.00foundone signature

  • Your orders: #104340.00due

    partial

    Found on chain: 15.00found25.00 still due

  • Your orders: #104412.50due

    overpaid

    Found on chain: 13.00found0.50 to return

  • Your orders: #104560.00due

    open

    Found on chain: 0.00foundnothing yet

  • Your orders: #104618.00due

    paid twice

    Found on chain: 18.0018.00foundtwo signatures

  • Your orders: no order

    unapplied

    Found on chain: 8.00foundno reference

Sample figures. Each state is a rule over the signatures you stored, summed again on every pass.
  • 30 days, then your own records

    The address index keeps up to 30 days of signatures, and there is no archive behind getTransaction. Store what you read when you read it: your ledger is the long memory.

  • Filter for token transfers

    getTransactionsForAddress takes a tokenTransfer filter: a mint, a direction and an amount. It walks the history for you and is billed as a walk, by the pages and transactions it reads: keep its limit low.

    History, in the reference
  • A reference you control

    A balance change proves an amount landed on an owner. It does not say which invoice it pays. Put a reference key or a memo in the payment, and match on it as well as on the amount.

    Partial payments, in code

Payouts

How do I send USDC payouts without paying twice?

Check every recipient before you sign, send, then confirm each signature at finalized. If a send times out, the transaction may still land. Resend the same signed bytes until its blockhash expires, and only then sign again.

One signed payout

block height, read with getBlockHeight

  • resend the same signed bytes
  • sign again, fresh blockhash
Landedthe signature has a status
Record the payout. Never sign it again.
Still liveno status, height at or below the edge
Wait, or resend the same signed bytes.
Expiredno status, height past the edge
Sign a new transaction with a fresh blockhash.
Compare lastValidBlockHeight with getBlockHeight, never with getSlot: the two counters differ, and the slot declares expiry too early. Safe-retry payment check and bulk payout preflight, in code.
  1. Check the list before you sign

    Read up to 100 recipients' token accounts in one getMultipleAccounts call: does each exist, is it frozen. 10 credits an account, plus 5. A recipient with no token account needs one created, and the payer funds its rent.

  2. Store the window with the signature

    getLatestBlockhash returns the blockhash and its lastValidBlockHeight together. Write both down with the payout's id before anything is sent.

  3. Send once, and own the retry

    Carbium forwards a send once and does not retry it. After a timeout or a 5xx, do not sign again: ask getSignatureStatuses with searchTransactionHistory, at 10 credits a signature plus 5, and resend the same bytes while the window is open.

  4. Confirm 256 payouts in one call

    getSignatureStatuses takes up to 256 signatures for 5 credits. Mark a row paid on a finalized status, and on nothing else.

Plans

Which plan does a payments backend need?

Two things set it: whether you need webhooks, which start on Dev at $20 a month, and how often you list address history. The history rate is what rises most between plans.

  • Free

    $0a month

    Build and test

    Write the confirmation against mainnet on 500K credits, granted once. No webhooks: poll, or subscribe over WebSocket.

    Webhooks
    None
    Addresses a webhook
    None
    Deliveries a second
    None
    History reads a second
    0.24
    Credits, granted once
    500K
  • Dev

    $20a month

    A first shop or a pilot

    5 webhooks of 1,000 addresses each, and 1.2 history reads a second.

    Webhooks
    5
    Addresses a webhook
    1,000
    Deliveries a second
    10
    History reads a second
    1.2
    Credits a month
    10M
  • Business

    Fits a live checkout

    $250a month

    A checkout with traffic

    100 history reads a second, and up to 625,000 watched addresses over 25 webhooks.

    Webhooks
    25
    Addresses a webhook
    25,000
    Deliveries a second
    50
    History reads a second
    100
    Credits a month
    50M
  • Pro

    $500a month

    A processor or an exchange

    100,000 addresses a webhook, 200 deliveries a second and 500 history reads a second.

    Webhooks
    50
    Addresses a webhook
    100,000
    Deliveries a second
    200
    History reads a second
    500
    Credits a month
    200M

History reads are getSignaturesForAddress calls the address index answers. Transaction reads are 1.2, 5 and 25 a second on Dev, Business and Pro, so read each transaction once and store it. Rates are per account, read 26 November 2026.

Limits

What does Carbium not do for payments?

Carbium is infrastructure under a payment flow. Six things it does not do, so nothing surprises you in production.

  • It is not a payment processor

    Carbium holds no funds, takes no custody and moves no money. It answers reads and forwards the transactions your own keys signed. Licences, customer checks and payouts in a bank currency are yours or your processor's.

  • Webhooks fire at finalized only

    And they start on Dev: a Free key is refused. For an earlier signal, subscribe over WebSocket, which is on every plan, then run the same finalized check.

    WebSocket subscriptions
  • Deliveries are raw transactions

    One transaction per POST, in the shape getTransaction returns. No parsed payloads, no batches and no replay of past events. A body over 64 KB arrives in a short form: read the rest with getTransaction.

  • History is 30 days, not an archive

    Signatures per address go back up to 30 days. A transaction older than the node's ledger cannot be fetched, so a tax or audit trail has to be stored as it happens.

  • No webhook on a balance

    Webhooks are per transaction. To follow a token account's balance itself, use accountSubscribe over WebSocket, or read getTokenAccountBalance at finalized and compare it with your ledger.

  • Sends are not retried for you

    A send is forwarded exactly once. That is what makes a payout safe to reason about: nothing resends behind your back, and the retry rule above is the whole policy.

    The retry rule

Questions

The reference on carbium.sh has every call and limit. For anything else, ask the team on the Carbium Discord.

Webhooks reference

Is Carbium a payment processor?

No. Carbium is infrastructure: it answers Solana RPC calls and forwards transactions your own keys signed. It holds no funds, takes no custody and moves no money. A payment processor, a fintech app or a shop builds its payment flow on top and keeps its own keys, its own customer checks and its own licences.

How do I accept USDC payments on Solana with Carbium RPC?

Give each order a reference, a fresh public key added to the payment request. From your server, call getSignaturesForAddress on the reference until a signature appears, then getTransaction to check that it succeeded, that the mint is USDC and that your wallet gained the amount due. Credit the order when both reads are at finalized. The key travels in the x-api-key header and stays on your server.

Solana Pay confirmation, in code

Should I credit a payment at confirmed or at finalized?

At finalized. A finalized transaction can no longer be undone, which is what a ledger entry needs, and Carbium's webhooks fire at that level. Showing the customer that a payment arrived at confirmed is common. What you release before finalized is your own risk policy. Name the level on every call, because some client libraries fill in confirmed when you leave it out.

Does Carbium have webhooks for incoming Solana payments?

Yes, from the Dev plan, at $20 a month. You register an HTTPS address and a list of Solana addresses, and each finalized transaction that touches one of them arrives as a signed POST. Dev allows 5 webhooks of 1,000 addresses, Business 25 of 25,000 and Pro 50 of 100,000. A delivered event costs 1 credit.

WebSockets and webhooks

Why does my webhook miss USDC deposits to a wallet?

Because a token transfer names the receiving token account, and the owner's wallet may not appear in the transaction at all. A watch on the wallet address sees SOL arrive and misses tokens. List the token account that receives USDC, one for each token you accept.

Exchange deposit alerts, in code

What happens to a webhook delivery when my server is down?

A delivery with no 2xx answer within 15 seconds is tried again after 5 seconds, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours and 10 hours: 8 tries over about 27 hours. Meanwhile up to 10,000 events wait per webhook. After a longer gap, page the address's signatures from the last one you booked and read what you missed.

How far back can I read an address's payment history?

getSignaturesForAddress is answered from Carbium's own address index, which keeps up to 30 days. There is no archive behind getTransaction, so a signature the index lists can be older than a transaction you can still fetch. Store each payment when you read it. A ledger, a tax report or an audit trail needs your own records.

How do I avoid sending a payout twice?

Store the lastValidBlockHeight with each signature when you sign. If a send times out, ask getSignatureStatuses first. A status means it landed: never sign it again. No status and a block height at or below the stored one means it is still live: wait, or resend the same signed bytes, which cannot run twice. Only when the height has passed it do you sign a new transaction.

Safe-retry payment check, in code

How many deposit addresses can I watch?

One webhook watches up to 1,000 addresses on Dev, 25,000 on Business and 100,000 on Pro, and an account registers 5, 25 or 50 webhooks. That is up to 5,000, 625,000 and 5,000,000 addresses in all. Deliveries run at up to 10, 50 and 200 a second.

Does it work for USDT, PYUSD and other stablecoins?

Yes. A stablecoin on Solana is a token with a mint address, and the same reads return its transfers. What changes is the mint you check and the token account you watch. Check the mint address itself, never the name or the symbol: a look-alike token can carry any name.

What does a fintech app need from a Solana RPC provider?

Four things: a way to confirm a payment, a signal when an address is paid, history to reconcile against, and sends it can retry safely. On Carbium RPC those are two reads at finalized, signed webhooks from the Dev plan, 30 days of signatures per address, and a send that is forwarded once, so the retry policy is yours. Rates are per account and listed by plan.

Carbium RPC pricing

What does one payment check cost in credits?

Finding the reference with getSignaturesForAddress costs 55 credits and reading the transaction with getTransaction costs 55. One getSignatureStatuses call costs 5 and takes up to 256 signatures. Every empty poll before the payment arrives costs 55 more, which is why a webhook, at 1 credit per delivered event, suits a busy checkout.

Can an AI agent pay or get paid through Carbium?

An agent signs its own transactions with its own key, and Carbium serves the reads around them: is the token a real mint, can the recipient receive it, did the payment land at finalized, was the signature used before. The Carbium Library has working checks for x402 payments. An agent can sign up for a key with only a Solana keypair.

Carbium for AI agents

Confirm, watch, reconcile, pay out

One key at services.carbium.sh for the four jobs of a payment flow. Start on the Free plan, add webhooks on Dev, and keep your own keys and your own ledger throughout.

Browse the Carbium Library