PayzCore Docs

Shopify

Shopify app for USDT/USDC blockchain payment monitoring. Self-hosted Express.js app that integrates PayzCore with your Shopify store for stablecoin checkout.

Shopify Integration

The PayzCore Shopify app adds USDT/USDC blockchain monitoring as a payment method for your Shopify store. It's a self-hosted Express.js application that handles the Shopify OAuth flow and payment processing via PayzCore API.

How It Works

  1. Customer selects "Pay with USDT/USDC" at Shopify checkout.
  2. Redirected to your hosted PayzCore app (Express.js).
  3. App calls the PayzCore API and shows the wallet address, QR code, and amount.
  4. Customer sends stablecoins from their wallet.
  5. PayzCore sends a webhook to your app.
  6. App marks the Shopify order as paid via the Shopify API.
  7. Customer is redirected back to the Shopify confirmation page.

Architecture

Unlike WooCommerce/WHMCS plugins that run inside the platform, the Shopify app is a separate Express.js server you host yourself. It acts as a bridge between Shopify and PayzCore.

ComponentRole
Shopify StoreCustomer-facing storefront, sends orders to your app
Your Hosted App (Express.js)Bridge between Shopify and PayzCore. Handles OAuth, payment pages, and webhooks
PayzCore APIMonitors blockchain, sends payment status webhooks

Installation

1. Create a Shopify Custom App

  1. In Shopify admin: Settings > Apps and sales channels > Develop apps
  2. Create a new app
  3. Configure app scopes: read_orders, write_orders, read_products
  4. Note your API Key and API Secret

2. Deploy the App

Clone and deploy the Express.js app to your server:

git clone https://github.com/payzcore/shopify.git
cd shopify
npm install

Set environment variables on your hosting platform:

VariableDescription
SHOPIFY_API_KEYYour Shopify app API key
SHOPIFY_API_SECRETYour Shopify app API secret
PAYZCORE_API_KEYYour PayzCore project API key (pk_live_...)
PAYZCORE_WEBHOOK_SECRETYour PayzCore webhook secret (whsec_...)
APP_URLYour app's public URL (e.g., https://pay.yourstore.com)

The app calls GET /api/v1/config on startup to auto-detect available chains and tokens from your connected wallet. There is no need to set chain or token environment variables — the configuration is discovered automatically from the PayzCore API.

Hosting options: Any Node.js hosting works — Railway, Render, VPS, Docker, etc.

3. Install on Your Store

  1. Navigate to https://your-app-url.com/auth?shop=yourstore.myshopify.com
  2. Authorize the app
  3. The app registers itself as a payment method

4. Configure Webhook URL

In your PayzCore dashboard, set the webhook URL to:

https://your-app-url.com/webhooks/payzcore

Security

The app performs multiple layers of verification:

CheckPurpose
Shopify HMACVerifies requests come from Shopify (not spoofed)
PayzCore signatureVerifies webhooks come from PayzCore
Order amount matchEnsures payment amount matches Shopify order total
Nonce validationPrevents replay attacks during OAuth

Order Status Mapping

PayzCore EventShopify Action
payment.completedOrder marked as paid
payment.overpaidOrder marked as paid (note added)
payment.partialOrder stays pending
payment.expiredOrder cancelled

Troubleshooting

Payment method not appearing

  • Ensure the app is properly installed and authorized
  • Check that the app URL is accessible from the internet
  • Verify environment variables are set correctly

Webhooks not received

  • Confirm the webhook URL in PayzCore dashboard points to your app
  • Check your app server logs for incoming requests
  • Verify the app is running and accessible

OAuth errors

  • Ensure SHOPIFY_API_KEY and SHOPIFY_API_SECRET match your Shopify app credentials
  • Verify APP_URL matches the actual URL where the app is hosted

On this page