Title: Load shortcode with Ajax
Last modified: October 9, 2017

---

# Load shortcode with Ajax

 *  Resolved [Wilco](https://wordpress.org/support/users/wilcodeveloper/)
 * (@wilcodeveloper)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/load-shortcode-with-ajax/)
 * Hi,
 * When calling the shortcode with ajax it gives the following error: The amount
   is lower than the minimum.
 * My guess is that the shortcode needs public.js to be runned again in order to
   give the new price to the shortcode, but i’m not sure.
 * My question: What do I need to do to make it work with ajax?
 * Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [davdebcom](https://wordpress.org/support/users/davdebcom/)
 * (@davdebcom)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/load-shortcode-with-ajax/#post-9569635)
 * Hi Wilco
 * Thanks for reaching out!
 * Yes, public.js is required! Paytium automatically adds that file for posts and
   pages, if it can’t see that Paytium is loaded in one of those it will not include
   it. You could off course add that file to your script yourself, that should work.
 * I’m not sure I understand what you are doing, feel free to explain more if I 
   misunderstood!
 * Kind regards
    David
 *  Thread Starter [Wilco](https://wordpress.org/support/users/wilcodeveloper/)
 * (@wilcodeveloper)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/load-shortcode-with-ajax/#post-9569666)
 * I will try to re-enqueueu it on ajax.
 * Let me explain what i’m trying to achieve here:
    I have a coupon/discount form
   on the same page as the paytium button. This coupon gets checked with ajax > 
   php and if its correct I update a custom field with the new price. If its correct
   I also want to make an ajax call to refresh the paytium button to give the new
   price.
 * Everything works fine and the price gets updated. Except when I refresh the paytium
   button.
 *  Plugin Contributor [davdebcom](https://wordpress.org/support/users/davdebcom/)
 * (@davdebcom)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/load-shortcode-with-ajax/#post-9570033)
 * Yes, please try adding it, I think that might be the issue/solution.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Load shortcode with Ajax’ is closed to new replies.

 * ![](https://ps.w.org/paytium/assets/icon-256x256.png?rev=1967172)
 * [Paytium: Mollie payment forms & donations](https://wordpress.org/plugins/paytium/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/paytium/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/paytium/)
 * [Active Topics](https://wordpress.org/support/plugin/paytium/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/paytium/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/paytium/reviews/)

## Tags

 * [ajax](https://wordpress.org/support/topic-tag/ajax/)

 * 3 replies
 * 2 participants
 * Last reply from: [davdebcom](https://wordpress.org/support/users/davdebcom/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/load-shortcode-with-ajax/#post-9570033)
 * Status: resolved