Overview
Icon for Nova Money

Nova Money

Enable payments and financial services via Nova Money

Nova.Pay Medusa Plugin

A Medusa V2 plugin to integrate Nova.Pay into your store.

Features

  • Payment Providers:
    • Credit Card (Copy to clipboardnova-pay-credit-card)
    • Pix (Copy to clipboardnova-pay-pix)
    • Boleto (Copy to clipboardnova-pay-bank-slip)
  • Product Sync: Automatically syncs products to Nova.Pay whenever a product is created or updated in Medusa.

Installation

Install the package via npm or yarn:

npm install @novamoney/nova-pay
# or
yarn add @novamoney/nova-pay

Configuration

Environment Variables

Add the following environment variables to your Copy to clipboard.env file:

NOVA_PAY_API_KEY=your_api_key_here
NOVA_PAY_CART_PAGE_ID=your_cart_page_uuid_here
NOVA_PAY_SUBDOMAIN=your_nova_pay_subdomain_here
NOVA_PAY_VERBOSE=true # Optional: enables sync logging

Medusa Config

Enable the plugin in your Copy to clipboardmedusa-config.ts file:

// medusa-config.ts
module.exports = defineConfig({
// ...
plugins: [
// ... other plugins
{
resolve: "@novamoney/nova-pay",
options: {
apiKey: process.env.NOVA_PAY_API_KEY,
subdomain: process.env.NOVA_PAY_SUBDOMAIN
},
},
],
// ...
modules: [
// ... other modules
{
resolve: "@medusajs/medusa/payment",
options: {

Client-side Integration

When you initiate a payment using one of the Nova.Pay providers, the response will include a Copy to clipboardlink in the Copy to clipboarddata object of the payment session. You must redirect the customer to this URL to complete the payment.

Example (Next.js Storefront)

const handlePayment = async (paymentSession) => {
if (paymentSession.data.link) {
// Redirect to Nova.Pay checkout
window.location.href = paymentSession.data.link;
}
};

License

Licensed under the MIT License.

You may also like

Browse all integrations

Build your own

Develop your own custom integration

Build your own integration with our API to speed up your processes. Make your integration available via npm for it to be shared in our Library with the broader Medusa community.

gift card interface

Ready to build your custom commerce setup?