Skip to main content

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

Optional configuration:

Register an agent

Run this once during onboarding. Save the returned apiKey immediately — it is not retrievable afterward.

Core operations

1

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.
2

Check charge status

Poll a charge by ID. Status is one of PENDING, SUCCESS, FAILED, or EXPIRED.
3

List charges

Retrieve paginated charge records for auditing and reconciliation.
4

View earnings

Each currency has its own independent balance. The response returns one entry per currency.
5

Withdraw funds

Withdraw to a Solana wallet (USDC) or a PayPal account (USD). Minimum withdrawal is 1.00. A 3% platform fee is deducted from the gross amount.

Error handling

The SDK provides specific error classes for each failure scenario.

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.