Official MakePay payment provider for Medusa v2 hosted checkout.
Official MakePay payment provider for Medusa v2. The provider creates hosted MakePay checkout links for Medusa payment sessions and reconciles payment status through signed MakePay webhooks.
npm install @makecrypto/medusa-plugin-makepay
Register MakePay as a provider under the Medusa Payment Module:
// medusa-config.tsimport { defineConfig, Modules } from "@medusajs/framework/utils";export default defineConfig({modules: [{resolve: "@medusajs/medusa/payment",options: {providers: [{resolve: "@makecrypto/medusa-plugin-makepay/providers/makepay",id: "makepay",options: {keyId: process.env.MAKEPAY_KEY_ID!,keySecret: process.env.MAKEPAY_KEY_SECRET!,webhookSecret: process.env.MAKEPAY_WEBHOOK_SECRET!,settlementCurrency:process.env.MAKEPAY_SETTLEMENT_CURRENCY || "USDT",expirationTime: "12h",},},],},},],});
The default Medusa payment webhook URL for the provider is:
/hooks/payment/makepay_makepay
Configure that URL in MakePay developer settings and store the generated webhook secret as .
| Option | Required | Description |
|---|---|---|
| yes | MakePay API key ID. | |
| yes | MakePay API key secret. | |
| yes | MakePay webhook signing secret. | |
| no | MakeCrypto API base URL. Defaults to production. | |
| no | MakePay hosted checkout base URL. Defaults to production. | |
| no | Settlement symbol sent to MakePay. Defaults to . | |
| no | Hosted link expiration. Defaults to . | |
| no | Fallback return URL for MakePay checkout. | |
| no | Success return URL for MakePay checkout. | |
| no | Failure return URL for MakePay checkout. |
returns provider data with a hosted checkout URL:
paymentSession.data.next_action// { type: "redirect", url: "https://makepay.io/payment/..." }
Redirect shoppers to that URL, then use MakePay webhooks to update the Medusa payment session when the payment is completed, canceled, or failed.
npm cinpm run check
builds the TypeScript provider, runs the unit tests, and verifies the npm package contents with .