#Tai - Update Payment Link

1 messages ยท Page 1 of 1 (latest)

queen oriole
#

HI ๐Ÿ‘‹

mossy aurora
#

If i pass a new price: price.id under line_items

#

it throws this error

#

Received unknown parameter: line_items[0][price]

#

// Update Payment link with new Price ID
let updatePaymentLink;
try {
updatePaymentLink = await stripe.paymentLinks.update(existingPaymentLink.id, {
line_items: [{
id: lineItemID,
price: customPrice.id
}]
});
return res.status(200).send({url: updatePaymentLink.url})
} catch (err) {
console.log(err);
return res.status(400).send(err.message)
}

queen oriole
#

Ack, sorry this got dropped

#

It looks like updating the Price directly appears to be in "Preview Mode" but I cannot find any documentation about it

mossy aurora
#

That's ok. thanks for taking a look.