Paynow failing on supabase

We are experiencing consistent transaction initiation failures when calling the Paynow InitiateTransaction endpoint. The request fails at the network layer with a connection reset by peer (OS error 104) , before any Paynow response payload is returned.

Error Details

Endpoint:
https://www.paynow.co.zw/interface/InitiateTransaction

Observed Error:

TypeError: error sending request for url
client error (Connect): Connection reset by peer (os error 104)

Runtime Stack Trace (excerpt):

at async mainFetch (deno_fetch.js)
at async fetchPaynow (index.ts:21)
at async Server.respond (http/server.ts)

Environment

  • Runtime: Supabase Edge Functions
  • Engine: Deno v2.1.4
  • Supabase Runtime: edge-runtime 1.70.0
  • Deployment Region: eu-west-3 (Europe)
  • Execution Context: Server-side (not browser)
  • TLS: Enabled (default Deno fetch)

Behaviour Observed

  • The TCP connection is reset by the remote peer (Paynow server) during request initiation.
  • No HTTP status code or response body is returned.
  • Error occurs before Paynow processes the transaction (no poll URL or reference generated).
  • Retrying the request produces the same error.

Expected Behaviour

  • Successful TCP/TLS handshake.

  • HTTP response from Paynow (success or validation error).

  • Ability to proceed to polling using the returned poll URL.

  • This is not an application-level error (no malformed payload response).

  • The error suggests:

    • Server-side connection termination
    • Firewall / geo-blocking
    • TLS incompatibility
    • Temporary Paynow infrastructure instability
  • The deployment region is outside Zimbabwe , which may be relevant if Paynow restricts inbound traffic.

Good day @Cyberwave

You need to request Supabase Support to whitelist *.paynow.co.zw(443) for edge function outbound connections.

May you also kindly share the full error log, not the snippet

1 Like

Did you try to test the payment gate way of paynow locally on your pc. If you did and the payment went through then the paywall or firewall is rejecting outbound requests from the supabase server. If you fail at all options try routing with a vps with static ip address like digital ocean. It will be supabase edge functions - vps - paynow

im meeting the same error, does paynow reject supabase or something

Hi Team,

Regarding issue raised by @Cyberwave , i’m also facing, I have performed the local test as suggested:

Local PC Test: Successful. The payment initiation works perfectly from my local Zimbabwean IP.
Production (Supabase) Test: Fails consistently with Connection reset by peer (os error 104) .

Technical Confirmation from Supabase:I have verified with Supabase technical documentation that Supabase Edge Functions do not have an outbound firewall. They are open by default on port 443. The “Connection Reset” error indicates that the Paynow server is terminating the TCP handshake when it detects a request from a foreign cloud IP range (Supabase uses dynamic global IPs).

Requested Integration Details:

  • Runtime: Deno (via Supabase Edge Functions)
  • Library: Standard fetch API / Paynow Node.js SDK
  • Endpoint: https://www.paynow.co.zw/Interface/InitiateTransaction
  • Error Log: Type Error: error sending request… client error (Connect): Connection reset by peer (os error 104)`

Request: Since Supabase uses a dynamic IP range, I cannot provide a single static IP for whitelisting. Could you please whitelist to allow API calls originating from international cloud data centers?

1 Like

@Breezy did you try routing with a vps, if you haven’t try vps routing. Proxy all Paynow API calls through your Contabo VPS rather than calling Paynow directly from Supabase Edge Functions. Your edge function hits your VPS endpoint, your VPS forwards to Paynow, returns the response. Since your VPS has a static IP, you can also formally request Paynow whitelist it via their integration support.
The flow would be:
Supabase Edge Function → VPS (static IP) → Paynow. The vps is the one that provides a static ip not Supabase. Ud expose a small internal proxy endpoint on your VPS — something like /proxy/paynow/initiate — that accepts your signed request, strips your internal auth, and forwards to paynow.co.zw/interface/InitiateTransaction. The edge function never talks to Paynow directly. My thinking, try and report back how would that go. You can try a contabo server its cheaper, you can ssh into it using root cmds or install portainer on the vps for a cleaner deployment via a user friendly ui.

2 Likes

Thanks I’m now routing with a vps and its working

So because of paynow limitations we have to pay for extra services to get paynow working. I’m about to go through the same setup. And this just causes problem. I’m going to use paynow for pan African African payments. By having an additional vps or whatever we just creating extra places where we have to maintain security.

Also on another note, why has the UI and UX for paynow not been updated in years? I remember 8 years ago seeing the same interface? Are you running on some old windows server env where the UI is limited?

Can we contribute as a community to help with the UI/UX?

Hie bryan i do not work at paynow but im just a fellow developer helping people on what i went through and what i found helpful in my journey with paynow. I think they have to fix their outbound and inbound firewall to accept foreign ip addresses. By foreign i mean dynamic ip addresses from outside of Zimbabwe. Thier webside needs a revamp for sure. For now yes we have to stick to a vps solution when we host outside of ZIMBABWE

Paynow API Access – Supabase IP Restrictions & Recommended Workaround

Please note that some Supabase IP addresses used by Paynow integrations have been blocked due to abuse by other merchants.

Because platforms like Supabase and Firebase use shared IP infrastructure, certain merchants were making excessive or improper requests (e.g., continuously polling transaction status), which led to those shared IPs being blocked.

As a result, Paynow is unable to selectively unblock individual users on those shared IPs.

Recommended Workaround

To avoid this issue, you can use one of the following approaches:

  1. Use a dedicated static IP address, or
  2. Proxy all Paynow API calls through your own VPS (e.g., Contabo or any hosting provider)

Suggested Flow

Supabase Edge Function → VPS (Static IP) → Paynow API

  • Your Supabase Edge Function should call your VPS endpoint
  • Your VPS then forwards the request to Paynow
  • The response is returned back through the same path

The key point is that the VPS provides a static, dedicated IP, unlike Supabase.

Important Clarification

  • Only IPs that have shown abusive behavior are blocked
  • Paynow does not block international IPs by default
  • The restriction is based on traffic patterns and misuse, not location