SenddySenddy Docs

Quickstart

Get your first Senddy integration running in 5 minutes.

Install the SDK

npm install @senddy/sdk

Initialize the client

import { SenddySDK } from '@senddy/sdk';

// The SDK connects to the Senddy system
const senddy = new SenddySDK({
  api_key: 'API_KEY'
});

Resolve a username

Look up a Senddy address from a username:

const response = await fetch('/api/username/alice');
const { senddyAddress } = await response.json();

console.log(senddyAddress); // "senddy1..."

Check username availability

const response = await fetch('/api/username/check?username=alice');
const { available } = await response.json();

console.log(available); // true or false

The simplest integration: redirect your customer to a Senddy pay link.

const payUrl = `https://senddy.com/pay/${yourUsername}?amount=50&memo=Order%20123`;

// Redirect customer
window.location.href = payUrl;

The customer completes the payment on Senddy, and funds arrive in your Senddy account instantly.

Create a deposit

For programmatic deposits, use the SDK to construct deposit transactions:

import { SenddySDK, encodePoolV3DepositWithPermit2Calldata } from '@senddy/sdk';

// Encode a deposit transaction with Permit2
const calldata = encodePoolV3DepositWithPermit2Calldata({
  amount: BigInt(100e6), // 100 USDC (6 decimals)
  permit2Signature,
  permitData,
});

Validate a Senddy address

import { isValidSenddyAddress, decodeSenddyAddress } from '@senddy/sdk';

const isValid = isValidSenddyAddress('senddy1abc...');
const { publicKey } = decodeSenddyAddress('senddy1abc...');

Next steps

On this page