Skip to content

makecryptoio/makepay-salesforce

Repository files navigation

MakePay Salesforce Package

Salesforce DX package source for creating MakePay payment links from Salesforce Flow and accepting MakePay webhook callbacks through Apex REST.

Features

  • Apex client for MakePay partner payment links.
  • Flow action: Create MakePay Payment Link.
  • Apex REST endpoint: /services/apexrest/makepay/webhooks/*.
  • HMAC verification for X-MakePay-Signature.
  • Named Credential based outbound authentication, so MakePay API keys do not live in Apex code or repository files.
  • Protected custom metadata settings for package-level defaults and webhook configuration.

Salesforce Setup

Create a Named Credential with API name MakePay_API and URL https://www.makecrypto.io. Configure the linked External Credential with custom headers:

  • X-MakeCrypto-Key-Id
  • X-MakeCrypto-Key-Secret

Salesforce Named Credentials support custom headers for API key style authentication:

After deploying the package source, update the Default MakePay Settings custom metadata record with the webhook secret used by MakePay.

See docs/SETUP.md for the full setup flow.

Flow Usage

Add the Create MakePay Payment Link Apex action to a Flow. Pass an Opportunity ID or explicit title, amount, currency, and return URL. The action returns:

  • success
  • uid
  • url
  • rawResponse
  • error

Webhooks

Expose the Apex REST endpoint to MakePay:

https://your-domain.my.salesforce.com/services/apexrest/makepay/webhooks/

The endpoint verifies the MakePay HMAC signature before passing the event to MakePayWebhookProcessor.process.

Development

npm run validate

With Salesforce CLI:

sf project deploy start --source-dir force-app
sf apex run test --test-level RunLocalTests --code-coverage

Package Contents

  • MakePayClient: outbound payment link client.
  • MakePayCreatePaymentLinkAction: Flow invocable action.
  • MakePayWebhookVerifier: HMAC verification helper.
  • MakePayWebhookRest: REST webhook endpoint.
  • MakePayWebhookProcessor: small event processing extension point.
  • MakePayConfig: settings lookup helper.

About

Salesforce DX package for MakePay payment links, Flow actions, and 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