Blindpay SDK
A TypeScript SDK for interacting with the Blindpay API. This SDK provides a simple interface to manage instances, payouts, receivers, bank accounts, and more.
Installation
npm install blindpay
Quick Start
import { Blindpay } from "blindpay";
const blindpay = new Blindpay("your-api-key");
const blindpayWithInstance = new Blindpay("your-api-key", "your-instance-id");
Services
API Keys
Manage API keys for your instances.
const response = await blindpay.apiKeys.createApiKey({
name: "My API Key",
expires_at: "2025-12-31T23:59:59Z",
});
const keys = await blindpay.apiKeys.getApiKeys();
const key = await blindpay.apiKeys.getApiKey("ap_123456789012345");
await blindpay.apiKeys.deleteApiKey("ap_123456789012345");
Available
Check available countries, currencies, and banking rails.
const countries = await blindpay.available.getAvailableCountries();
const currencies = await blindpay.available.getAvailableCurrencies("US");
const bankDetails = await blindpay.available.getBankDetails("wire");
const rails = await blindpay.available.getAvailableRails();
Bank Accounts
Manage bank accounts for receivers.
const bankAccount = await blindpay.bankAccounts.createBankAccount(
"rc_123456789012345",
{
account_number: "1234567890",
routing_number: "021000021",
account_type: "checking",
}
);
const accounts = await blindpay.bankAccounts.getBankAccounts(
"rc_123456789012345"
);
const account = await blindpay.bankAccounts.getBankAccount(
"rc_123456789012345",
"ba_123456789012345"
);
await blindpay.bankAccounts.deleteBankAccount(
"rc_123456789012345",
"ba_123456789012345"
);
Instance Management
Manage your instances and their members.
const updated = await blindpay.instances.updateInstance({
name: "Updated Instance Name",
webhook_url: "https://your-webhook.com/endpoint",
});
await blindpay.instances.deleteInstance();
const members = await blindpay.instances.getInstanceMembers();
Onboarding
Handle the onboarding process for new instances.
await blindpay.onboardings.upsertBusinessDetails({
legal_name: "Example Corp",
tax_id: "123456789",
address: {
street: "123 Main St",
city: "San Francisco",
state: "CA",
postal_code: "94105",
country: "US",
},
});
const profile = await blindpay.onboardings.getBusinessProfile();
await blindpay.onboardings.startKYB();
await blindpay.onboardings.completeOnboarding();
Payouts
Manage and track payouts.
const payout = await blindpay.payouts.createPayout({
amount: "1000",
currency: "USD",
receiver_id: "rc_123456789012345",
chain_id: 1,
token_address: "0x...",
});
const payouts = await blindpay.payouts.retrievePayouts();
const payoutDetails = await blindpay.payouts.retrievePayout(
"po_123456789012345"
);
const tracking = await blindpay.payouts.retrievePayoutTrack(
"po_123456789012345"
);
Quotes
Get quotes and FX rates.
const quote = await blindpay.quotes.createQuote({
source_currency: "USD",
target_currency: "EUR",
source_amount: "1000",
});
const rate = await blindpay.quotes.getFXRate({
source_currency: "USD",
target_currency: "EUR",
});
Receivers
Manage payment receivers.
const receiver = await blindpay.receivers.createReceiver({
name: "John Doe",
email: "john@example.com",
type: "individual",
});
const receivers = await blindpay.receivers.getReceivers();
const receiverDetails = await blindpay.receivers.getReceiver(
"rc_123456789012345"
);
await blindpay.receivers.updateReceiver("rc_123456789012345", {
name: "John Smith",
email: "john.smith@example.com",
});
await blindpay.receivers.deleteReceiver("rc_123456789012345");
Error Handling
All API calls return a response object containing either data or error:
const response = await blindpay.payouts.retrievePayout("po_123456789012345");
if (response.error) {
console.error("Error:", response.error.message);
} else {
console.log("Payout:", response.data);
}
TypeScript Support
This SDK is written in TypeScript and includes type definitions for all API responses and request parameters.
Development
Building
npm run build
Run development
npm run dev
Support
For support, please contact support@blindpay.com or visit our documentation at https://docs.blindpay.com.