Skip to content

makecryptoio/makepay-directus-extension

Repository files navigation

MakePay Directus Extension

Directus endpoint extension for MakePay payment links, customers, bookkeeping invoices, and signed webhooks.

Endpoints

After installation, routes are mounted below /makepay:

  • POST /makepay/payment-links
  • GET /makepay/payment-links/:uid
  • POST /makepay/customers
  • POST /makepay/bookkeeping/invoices
  • POST /makepay/bookkeeping/invoices/:invoiceId/payment-link
  • POST /makepay/webhooks

Configuration

Set server environment variables in the Directus host:

MAKEPAY_KEY_ID=...
MAKEPAY_KEY_SECRET=...
MAKEPAY_WEBHOOK_SECRET=...
MAKEPAY_BASE_URL=https://www.makecrypto.io

Installation

npm install directus-extension-makepay

Directus loads npm extension packages from its configured extensions directory. Restart Directus after installing the package.

Create a Payment Link

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.

Webhooks

Configure MakePay webhooks to:

https://directus.example.com/makepay/webhooks

The extension verifies X-MakePay-Signature before returning the decoded event.

Development

npm ci
npm test
npm run build
npm run validate

About

Directus endpoint extension for MakePay payment links and signed webhooks. Cryptocurrency payment gateway for direct self-custody merchant-wallet settlement, decentralized swaps, and 70+ coin/20+ chain auto-conversion.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors