The easiest way for users to transact in your app
Onramp users with credit card & cross-chain crypto payments — and generate revenue for each user transaction.
Embed component
Inline component that allows users to buy any currency.
Customize theme, currency, amounts, payment methods and more.
import { PayEmbed } from "thirdweb/react";
function App() {
return <PayEmbed client={client} />;
}
Transaction Button
Transaction Button is a handy component that handles transactions.
If your user doesn't have enough funds for that transaction, a pre-filled pay modal will appear with the exact amount needed.
import { claimTo } from "thirdweb/extensions/erc1155";
import {
TransactionButton,
useActiveAccount,
} from "thirdweb/react";
function App() {
const account = useActiveAccount();
return (
<TransactionButton
transaction={() => {
// any transaction works
return claimTo({
contract,
quantity: 1n,
tokenId: 0n,
to: account.address,
});
}}
>
Buy for 10 MATIC
</TransactionButton>
);
}