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, // w groszach
currency: "PLN",
externalId: "order-123",
returnUrl: "https://merchant-shop.com/payment/success",
details: {
productName: "Koszulka sportowa",
customerId: "user-567",
returnUrl: "https://merchant-shop.pl/success",
locale: "pl-PL", // opcjonalnie, nadpisuje locale z głównego produktu
},
});
console.log(response.redirectUrl);