#Tai - Update Payment Link
1 messages ยท Page 1 of 1 (latest)
HI ๐
You can specify a new set of Line Items on the Payment Link
https://stripe.com/docs/api/payment_links/payment_links/update#update_payment_link-line_items
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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)
}
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
That's ok. thanks for taking a look.