Skip to main content
The SDK allows the merchant to create payments within the main product. Each payment can contain various data such as amount, currency, external identifier (externalId), return URL after payment (returnUrl), etc. After creating a payment, the SDK returns a redirectUrl to the checkout page where the customer can complete the payment.
Before integrating via SDK, make sure you have configured your product and webhook. Go to Configuration to complete the required steps.

1. Installation

npm install @paymove-io/sdk

2. Example call

import { PaymoveClient } from "@paymove-io/sdk";

const client = new PaymoveClient({
  apiKey: "pm_sbx_sk_2f38b0c1e74c466db3d1a9b7ff8c41f2",
  merchantId: "2f6c19e8-84a7-4f50-b950-8d5a05e0bbf2",
  environment: "sandbox",
});

const response = await client.createPayment({
  amount: 1000, // in minor units (grosze for PLN)
  currency: "PLN",
  externalId: "order-123",
  returnUrl: "https://merchant-shop.com/payment/success",
  details: {
    productName: "Sports T-shirt",
    customerId: "user-567",
    returnUrl: "https://merchant-shop.pl/success",
    locale: "pl-PL", // optional, overrides the locale from the main product
  },
});

console.log(response.redirectUrl);

Configuration parameters

ParameterDescription
apiKeyAuthorization key for the API / SDK
merchantIdUUID identifying the main product (store)
environmentEnvironment: "sandbox" or "production"

createPayment parameters

ParameterDescription
amountAmount in minor units (e.g. 1000 = 10.00 PLN)
currencyCurrency (e.g. "PLN")
externalIdUnique payment identifier on the merchant side
returnUrlCustomer return URL after payment
details.productNameProduct name displayed on checkout
details.customerIdCustomer identifier in the merchant system
details.localeOptional - overrides the locale from the main product

Response

FieldDescription
redirectUrlCheckout address - redirect the customer to this URL to complete the payment

3. Redirect the customer

window.location.href = response.redirectUrl;
After the payment is completed, the customer will be automatically redirected to the address provided in returnUrl. The entire payment process is fully managed by Paymove - checkout, processing and redirect.