Getting Started with PayDirect
Accept USDC, ETH, and ADAO payments on Base mainnet in under 10 minutes. This guide walks you through account setup, API key generation, and creating your first payment.
1
Create Your Account
Sign up with GitHub OAuth
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.
2
Get Your API Key
Sandbox key for testing, live key for production
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...3
Install the SDK
TypeScript or Python
TypeScript
npm install @paydirect/sdkPython
pip install paydirectInitialize the Client
import { PayDirectClient } from "@paydirect/sdk";
const client = new PayDirectClient({
apiKey: process.env.PAYDIRECT_API_KEY, // pd_test_abc123...
baseUrl: "https://paydirect.com/api/v1",
});4
Create Your First Payment
Accept 15 USDC on Base
Using the SDK
const { payment, receivingAddress } = 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("Gross:", payment.gross_amount); // "15.00"
console.log("Fee:", payment.fee_amount); // "0.075"
console.log("Net to you:", payment.net_amount); // "14.925"Using cURL
curl -X POST https://paydirect.com/api/v1/payments \
-H "Authorization: Bearer pd_test_abc123..." \
-H "Content-Type: application/json" \
-d '{
"tokenSymbol": "USDC",
"amount": "15.00",
"merchantWallet": "0xYourBaseAddress..."
}'Sandbox mode: With a
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.5
Verify the Payment
Confirm settlement before fulfilling the order
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.
Next Steps
- 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
