Ecommerce Shopify WordPress Discussion

How can I create Stripe express accounts on WordPress?

I want to create Stripe express accounts for my customers(who will receive money) on my WordPress platform. An user account will be created when the user registers on my platform. How can I do it? I've installed two stripe extensions to help me but any of them integrated options to create stripe accounts for customers. I've tried browsing on stripe docs in order to write my own code. I found some examples and tried a short code for the code below after including the stripe library folder in my theme folder. require_once get_template_directory() . '/stripe-php-master/lib/Stripe.php'; $stripe = new \Stripe\StripeClient('<my_stripe_secret_api_key'); $stripe->accounts->create(['type' => 'express']); I've include the short code on my customers registering page, but nothing worked as expected. I expected my code to create an express account without any information (apart of the mandatory one which is the account type) to see if that code worked but nothing happen.
Just to double-check @NigelRen 's line of thought - what happens if you follow the example in the API docs exactly - and better yet, dump out responses and add a try/catch to see potential issues? try { require_once get_template_directory() . '/stripe-php-master/lib/Stripe.php'; $stripe = new \Stripe\StripeClient('<my_stripe_secret_api_key'); // A. Use exact example from API Docs just to make sure we're not missing something $response = $stripe->accounts->create([ 'type' => 'custom', 'country' => 'US', 'email' => '', 'capabilities' => [ 'card_payments' => ['requested' => true], 'transfers' => ['requested' => true], ], ]); echo "Response 1: "; var_dump($response); // B. Then switch *just* the account type and confirm the difference $response = $stripe->accounts->create([ 'type' => 'express', 'country' => 'US', 'email' => '', 'capabilities' => [ 'card_payments' => ['requested' => true], 'transfers' => ['requested' => true], ], ]); echo "Response 2: "; var_dump($response); } catch (Exception $e) { echo "ERROR: "; var_dump($e->getMessage()); die; } How are you verifying? What do you see in your Stripe account? What do you get as the result of the API call itself - or is there an exception thrown? Does the result look different from 1A. vs. 1B. above? Does the result look different from when you create an account manually? I hope that helps get you on the right track!

December 31, 2023

TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.