Developers / Shopify

Shopify integration

Starter files live in plugins/shopify-aurapay/create invoices with create-invoice.mjs, mark paid with worker.js.

  1. AuraPay key: Services → API. Set webhook URL to your deployed worker and the same secret.
  2. Shopify custom app: Admin API scopes including write_orders. Note shop domain + access token.
  3. Create invoice when the customer is ready to pay:
    AURAPAY_API_KEY=apk_live_... \
    node create-invoice.mjs --order 5678901234 --amount 25 --currency USDT
    Redirect the customer to the returned checkoutUrl.
  4. Deploy worker.js (Cloudflare / Vercel) with env: AURAPAY_WEBHOOK_SECRET, SHOPIFY_SHOP, SHOPIFY_ADMIN_TOKEN.

API create body

POST https://api.aurapayglobal.com/api/v1/invoices
{
  "amount": 25,
  "currency": "USDT",
  "externalId": "5678901234",
  "metadata": { "platform": "shopify" }
}