Pre-1.0 · Not yet audited: the security policy

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
top-up.ts
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);}
Credit the account when the signed 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

Amount

Price locked for 15 minutes; other amounts at the market rate.

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.

  1. 01 · Payer

    Your customer's wallet

    Pays the quote, or sends to their deposit address.

  2. pays
    02 · Contract

    A deposit address

    A contract whose only destination is fixed in its address.

  3. sweeps only to
    03 · You

    Your treasury

    An address or Safe you prove you control with a signed message.

Phala Pay holds no key to the funds and sends no transactions.

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.

Time to credit, wallet checkout
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.

Compare Phala Pay with
Phala Pay beside the provider chosen above, a row per dimension.
Phala Pay
Custody
Non-custodial: contracts that can only pay your treasury
Self-hosting / open source
Yes, Apache-2.0, on your Phala Cloud workspace
Fees
No per-payment fee; you pay hosting, RPC, sweep gas
Chains / tokens
ERC-20 tokens on Ethereum and Base, including USDC and USDT

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.

Terminal
curl -fsSL https://pay.phala.com/deploy.sh | bash

Deploys the latest release. To verify the release's provenance first, follow the high-assurance path.