🚀 Launch Week Day 4:Introducing the Alert Details Page: A Better Way to Explore Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

stakefy-x402-client

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stakefy-x402-client

Client SDK for Stakefy x402 - 0.1% fee Solana payment facilitator

latest
Source
npmnpm
Version
1.0.5
Version published
Weekly downloads
2
-77.78%
Maintainers
1
Weekly downloads
 
Created
Source

Stakefy x402 Client SDK

Client SDK for Stakefy x402 - The best Solana payment facilitator with only 0.1% fees.

Installation

npm install stakefy-x402-client

Quick Start

import { StakefyX402Client } from 'stakefy-x402-client';
import { Keypair } from '@solana/web3.js';

// Initialize client
const client = new StakefyX402Client({
  facilitatorUrl: 'https://stakefy-x402-production.up.railway.app',
  merchantId: 'your_merchant_id'
});

// Create payment session
const session = await client.createPayment({
  amount: 10,           // 10 USDC
  reference: 'order_123'
});

console.log('Pay to:', session.depositAddress);
console.log('Amount:', session.amount + session.feeAmount, 'USDC');

// Pay with wallet
const payerWallet = Keypair.fromSecretKey(/* your key */);
const signature = await client.payWithWallet(session, payerWallet);

// Verify payment
const status = await client.verifyPayment(session.sessionId);
console.log('Payment status:', status.isPaid ? 'Completed' : 'Pending');

Features

  • âś… 0.1% fees (10x cheaper than competitors)
  • âś… USDC payments on Solana
  • âś… Simple API
  • âś… TypeScript support
  • âś… Automatic retries

API Reference

createPayment(options)

Create a new payment session.

Parameters:

  • amount (number): Payment amount in USDC
  • reference (string): Your order/transaction reference
  • metadata (object, optional): Additional data

Returns: Payment session with deposit address

payWithWallet(session, payerKeypair)

Send payment from a Solana wallet.

Parameters:

  • session: Payment session from createPayment
  • payerKeypair: Solana keypair with USDC

Returns: Transaction signature

verifyPayment(sessionId)

Check payment status.

Parameters:

  • sessionId: Session ID from createPayment

Returns: Payment status and verification

getPaymentStatus(sessionId)

Get full payment session details.

  • GitHub
  • Documentation
  • Live API
  • Merchant SDK

License

MIT

Keywords

solana

FAQs

Package last updated on 02 Nov 2025

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