Title: Payment Custom Amount
Last modified: August 30, 2019

---

# Payment Custom Amount

 *  Resolved [jrm7](https://wordpress.org/support/users/jrm7/)
 * (@jrm7)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/payment-custom-amount/)
 * Hello,
 * I can’t seems to change button’s amount dynamically.
 * Following the filter example from [https://newo.me/direct-stripe-actions-and-filters-hooks/](https://newo.me/direct-stripe-actions-and-filters-hooks/)
   does work with ‘current_email_address’ but not with ‘amount’ :
 * add_filter( ‘ds_filter_params’, function( $params ){
    $amount = base64_encode(
   50); if( isset($amount) ){ $params[‘amount’] = $amount; } return $params; } );
 * I thought, names from the var ds**** array could be used. Also tried ‘original_amount’
   with no success.
 * Is this possible ?
 * cheers,
 * EDIT : just created full custom button shortcode
    -  This topic was modified 6 years, 7 months ago by [jrm7](https://wordpress.org/support/users/jrm7/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [Nicolas Figueira](https://wordpress.org/support/users/nahuelmahe/)
 * (@nahuelmahe)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/payment-custom-amount/#post-11883635)
 * Hello [@jrm7](https://wordpress.org/support/users/jrm7/) ,
 * Thank you for using Direct Stripe.
 * I’m glad you found a solution. Your example should work, just make sure to pass
   a value formatted as Stripe requires [https://stripe.com/docs/api/charges/create#create_charge-amount](https://stripe.com/docs/api/charges/create#create_charge-amount)
 * “A positive integer representing how much to charge in the smallest currency 
   unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency).
   The minimum amount is $0.50 US or equivalent in charge currency. The amount value
   supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).”
 * Also please be aware that the API will change, I invite you to test you code 
   on [https://downloads.wordpress.org/plugin/direct-stripe.3.0.0-beta.zip](https://downloads.wordpress.org/plugin/direct-stripe.3.0.0-beta.zip)
   version.
 * Kind regards,

Viewing 1 replies (of 1 total)

The topic ‘Payment Custom Amount’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/direct-stripe_7787ff.svg)
 * [Direct Stripe](https://wordpress.org/plugins/direct-stripe/)
 * [Support Threads](https://wordpress.org/support/plugin/direct-stripe/)
 * [Active Topics](https://wordpress.org/support/plugin/direct-stripe/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/direct-stripe/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/direct-stripe/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Nicolas Figueira](https://wordpress.org/support/users/nahuelmahe/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/payment-custom-amount/#post-11883635)
 * Status: resolved