Getting Started with PayDirect
Accept USDC, ETH, ADAO, and USD card payments in under 10 minutes. This guide covers account setup, API keys, and your first payment — pick the install path that fits your stack.
Go to paydirect.com/signup and sign in with your GitHub account. After authentication, the onboarding wizard will guide you through creating your first workspace.
Each workspace gets a dedicated Coinbase CDP-managed wallet on Base mainnet for receiving payments. No private keys to manage.
During onboarding, a sandbox API key is automatically generated. Find it at Dashboard → Settings → API Keys.
| Key Prefix | Environment | Use For |
|---|---|---|
pd_test_ | Sandbox | Development and testing. Payments auto-complete instantly. |
pd_live_ | Live | Production. Real Base mainnet transactions. |
export PAYDIRECT_API_KEY=pd_test_abc123...Option A — TypeScript SDK (backend)
npm install @paydirectv2/sdkimport { PayDirectClient } from "@paydirectv2/sdk";
const client = new PayDirectClient({
apiKey: process.env.PAYDIRECT_API_KEY!, // pd_test_... or pd_live_...
baseUrl: "https://www.paydirect.com/api/v1",
});Option B — React Widget (frontend, zero config)
npm install @paydirectv2/react-widgetsimport { PayDirectProvider, CheckoutWidget } from "@paydirectv2/react-widgets";
export default function Checkout() {
return (
<PayDirectProvider apiKey={process.env.NEXT_PUBLIC_PAYDIRECT_API_KEY!}>
<CheckoutWidget amount="15.00" description="Order #ORD_123" />
</PayDirectProvider>
);
}Drops a crypto + Stripe checkout into any React app. No styling library required. Widget docs
Option C — Python (from source)
pip install git+https://github.com/paydirect/paydirect.git#subdirectory=packages/sdk-pythonPyPI release coming soon. The source SDK in the GitHub repo is stable and used in production.
Using the SDK
const { payment, receivingAddress, paymentUrl } = await client.createPayment({
tokenSymbol: "USDC",
amount: "15.00",
merchantWallet: "0xYourBaseAddress...",
description: "First test payment",
metadata: { orderId: "TEST_001" },
});
console.log("Payment ID:", payment.id);
console.log("Status:", payment.status); // "pending"
console.log("Send USDC to:", receivingAddress); // workspace wallet
console.log("Hosted checkout URL:", paymentUrl); // share with the payer
console.log("Gross:", payment.grossAmount); // "15.00"
console.log("Fee:", payment.feeAmount); // "0.225"
console.log("Net to you:", payment.netAmount); // "14.775"Using cURL
curl -X POST https://www.paydirect.com/api/v1/payments \
-H "Authorization: Bearer pd_test_abc123..." \
-H "Content-Type: application/json" \
-d '{
"tokenSymbol": "USDC",
"amount": "15.00",
"merchantWallet": "0xYourBaseAddress..."
}'pd_test_ key, the payment instantly progresses through the full lifecycle (pending → detected → confirmed → forwarded) with no real blockchain transaction. You can verify it immediately.const result = await client.verifyPayment(payment.id);
console.log("Verified:", result.verified); // true
console.log("Status:", result.payment.status); // "forwarded"verified: true means the payment status is forwarded — the net amount has been sent to your merchant wallet on Base.
- Integrate payments into your application — server-side, webhooks, and error handling
- Set up webhooks — receive real-time notifications on payment status changes
- Understand environments — sandbox vs live behavior
- Learn about fees — how settlement and fee deduction work
