
Security News
White House Authorizes Private Companies to Conduct Offensive Cyber Operations
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.
@crypax/react
Advanced tools
English | 한국어
React bindings for Crypax — crypto payment gateway for any EVM chain.
npm install @crypax/react
@crypax/jsis included as a dependency — no need to install separately.
import { CrypaxProvider } from '@crypax/react'
function App() {
return (
<CrypaxProvider publishableKey="pk_live_xxxxx">
<Checkout />
</CrypaxProvider>
)
}
import { CheckoutButton } from '@crypax/react'
function Checkout() {
return (
<CheckoutButton
clientSecret={clientSecret}
onSuccess={(result) => console.log('Paid!', result.txHash)}
onCancel={() => console.log('Cancelled')}
onError={(err) => console.error(err)}
>
Pay 10 PLM
</CheckoutButton>
)
}
import { useConfirmPayment, useWallet } from '@crypax/react'
function CustomCheckout({ clientSecret }: { clientSecret: string }) {
const { confirmPayment, status, result, error, reset } = useConfirmPayment()
const { wallet, detect } = useWallet()
return (
<div>
<p>Status: {status}</p>
<button onClick={() => confirmPayment(clientSecret)}>
{status === 'idle' ? 'Pay Now' : 'Processing...'}
</button>
{result?.status === 'confirmed' && <p>TX: {result.txHash}</p>}
{error && <p>Error: {error}</p>}
</div>
)
}
<CrypaxProvider>| Prop | Type | Required | Description |
|---|---|---|---|
publishableKey | string | Yes | Your Crypax publishable key |
options | CrypaxConfig | No | Chain, theme, locale config |
<CheckoutButton>| Prop | Type | Required | Description |
|---|---|---|---|
clientSecret | string | Yes | From server payments.create() |
onSuccess | (result) => void | No | Called on confirmed payment |
onCancel | () => void | No | Called when user cancels |
onError | (error: string) => void | No | Called on failure |
className | string | No | Custom CSS class |
disabled | boolean | No | Disable button |
useConfirmPayment()Returns { confirmPayment, status, result, error, reset }
useWallet()Returns { wallet, loading, detect }
useCrypax()Returns the underlying Crypax instance.
MIT
FAQs
Crypax React SDK
We found that @crypax/react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.