3

It seems my website got blocked on mainnet-beta and I can't process Solana Pay payments anymore.

I have a website accepting payments through Solana Pay. During the process of payment, the website renders the QR code and starts pooling data from mainnet-beta checking for the payment reference every second. When the payment reference is found on chain, the pooling stops as the payment is complete.

This stopped working a while ago.

Now, the RPC request returns a 403 and the following response:

{
  "jsonrpc": "2.0",
  "error": {
    "code": 403,
    "message": "Access forbidden, contact your app developer or [email protected]."
  },
  "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

What I found is that the request goes through when removing the origin header from the request which would indicate my website is blocked.

From the documentation:

*The public RPC endpoints are not intended for production applications. Please use dedicated/private RPC servers when you launch your application, drop NFTs, etc. The public services are subject to abuse and rate limits may change without prior notice. Likewise, high-traffic websites may be blocked without prior notice.

Requiring private RPC servers from merchants is a horrible user experience. Shouldn't the cost of payment infrastructure be covered with the transaction fee?

Anyway, what are my options? This is not a high-volume website, it's a tiny experimental project that can't afford a private RPC server.

1 Answer 1

2

For anyone else dealing with the same issue, I ended up subscribing to Alchemy (referral link) who at the time of writing provide free-tier access to the mainnet. The free-tier offers 300M compute units that's enough for ~10M getSignaturesForAddress RPC calls.

A few additional things had to be implemented in order to make Solana Pay work:

  • an RPC proxy (so that Alchemy's access token is hidden from the outside world) and
  • exponential backoff when pooling (so that it doesn't break the bank and tries to stay within the free-tier limit).

I still maintain requiring private RPC servers from merchants is a horrible user experience. The RPC calls required for Solana Pay to work should be available for free on the https://api.mainnet-beta.solana.com.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.