Title: Specifying webhook secret programatically
Last modified: September 6, 2022

---

# Specifying webhook secret programatically

 *  Resolved [bbceg](https://wordpress.org/support/users/bbceg/)
 * (@bbceg)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/specifying-webhook-secret-programatically/)
 * Hello,
 * I am exploring the possibility of paying different stripe accounts depending 
   on a store location chosen by my customers before checkout.
 * I have successfully managed to direct payment to the relevant Stripe account 
   using wc_stripe_params, wc_stripe_payment_request_params and woocommerce_stripe_request_headers
   to set the necessary stripe keys and secrets.
 * I’m wondering if it is possible to specify the webhook secret programmatically
   so that I can complete the picture.
 * Any pointers in the right direction in terms of hooks etc. would be much appreciated.
 * Thanks.

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

 *  [Mirko P.](https://wordpress.org/support/users/rainfallnixfig/)
 * (@rainfallnixfig)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/specifying-webhook-secret-programatically/#post-15985295)
 * Hi there,
 * Thanks for reaching out.
 * This is a fairly complex development topic. I’m going to leave it open for a 
   bit to see if anyone is able to chime in to help you out.
 * I can recommend the WooCommerce [Developer Resources Portal](https://developer.woocommerce.com/)
   for resources on developing for WooCommerce and the [Hooks (Actions/Filters)](https://woocommerce.com/document/stripe/#hooks-actions-filters)
   section in the WooCommerce Stripe’s support documentation.
 * You can also visit the [WooCommerce Facebook Community](https://www.facebook.com/groups/advanced.woocommerce/)
   group or the `#extensions` and `#developers` channels of the [WooCommerce Community Slack](https://woocommerce.com/community-slack/).
 * We’re lucky to have a great community of open-source developers for WooCommerce,
   and many of our developers hang out there, as well.
 * Cheers.
 *  Thread Starter [bbceg](https://wordpress.org/support/users/bbceg/)
 * (@bbceg)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/specifying-webhook-secret-programatically/#post-15986774)
 * Hi [@rainfallnixfig](https://wordpress.org/support/users/rainfallnixfig/)
 * Thanks for the swift response. I’ve done quite a lot of digging through the code
   and various hooks already and wonder if it might need a new hook. I’ll try the
   other channels and see if that might be possible.
 *  [Igor H](https://wordpress.org/support/users/ihereira/)
 * (@ihereira)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/specifying-webhook-secret-programatically/#post-15987357)
 * Hello,
 * > I am exploring the possibility of paying different stripe accounts depending
   > on a store location chosen by my customers before checkout.
 * You can create multiple stripe accounts (in case there are multiple sites as 
   well) under one stripe dashboard. This way you can manage all the accounts under
   one login.
 * To learn more you can refer to Stripe [Multiple accounts](https://stripe.com/docs/account/multiple-accounts)
   documentation from stripedocs for more information.
 * > I’m wondering if it is possible to specify the webhook secret programmatically
   > so that I can complete the picture.
 * That would need a custom code workaround, custom code is not fully supported 
   in our forums, I recommend checking out the resources shared earlier by Mirko
   to point you in the right direction.
 * Best.
 *  Thread Starter [bbceg](https://wordpress.org/support/users/bbceg/)
 * (@bbceg)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/specifying-webhook-secret-programatically/#post-15987431)
 * Thanks [@ihereira](https://wordpress.org/support/users/ihereira/)
 * As alluded to above, I am already successfully submitting payments to multiple
   stripe accounts, my current issue is that I cannot set the webhook secret and
   I don’t believe there is provision for this via the existing hooks/filters.
 * Nevertheless, I will try the developers in Slack as that’s probably a more appropriate
   place for this discussion.
 *  [Budimir](https://wordpress.org/support/users/budimirdq/)
 * (@budimirdq)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/specifying-webhook-secret-programatically/#post-16223738)
 * Hi [@bbceg](https://wordpress.org/support/users/bbceg/)
    Did you managed to find
   a solution? I have the same issue with no luck resolving it so far.
 *  Thread Starter [bbceg](https://wordpress.org/support/users/bbceg/)
 * (@bbceg)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/specifying-webhook-secret-programatically/#post-16223768)
 * Hi [@budimirdq](https://wordpress.org/support/users/budimirdq/)
 * The decision was made to stick to one account for now so I didn’t get any further.
   That includes not reaching out to the developers on Slack so you might want to
   give that a try.
 * I’d be very interested to hear how you get on as multiple accounts would still
   be a better fit for my project.
 *  [Budimir](https://wordpress.org/support/users/budimirdq/)
 * (@budimirdq)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/specifying-webhook-secret-programatically/#post-16224630)
 * Thanks [@bbceg](https://wordpress.org/support/users/bbceg/)
    Will let you know
   if I find a solution.

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

The topic ‘Specifying webhook secret programatically’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-gateway-stripe/assets/icon-256x256.png?rev=3177277)
 * [WooCommerce Stripe Payment Gateway](https://wordpress.org/plugins/woocommerce-gateway-stripe/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-gateway-stripe/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-gateway-stripe/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-gateway-stripe/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-gateway-stripe/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-gateway-stripe/reviews/)

 * 7 replies
 * 4 participants
 * Last reply from: [Budimir](https://wordpress.org/support/users/budimirdq/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/specifying-webhook-secret-programatically/#post-16224630)
 * Status: resolved