Crypto payments, without a custodian
Self-host an open-source payments API. Customers pay in USDC, USDT, or other ERC-20 tokens on Ethereum or Base; deposits can only reach your treasury.
- to credit on Base
- ~7 s
- fee per payment
- 0%
- open source
- Apache-2.0
import { PhalaPay } from "@phala/pay-server";const pay = PhalaPay.fromEnv();// When the payer submits <PaymentElement>,// with its choice and idempotency key:export async function createTopUp( team: string, chain_id: number, asset: string, idempotencyKey: string, // a UUID: check it) { const quote = await pay.quotes.create({ client_reference_id: team, amount: 2500, // US cents currency: "usd", chain_id, asset, }, { idempotencyKey }); return pay.checkoutParams(quote);}import type { CheckoutParams as Params, PaymentOption as Option,} from "@phala/pay";import { PaymentElement,} from "@phala/pay-react";import "@phala/pay-react/styles.css";export function TopUp(props: { options: Option[]; // GET /v1/config quote: (option: Option, request: { idempotencyKey: string; // per quote }) => Promise<Params>; onPaid: () => void;}) { return ( <PaymentElement options={props.options} amount={2500} createQuote={props.quote} onSuccess={props.onPaid} /> );}deposit.credited webhook arrives.Live demo
Try it on testnet
Pay with test tokens and watch the backend follow the payment.
Live on Sepolia and Base Sepolia
Customer view
Acme Cloud · Billing
Balance
Add credits
Price locked for 15 minutes; other amounts at the market rate.
Your backend
Idle
Loading…
Custody
Where the money goes
Deposit addresses are contracts that can only pay your treasury. You set the treasury with a signed message; the operator cannot change it.
- 01 · Payer
Your customer's wallet
Pays the quote, or sends to their deposit address.
- pays02 · Contract
A deposit address
A contract whose only destination is fixed in its address.
- sweeps only to03 · You
Your treasury
An address or Safe you prove you control with a signed message.
Why Phala Pay
For platforms that sell credits
Top-ups and credits for apps and platforms, such as AI APIs, cloud, and compute.
0%
Taken by the software, per payment
No per-payment fee
You pay only for hosting, RPC providers, and sweep gas.
- Base
- ~7 s
- Ethereum
- ~30 s
A manual transfer is found by the five-minute scan.
Credited in seconds
Double-checked by a second RPC provider and watched to finality.
SDKs
- @phala/pay-react
- @phala/pay
- @phala/pay-server
- phala-pay
Webhooks
- deposit.credited
- deposit.reversed
- deposit.refunded
- refund.failed
Stripe-style API
Quotes, deposit addresses, test and live modes, idempotency keys, signed webhooks. SDKs for React, Node.js, and Python.
- Intel TDX confidential VM
- Attestation you can check
- Webhook signing key pinned from it
Verify what runs
Check its attestation before you trust its webhooks.
Compare
How Phala Pay compares
Beside Stripe stablecoin payments and BTCPay Server, as each states it. The full comparison adds Coinbase Business (Checkouts API), NOWPayments, and MoonPay Commerce (formerly Helio), with a source for every value.
| Phala Pay | Stripe stablecoin payments | BTCPay Server |
|---|---|---|
| Custody | ||
| Non-custodial: contracts that can only pay your treasury | Settles to your Stripe balance in local currency | Non-custodial; "payments go directly to your wallet" |
| Self-hosting / open source | ||
| Yes, Apache-2.0, on your Phala Cloud workspace | No (hosted service) | Yes, self-hosted; MIT license |
| Fees | ||
| No per-payment fee; you pay hosting, RPC, sweep gas | 1.5% per transaction (US pricing page) | No transaction fees |
| Chains / tokens | ||
| ERC-20 tokens on Ethereum and Base, including USDC and USDT | USDC (Tempo, Ethereum, Solana, Polygon, Base); USDP, USDG US-only | Bitcoin, Lightning; community altcoins incl. USDt (Tron, Liquid) via plugins |
FAQ
Frequently asked questions
Not answered here? Read the documentation or ask on GitHub.
What does Phala Pay cost?
The software is free and open source (Apache-2.0) and takes no fee per payment. You pay for your Phala Cloud instance, two RPC providers per chain, backup storage, and the gas when you sweep. Payers pay their own network fees.
Who holds the money?
No one but you. Each deposit address is a contract that can only pay your treasury, an address or Safe you prove you control. Phala Pay holds no keys to your funds and sends no transactions.
Which chains and tokens are supported?
ERC-20 tokens on Ethereum and Base: stablecoins such as USDC and USDT, and volatile tokens priced on-chain, such as PHA via TWAP, valued in USD at the quoted price (or, for deposit addresses and mismatched payments, at the price when confirmed). A live (production) route needs commercially licensed price sources. USDC and USDT have commercially licensed price sources; other tokens depend on theirs. The live demo uses test PHA, USDC and USDT on Sepolia, and only test USDC on Base Sepolia.
How fast is a payment credited?
At the chain's confirmation: about 7 seconds on Base and about 30 seconds on Ethereum. The deposit is then watched to finality (about 15 minutes on Ethereum); if a reorg replaces it, you receive a deposit.reversed event.
How do refunds work?
You send the refund from your own wallet or Safe and declare it through the API. Phala Pay verifies the transfer on-chain at finality and sends deposit.refunded so your ledger stays correct.
Is there a hosted version?
No public hosted service. You run your own instance on your own Phala Cloud workspace, with a one-command testnet quick start. Phala runs an instance only for Phala Cloud.
What is the security model?
The service runs in an Intel TDX confidential VM whose attestation you can verify. Payments are confirmed by two independent RPC providers, and payers are screened against verified OFAC SDN snapshots and operator supplements. Phala Pay is pre-1.0 and has not had a third-party security audit.
Do I need KYC or a merchant account?
Phala Pay has no signup and does not onboard you. You run the instance and decide your own compliance obligations; it screens payers against verified OFAC SDN snapshots and operator supplements and leaves KYC to you.
Run your own payment rail
Deploy a testnet instance to your Phala Cloud workspace with one command.
curl - fsSL https:// pay. phala. com/ deploy. sh | bashDeploys the latest release. To verify the release's provenance first, follow the high-assurance path.