Payment Gateway for Shopify Store in Pakistan — Complete Setup Guide

Payment Gateway for Shopify Store in Pakistan — Complete Setup Guide

Shopify does not natively support JazzCash, Easypaisa or Raast QR. If your Shopify store sells to Pakistani customers, you need a local gateway that integrates via Shopify's manual payment method or a custom checkout redirect. Here is the clean way to do it.

The architecture

Shopify treats external gateways as either manual payment methods (customer places the order, you redirect them to your gateway to complete payment) or via a native payment-app integration (which Shopify restricts to approved providers). For Pakistan, the practical approach today is the redirect flow: order placed → redirect to SwichPay hosted checkout → payment success → webhook updates Shopify order status.

Step 1 — Create a SwichPay merchant account

Sign up at /merchant/register. Grab your API key and secret from the dashboard.

Step 2 — Enable Shopify's manual payment method

In your Shopify admin → Settings → Payments → Manual payment methods → Create custom payment method. Name it "Pay with JazzCash / Easypaisa / Raast QR" and in the additional details paste short instructions telling the customer they will be redirected after order placement.

Step 3 — Wire up the redirect

Add a tiny Shopify script or a thank-you-page redirect that sends the customer to your SwichPay hosted checkout URL with the order ID as the reference. The SwichPay API docs show the exact payload — one POST to /api/v1/payments/initiate returns a redirect URL you send the customer to.

Step 4 — Handle the IPN

SwichPay posts a signed IPN to your server when the payment clears. Your IPN handler calls Shopify's admin API to mark the order as paid. You can build this in Shopify Functions, a tiny PHP/Node endpoint, or a no-code tool like n8n or Pipedream.

Step 5 — Test, then go live

Use SwichPay's sandbox for the first ten test orders. Once an order appears as paid in Shopify automatically after a sandbox payment, flip to production keys.

Gotchas to avoid

  • Do not mark the order paid before you receive the IPN. Bad actors copy success URLs.
  • Verify the HMAC signature on every IPN — SwichPay sends it; your handler must check it before trusting the body.
  • Keep the reference ID on both sides (Shopify order number and SwichPay trx) so refund reconciliation is trivial.

Why SwichPay is the practical choice

Shopify doesn't natively know about Pakistani wallets — a focused gateway with a stable redirect flow is what makes the store usable here. SwichPay gives you a single integration that covers JazzCash wallet, Easypaisa wallet and Raast bank QR — the three rails that 90% of Pakistani customers actually use. You get:

  • Hosted checkout — a ready-made payment page so you do not have to build the payment form, maintain PCI-sensitive code or handle method logos yourself.
  • Instant payment notifications (IPN) delivered with HMAC signatures so your server reconciles automatically the moment money clears.
  • Sub-merchant accounts — run multiple websites, apps or brands under one onboarded SwichPay profile without a fresh application each time.
  • Agent program for anyone who wants to resell the platform to their own merchant book and earn a cut.
  • Self-onboarding — sign up and get test keys within minutes, no three-week banker meetings.

If you are comparing options for accepting online payments, start a free account at SwichPay, hit the sandbox for an hour, and judge by the integration experience itself.

Frequently asked questions

Does SwichPay have an official Shopify app?

A plugin is in the pipeline. For now, the manual payment method + redirect approach above gives you the same experience and takes an afternoon to wire up.

Can customers pay with Easypaisa on Shopify through SwichPay?

Yes. The SwichPay hosted checkout shows every enabled method — JazzCash, Easypaisa, Raast QR — so your Shopify customer picks whichever they prefer at payment time.

What happens when a customer cancels at the gateway?

They return to a cancel URL you configure — usually your checkout page with the cart intact so they can retry.

#shopify payment gateway pakistan#shopify jazzcash#shopify easypaisa#swichpay shopify

Start accepting payments with SwichPay

Open a merchant account, connect your website with one API and get notified the moment a customer pays.