🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@solinkify/pay

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solinkify/pay

Solinkify Pay server-side SDK — hosted checkout sessions and ready-to-sign Solana payment transactions (USDC/USDT, on-chain fee split).

latest
npmnpm
Version
0.2.1
Version published
Weekly downloads
19
-88.76%
Maintainers
1
Weekly downloads
 
Created
Source

@solinkify/pay

Server-side SDK for Solinkify Pay — accept stablecoin payments (USDC / USDT on Solana) from any backend with a hosted checkout. Funds settle merchant-side with the fee split enforced on-chain (99% merchant); Solinkify never holds your money.

Already using WooCommerce, OpenCart, or PrestaShop? Use the ready-made plugins instead. Just need a button on a static site? Use the embeddable widget. This SDK is for custom backends.

Install

npm install @solinkify/pay

Node ≥ 20.19 (built-in fetch).

Quick start — hosted checkout

import { SolinkifyPay } from '@solinkify/pay';

const pay = new SolinkifyPay();

// 1. Create a session when the buyer checks out
const session = await pay.createCheckoutSession({
  merchantWallet: 'YOUR_SOLANA_WALLET',
  amount: 19.99,                    // in `currency` below
  currency: 'USD',                  // non-USD (EUR, IDR, ...) is FX-converted
  orderId: 'INV-1042',
  tokenMint: 'USDC',                // USDC | USDT (or a mint address)
  returnUrl: 'https://store.com/thanks',
  cancelUrl: 'https://store.com/cart',
});

// 2. Redirect the buyer
res.redirect(session.checkoutUrl);  // hosted page: connect wallet → pay

// 3. Confirm server-side (webhook-free polling or on the return redirect)
const record = await pay.getSession(session.sessionId);
if (record.status === 'paid') {
  // fulfil the order
}

The buyer pays on solinkify.com/checkout/<session> — wallet connect, amount and token pinned to the session, on-chain verification. Sessions expire automatically if unpaid.

API

MethodPurpose
createCheckoutSession(params)Create a hosted checkout session → { sessionId, checkoutUrl, expiresAt }
getSession(id)Read a session (status: pending / paid / expired)
verifySession(id, { buyerWallet, signature })Submit a payment proof for verification (used by custom checkout UIs)
listSessions(merchantWallet, limit?)Merchant's sessions, newest first
createPaymentTransaction(params)Advanced: ready-to-sign Solana transaction for embedded wallet UX

Advanced: embedded wallet UX

Skip the hosted page and build the payment into your own UI — the returned transaction already carries the on-chain fee split (99% merchant) and routes through the Solinkify DePIN relay network when available:

const tx = await pay.createPaymentTransaction({
  merchantWallet: 'MERCHANT_WALLET',
  buyerWallet: 'BUYER_WALLET',
  amount: 1.5,                      // token units (1.5 USDC)
  orderId: 'INV-1042',
  tokenMint: 'USDC',
});
// hand `tx` to the buyer's wallet to sign & send,
// then verifySession / your own confirmation flow

Configuration

new SolinkifyPay({ apiUrl: 'https://api.solinkify.com' }); // default

License

MIT © Solinkify

Keywords

solana

FAQs

Package last updated on 27 Jul 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts