for recurrent payment you simply need to adjust the mode
key/pair of the stripe object:
const mode = "subscription";
let stripeObject = {
lineItems: [{ price: priceID, quantity: 1 }],
mode: mode,
successUrl: `https://www.${domain}/success`,
cancelUrl: `https://www.${domain}/canceled`,
billingAddressCollection: billingAddress ? "required" : "auto"
};