Skip to content
Transfer requests are the simplest form of Solana Pay integration. They create non-interactive payment URLs that wallets can use to directly compose and send transactions without requiring a server.

​Overview

A transfer request URL follows this format:
Examples on this page that use top-level await must run as ES modules. See Use ES Modules.

​Basic SOL Transfer

Create a simple SOL payment request:

​SPL Token Transfer

Create a USDC payment request:

​URL Parameters

​Required Parameters

​Recipient

The recipient’s Solana wallet address (base58-encoded):

​Optional Parameters

​Amount

Payment amount in user-friendly units (SOL or token units):
If omitted, the wallet will prompt the user to enter the amount.

​SPL Token

For token transfers, specify the mint address:

​Reference

Unique identifiers for tracking payments. Generate an address to use as a reference key:

​Label

Merchant or app name displayed to users:

​Message

Description of the payment:

​Memo

Onchain memo (publicly visible):

​QR Code Integration

Generate QR codes using the built-in createQR function:

​Payment Validation

​Using the Merchant Client

The simplest way to find and validate payments:

​Using Standalone Functions

​Watching for Payments (WebSocket)

The recommended approach — watchReference subscribes via WebSocket and resolves as soon as a matching transaction lands. No polling needed.

​Polling for Payments (HTTP fallback)

If WebSocket subscriptions aren’t available (e.g. some RPC providers), fall back to polling with findReference:

​Complete Example

Here’s a complete example with QR code generation and payment monitoring:

​Best Practices

​Security

  • Always validate payments server-side
  • Use unique references for each payment
  • Verify transaction amounts and recipients
  • Check for transaction success status

​User Experience

  • Show clear payment amounts and descriptions
  • Provide payment status updates
  • Handle wallet connection gracefully
  • Support both QR codes and direct links

​Error Handling

  • Handle wallet connection failures
  • Provide fallback for unsupported wallets
  • Show helpful error messages
  • Implement payment timeouts

​Common Use Cases

​Point of Sale

​Donations

​E-commerce Checkout