DPay for Shopify
Take Easypaisa, JazzCash, NayaPay and bank-transfer payments on a Shopify store, verified automatically, straight into your own account. Install the app, paste one key, add one payment method and one block — done.
How it works on Shopify
Shopify only lets approved payment partners replace its checkout, so DPay does not pretend to be a card gateway. Instead it uses the door Shopify leaves open for bank transfers, and automates everything behind it:
- At checkout the customer picks your manual payment method — you name it *Bank transfer / Easypaisa / JazzCash*. Shopify creates the order as *Payment pending*, as it does for any bank transfer.
- The instant the order exists, DPay creates a checkout for it: the exact amount, a reference like
DPAY-8F4K29, your receiving account. - On the thank-you page — the page the customer is already on — a DPay block says *Pay PKR 4,750 by bank transfer* with a button to the DPay checkout. The same block sits on the order status page, so a customer who comes back from the confirmation email later can still pay.
- The customer pays from Easypaisa, JazzCash or their bank app into your account. DPay verifies the transfer from your bank's own alert and tells the app, which marks the Shopify order Paid, adds the reference, bank and amount to the order note, and tags it
dpay-paid.
Nothing about the money passes through the app, Shopify or DPay: it lands in your own NayaPay or Meezan account.
Before you start
- A DPay account at dpay.com.pk with a receiving account (NayaPay recommended: alerts arrive in seconds) and the Gmail inbox its alerts land in connected under Integrations.
- An API key from Developers. A test key (
dpay_test_sk_…) runs the whole flow without moving money; a live key (dpay_live_sk_…) needs a paid plan and takes real payments. - Your store's currency set to PKR (Settings → General → Store currency). Orders in any other currency are left alone.
- Checkout extensibility — every store created since 2023 has it; older stores switch under Settings → Checkout.
Install and connect
- Install the app from the link DPay gave you (during the pilot the app is installed by DPay; a Shopify App Store listing follows).
- Open the app from your Shopify admin (Apps → DPay). Paste the API key, keep or change the payment-method name, and press Connect. The page shows *Connected · your business* and *Webhook · Registered*.
Set up in Shopify (once, about five minutes)
- Settings → Payments → Manual payment methods → Add manual payment method → Create custom payment method. Name it *exactly* as on the app page (default: *Bank transfer / Easypaisa / JazzCash*). In *Additional details* write what customers see at checkout, for example: *Pay from Easypaisa, JazzCash, NayaPay or any bank app on the next page. Your order is confirmed automatically — no screenshot needed.* In *Payment instructions* (shown on the thank-you page by Shopify itself) write: *Press the Pay button below.* Save.
- Settings → Checkout → Customize. Open the Thank you page from the page picker at the top, Add app block → DPay — pay by bank transfer, drag it to the top, save. Do the same on the Order status page.
- Optional: Settings → Notifications → Order confirmation, add the pay link so the email carries it too:
{% if order.metafields.dpay.checkout_url != blank %}
<p><a href="{{ order.metafields.dpay.checkout_url }}">Pay {{ order.total_price | money }} by bank transfer</a>
— reference {{ order.metafields.dpay.reference }}</p>
{% endif %}Try it before going live
With a test key, place an order on your own store and pick the bank-transfer method. On the thank-you page the DPay block appears within a second or two with the amount and reference. Press Pay — you land on DPay's checkout. Nothing to send: in the DPay dashboard, Integrations → Inbox simulator, deliver an alert for that payment, and watch the thank-you page turn to *Payment received* and the Shopify order to Paid. Then swap in the live key.
How an order moves
| What happens | Shopify order |
|---|---|
| Customer picks the bank-transfer method | Payment pending, tag dpay-awaiting, note with the DPay reference and amount |
| Transfer verified | Paid (a sale transaction for the outstanding amount), tag dpay-paid, note with the bank and amount |
| DPay finds two transfers that could both be this payment | tag dpay-review, note asking you to pick one in the DPay dashboard; the order updates itself when you do |
| Checkout window closed without a transfer | stays pending; the block says so, and a late transfer honoured in DPay still marks the order paid |
| Refund or dispute at DPay | note on the order; refunds are transfers you make from your own bank, record them in Shopify as usual |
A customer who returns to the order status page while the checkout is still open gets the same DPay checkout and reference; a new one is created only if it closed.
Where things are
- Apps → DPay → Payments: every order with a DPay checkout, its status, and *Check with DPay* for the impatient.
- On the order: the note carries every step; metafields
dpay.reference,dpay.checkout_url,dpay.session_id,dpay.statusare there for templates and reports; tagsdpay-awaiting/dpay-paid/dpay-reviewfor filters and Flow. - In DPay: the payment itself, with the bank alert it was matched to, under Payments.
Questions
Why is DPay not simply a payment option like a card? Because Shopify's Payments Apps API is open only to approved payment partners with a revenue-share agreement; every bank-transfer solution on Shopify uses a manual payment method for this reason. DPay's contribution is what happens after the order: the checkout, the verification, the automatic *Paid*.
Does it work with Shopify's own "Bank Deposit" method? Yes — that is just a manual method with a fixed name. Name yours anything; put the same name in the app.
Can the customer pay from the confirmation email? Yes, with the optional template snippet above; the block on the order status page works without it.
Something is wrong. Write to support@dpay.com.pk with the order number and the DPay reference.