Skip to main content
The REST API allows creating payments within the main product. Each call creates a payment that the customer can complete via the returned redirectUrl. After creating a payment, the API returns a redirectUrl to the checkout page where the customer can complete the payment.
Before integrating via REST API, make sure you have configured your product and webhook. Go to Configuration to complete the required steps.

1. Endpoint

POST https://gateway-api.sandbox.paymove.io/api/pay/product/{merchantId}/subproduct/pricing

2. Example call

const url = `https://gateway-api.sandbox.paymove.io/api/pay/product/${merchantId}/subproduct/pricing`;

const body = {
  price: 1000,
  externalId: "order-123",
  details: {
    currency: "PLN",
    returnUrl: "https://merchant-shop.com/payment/success",
    productName: "Sports T-shirt",
    customerId: "user-567",
    locale: "pl-PL",
  },
};

const response = await fetch(url, {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-API-KEY": apiKey,
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data.redirectUrl);

Headers

HeaderValue
Content-Typeapplication/json
X-API-KEYYour API key

Body parameters

FieldDescription
priceAmount in minor units (e.g. 1000 = 10.00 PLN)
externalIdUnique payment identifier on the merchant side
details.currencyCurrency
details.returnUrlCustomer return URL after payment
details.productNameProduct name displayed on checkout
details.customerIdCustomer identifier in your 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 = data.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.