Directus endpoint extension for MakePay payment links, customers, bookkeeping invoices, and signed webhooks.
After installation, routes are mounted below /makepay:
POST /makepay/payment-linksGET /makepay/payment-links/:uidPOST /makepay/customersPOST /makepay/bookkeeping/invoicesPOST /makepay/bookkeeping/invoices/:invoiceId/payment-linkPOST /makepay/webhooks
Set server environment variables in the Directus host:
MAKEPAY_KEY_ID=...
MAKEPAY_KEY_SECRET=...
MAKEPAY_WEBHOOK_SECRET=...
MAKEPAY_BASE_URL=https://www.makecrypto.ionpm install directus-extension-makepayDirectus loads npm extension packages from its configured extensions directory. Restart Directus after installing the package.
curl -X POST https://directus.example.com/makepay/payment-links \
-H 'content-type: application/json' \
-d '{
"payload": {
"title": "Pro plan",
"amount": "49.00",
"currency": "USD",
"returnUrl": "https://example.com/billing/return"
}
}'Protect payment-link endpoints with Directus authentication, reverse-proxy rules, or a project-specific policy before exposing them publicly.
Configure MakePay webhooks to:
https://directus.example.com/makepay/webhooks
The extension verifies X-MakePay-Signature before returning the decoded event.
npm ci
npm test
npm run build
npm run validate