BigCommerce OAuth app starter for creating MakePay payment links from BigCommerce orders and reconciling paid MakePay webhooks back to BigCommerce.
This starter targets the app/OAuth path first. A fully native BigCommerce payment method may require additional BigCommerce payment-partner approval, so this repo focuses on the viable payment-link flow merchants can test as a draft app.
- BigCommerce install, load, and uninstall callbacks
- BigCommerce OAuth token exchange
- Store credential abstraction with an in-memory implementation for local development
- Order-created webhook registration and handler
- MakePay payment-link creation from BigCommerce order totals
- MakePay webhook signature verification and paid-order reconciliation
- Optional BigCommerce order status updates after link creation and payment
- Admin endpoint for manually generating a payment link for an order
Copy .env.example to .env and set:
BIGCOMMERCE_CLIENT_IDBIGCOMMERCE_CLIENT_SECRETBIGCOMMERCE_JWT_SECRETPUBLIC_APP_URLMAKEPAY_KEY_IDMAKEPAY_KEY_SECRETMAKEPAY_WEBHOOK_SECRETADMIN_TOKEN
Optional status IDs:
BIGCOMMERCE_PENDING_STATUS_IDBIGCOMMERCE_PAID_STATUS_ID
Leave status IDs empty if you only want the app to store payment-link mappings and avoid changing order statuses.
npm ci
npm run validate
npm run devRegister these callback URLs in a BigCommerce draft app:
- Auth callback:
https://your-app.example/auth - Load callback:
https://your-app.example/load - Uninstall callback:
https://your-app.example/uninstall
Configure MakePay webhooks to send signed events to:
https://your-app.example/webhooks/makepay
The included in-memory store is for local development and tests only. Replace MemoryStoreRepository with a database-backed implementation before production.