Donations, dynamic price or "pay what you want" scenarios?

Snipcart does support donations or “pay what you want” scenarios. However, to make our order validation work, you will have to:

  1. Set the price of your products dynamically via custom JavaScript code on your page.
  2. Set the URL of your product dynamically to a custom backend endpoint including the user-defined price in its route (using a query parameter for example).
  3. From this endpoint, dynamically return HTML or JSON markup that generates the correct price. See the order validation documentation linked above for details.

Here is a more hands-on tutorial including this precise use case :point_down:

1 Like

Hey Francis, im looking to do exactly this but dont have any coding experience aside from copy/paste. The tutorial you linked is down, any chance you can repost it?

Thanks!

Hey @Willr,

Just tested the link now and the post is up on my side. Can you please try again and confirm?

Thanks

Just checked it out again and it worked! Thanks a ton!

2 Likes