Prerequisites
- Node.js 18 or higher
- A Pulsarpay agent key (
ag_live_...)
Don’t have an agent key yet? Register your agent first — the key is returned only once at registration.
Install the SDK
Initialize the client
Register an agent
Run this once during onboarding. Save the returnedapiKey immediately — it is not retrievable afterward.
Core operations
Create a charge
Debit a user’s balance. An idempotency key is auto-generated if you don’t provide one.Each currency has a separate balance. The charge is deducted from the user’s balance in the specified currency — the user must have sufficient funds in that currency.
View earnings
Each currency has its own independent balance. The response returns one entry per currency.
Error handling
The SDK provides specific error classes for each failure scenario.| Error class | Status |
|---|---|
PulsarpayBadRequestError | 400 |
PulsarpayUnauthorizedError | 401 |
PulsarpayInsufficientFundsError | 402 |
PulsarpayNotFoundError | 404 |
PulsarpayConflictError | 409 |
PulsarpayNetworkError | Network / timeout |
Next steps
API reference
Full endpoint documentation with request and response schemas.
Create charges
Detailed options for charge creation and idempotency.
Earnings
Track net earnings and transaction history.
Withdraw
Transfer USDC to a Solana wallet or USD to a PayPal account.

