Title: Redirect to http://site.com/{$charge_response-&gt;id} without additional arguments?
Last modified: August 31, 2016

---

# Redirect to http://site.com/{$charge_response->id} without additional arguments?

 *  Resolved [donnay1969](https://wordpress.org/support/users/donnay1969/)
 * (@donnay1969)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/redirect-to-httpsitecomcharge_response-id-without-additional-arguments/)
 * Hello,
    I am trying to use sc_redirect_example filter to change the redirect 
   to be [http://site.com/](http://site.com/){$charge_response->id} without additional
   arguments. Here is the code I have in the functions.php
 * > function sc_redirect_example( $url, $charge_response ) {
   >  $url = ‘[http://donnay.ca/&#8217](http://donnay.ca/&#8217);;
   > $url .= $charge_response->id; return $url; } add_filter( ‘sc_redirect’, ‘sc_redirect_example’);
 * The redirect works after the charge is successful but the result is:
    [http://donnay.ca/?charge=ch_17loiGK19Ijyq7THu8Z9KHeE&store_name=mBibe.beer](http://donnay.ca/?charge=ch_17loiGK19Ijyq7THu8Z9KHeE&store_name=mBibe.beer)
 * Any help would be appreciated.
    Thanks
 * [https://wordpress.org/plugins/stripe/](https://wordpress.org/plugins/stripe/)

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

 *  [Phil Derksen](https://wordpress.org/support/users/pderksen/)
 * (@pderksen)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/redirect-to-httpsitecomcharge_response-id-without-additional-arguments/#post-7142339)
 * Hi there,
 * I’m not sure this can be done with our current filter hooks.
 * You can modify the base URL with the sc_redirect filter, but it doesn’t know 
   about the charge object.
 * [https://github.com/moonstonemedia/WP-Simple-Pay-Library/blob/master/simple-pay/filter-sc_redirect.php](https://github.com/moonstonemedia/WP-Simple-Pay-Library/blob/master/simple-pay/filter-sc_redirect.php)
 * You can modify the querystring arguments with the sc_redirect_args filter, and
   it knows about the charge object, but it doesn’t allow base URL changing at this
   point.
 * [https://github.com/moonstonemedia/WP-Simple-Pay-Library/blob/master/simple-pay/filter-sc_redirect_args.php](https://github.com/moonstonemedia/WP-Simple-Pay-Library/blob/master/simple-pay/filter-sc_redirect_args.php)
 * I haven’t looked into this yet, but if one or both of these filters can be updated
   to fit your use case without breaking backward compatibility I’d be happy to 
   update the plugin source code.
 * If you have time you could send the modified plugin code that would do it or 
   submit a pull request at [https://github.com/moonstonemedia/WP-Simple-Pay-Lite-for-Stripe](https://github.com/moonstonemedia/WP-Simple-Pay-Lite-for-Stripe)
 * Thanks!
 *  [Phil Derksen](https://wordpress.org/support/users/pderksen/)
 * (@pderksen)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/redirect-to-httpsitecomcharge_response-id-without-additional-arguments/#post-7142426)
 * Closing due to no response the last week, but feel free to open up a new thread(
   or GitHub issue) if more assistance is needed. Thanks.

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

The topic ‘Redirect to http://site.com/{$charge_response->id} without additional
arguments?’ is closed to new replies.

 * ![](https://ps.w.org/stripe/assets/icon-256x256.png?rev=2784844)
 * [Stripe Payment Forms by WP Simple Pay - Accept Credit Card Payments + Subscriptions with Stripe](https://wordpress.org/plugins/stripe/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/stripe/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/stripe/)
 * [Active Topics](https://wordpress.org/support/plugin/stripe/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/stripe/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/stripe/reviews/)

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [Phil Derksen](https://wordpress.org/support/users/pderksen/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/redirect-to-httpsitecomcharge_response-id-without-additional-arguments/#post-7142426)
 * Status: resolved