Scan your whole stack
From OX Research Newsroom
Are you using @solana/pay?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v1.2.0
@solana/pay was last scanned on 2 Dec 2026 at version 1.2.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 1.2.0 LATEST | 2 Dec 2026 | No rules fired |
Findings for v1.2.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 1.2.0; other versions have their own rules, not their own score.
0 CRITICAL 0 HIGH 1 MEDIUM 0 LOW
The publisher’s own README, as collected from the registry.
@solana/pay is a JavaScript library for facilitating commerce on Solana by using a token transfer URL scheme. The URL scheme ensures that no matter the wallet or service used, the payment request must be created and interpreted in one standard way.
v1.1 — This version is built on
@solana/kitv8 and supports legacy, v0, and v1 transactions (see Transaction versions). If you're migrating from v0.2 (which used@solana/web3.js), see the Migration Guide below.
npm install @solana/pay @solana/kit
| Package | Version |
|---|---|
@solana/kit |
^8.6.0 |
createTransfer / validateTransfer)| Package | Version |
|---|---|
@solana-program/system |
^0.16.0 |
@solana-program/token |
^0.18.0 |
@solana-program/token-2022 |
^0.20.0 |
@solana-program/memo |
^0.16.0 |
For the receiving side — encode payment URLs, generate QR codes, find and validate payments. No signer needed.
import { address } from '@solana/kit';
import { createMerchantClient } from '@solana/pay';
const merchant = createMerchantClient({
rpcUrl: 'https://api.devnet.solana.com',
});
const recipient = address('MERCHANT_WALLET_ADDRESS');
const reference = address('UNIQUE_REFERENCE_ADDRESS');
// Encode a payment URL and show as QR code
const url = merchant.pay.encodeURL({ recipient, amount: 1, reference });
const qr = merchant.pay.createQR(url);
// After customer pays, find and validate the transaction
const found = await merchant.pay.findReference(reference);
await merchant.pay.validateTransfer(found.signature, { recipient, amount: 1, reference });
For the paying side — parse payment URLs, create transfers, and send transactions. Includes a transaction planner/executor so you don't need to manually compose transactions.
import { createWalletClient } from '@solana/pay';
const wallet = createWalletClient({
rpcUrl: 'https://api.devnet.solana.com',
payer: myWalletSigner,
});
// Parse a Solana Pay URL and send the payment
const parsed = wallet.pay.parseURL(url);
const instructions = await wallet.pay.createTransfer({
recipient: parsed.recipient,
amount: parsed.amount,
});
await wallet.sendTransaction(instructions);
Use createSolanaPayClient when you need both merchant and wallet methods on one client:
import { createSolanaPayClient } from '@solana/pay';
const client = createSolanaPayClient({
rpcUrl: 'https://api.devnet.solana.com',
payer: myWalletSigner,
});
const url = client.pay.encodeURL({ recipient, amount: 1 });
const instructions = await client.pay.createTransfer({ recipient, amount: 1 });
await client.sendTransaction(instructions);
Use the functions directly without a client:
import { address, createSolanaRpc } from '@solana/kit';
import { encodeURL, createTransfer, findReference, validateTransfer, createQR } from '@solana/pay';
const rpc = createSolanaRpc('https://api.devnet.solana.com');
const recipient = address('MERCHANT_WALLET_ADDRESS');
const url = encodeURL({ recipient, amount: 1 });
const qr = createQR(url);
const instructions = await createTransfer(rpc, sender, { recipient, amount: 1 });
const signatureInfo = await findReference(rpc, reference);
await validateTransfer(rpc, signatureInfo.signature, { recipient, amount: 1 });
Compose with other kit plugins for full control:
import { createClient } from '@solana/kit';
import { solanaRpcConnection } from '@solana/kit-plugin-rpc';
import { payerFromFile } from '@solana/kit-plugin-signer';
import { solanaPayMerchant, solanaPayWallet } from '@solana/pay';
const client = await createClient()
.use(solanaRpcConnection({ rpcUrl: 'https://api.devnet.solana.com' }))
.use(payerFromFile('~/.config/solana/id.json'))
.use(solanaPayMerchant())
.use(solanaPayWallet());
const url = client.pay.encodeURL({ recipient, amount: 1 });
const instructions = await client.pay.createTransfer({ recipient, amount: 1 });
encodeURL(fields) — Encode a transfer or transaction request into a solana: URL.parseURL(url) — Parse a solana: URL into its fields.createQR(url, size?, background?, color?) — Create a QR code from a Solana Pay URL.createTransfer(rpc, sender, fields) — Create transfer Instruction[] for a payment.findReference(rpc, reference, options?) — Find a transaction signature by reference address.validateTransfer(rpc, signature, fields, options?) — Validate that a confirmed transaction matches the expected payment.fetchTransaction(rpc, account, link, options?) — Fetch a transaction from a transaction request endpoint.createMerchantClient({ rpcUrl }) — Merchant client with RPC and merchant plugin. No signer needed.createWalletClient({ rpcUrl, payer }) — Wallet client with RPC, payer, transaction planner/executor, and wallet plugin.createSolanaPayClient({ rpcUrl, payer }) — Combined client with all merchant + wallet methods.solanaPayMerchant() — Merchant plugin: encodeURL, createQR, createQROptions, findReference, validateTransfer.solanaPayWallet() — Wallet plugin: parseURL, createTransfer, fetchTransaction.Payment requests can be encoded as a URL according to the scheme, scanned using a QR code, sent and confirmed by the wallet, and discovered by the app.
With a Solana Pay button, you could integrate an embeddable payment button that can be added to your existing app.
Payment requests could be encoded as a deep link. The app prepares a payment request, and passes control to the wallet. The wallet signs, sends, and confirms it, or cancels the request and passes control back to the app.
A Solana Pay transaction request URL describes an interactive request for any Solana transaction. The parameters in the URL are used by a wallet to make an HTTP request to compose any transaction.
A Solana Pay transfer request URL describes a non-interactive request for a SOL or SPL Token transfer. The parameters in the URL are used by a wallet to directly compose the transaction.
The library supports legacy, v0, and v1 transactions:
validateTransfer validates transfers landed in any of the three formats.fetchTransaction decodes merchant-supplied transactions in any of the three formats, and preserves a v1 transaction's message-level config (compute unit limit, priority fee, loaded accounts data size limit, heap size) through the fee payer swap.buildTransaction builds v0 by default; pass { version: 1, config: { ... } } to build a v1 transaction.The v1 format (SIMD-0385) raises the transaction size cap from 1232 to 4096 bytes and moves compute unit and data size limits from ComputeBudget instructions into a message-level config. Note that a v1 transaction with no computeUnitLimit in its config is budgeted zero compute units, so always set one when building v1 transactions. v1 requires the txv1aq4pp281K9um3tnPgkfX8UqtFT6wcVW3hNezGLL feature gate to be active on the target cluster (Agave v4.2+); legacy and v0 remain fully supported.
Breaking changes:
v0.2 (@solana/web3.js) |
v1.0 (@solana/kit) |
|---|---|
PublicKey |
Address (branded string — use address() to create, === to compare) |
Connection |
Rpc from @solana/kit |
BigNumber (from bignumber.js) |
number — plain JS number for human-readable amounts |
createTransfer() returns Transaction |
Returns Instruction[] — compose with kit's pipe() + createTransactionMessage() |
sender: PublicKey |
sender: TransactionSigner |
@solana/spl-token |
@solana-program/token |
Buffer |
Uint8Array / TextEncoder |
Typical migration:
- import { Connection, PublicKey, Transaction } from '@solana/web3.js';
+ import { address, createSolanaRpc, pipe, createTransactionMessage,
+ setTransactionMessageFeePayer, appendTransactionMessageInstructions,
+ setTransactionMessageLifetimeUsingBlockhash, compileTransaction,
+ signTransaction, getBase64EncodedWireTransaction } from '@solana/kit';
- const connection = new Connection('https://api.devnet.solana.com');
+ const rpc = createSolanaRpc('https://api.devnet.solana.com');
- const recipient = new PublicKey('...');
+ const recipient = address('...');
- const transaction = await createTransfer(connection, sender.publicKey, { recipient, amount });
- transaction.feePayer = sender.publicKey;
- transaction.recentBlockhash = (await connection.getLatestBlockhash()).blockhash;
+ const instructions = await createTransfer(rpc, sender, { recipient, amount });
+ // Compose transaction using kit pipe() pattern
The Solana Pay JavaScript SDK is open source and available under the MIT License. See the LICENSE file for more info.
Subject to the foregoing, the Terms of Service available at solana.com/tos
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.