Stripe-PHP: Stripe\Account::create error: Address for business must match account country

871 views
Skip to first unread message

Alan Gervais

unread,
Aug 4, 2015, 2:39:11 PM8/4/15
to Stripe API Discussion
Testing our Managed Account implementation; creating a new managed account works great when the platform account is in the same country as the new managed account's business address but we can't mix and match it seems despite what the docs say:

Requirements for creating managed accounts

  • U.S./Canadian platform: managed accounts are in public beta. Platforms in the U.S. and Canada can create managed accounts for any country Stripe supports. If you’re outside of the U.S. and Canada and would like to be notified when managed accounts are available in your country, let us know.

Source: https://stripe.com/docs/connect/managed-accounts#requirements-for-creating-managed-accounts


Here's the error:

exception 'Stripe\Error\InvalidRequest' with message 'Address for business must match account country' in /var/www/app/vendor/stripe/stripe-php/lib/ApiRequestor.php:98 from API request 'req_6jdMDN11krhwSj'
Stack trace:
#0 /var/www/app/vendor/stripe/stripe-php/lib/ApiRequestor.php(210): Stripe\ApiRequestor->handleApiError('{?  "error": {?...', 400, Array, Array)
#1 /var/www/app/vendor/stripe/stripe-php/lib/ApiRequestor.php(60): Stripe\ApiRequestor->_interpretResponse('{?  "error": {?...', 400, Array)
#2 /var/www/app/vendor/stripe/stripe-php/lib/ApiResource.php(105): Stripe\ApiRequestor->request('post', '/v1/accounts', Array, Array)
#3 /var/www/app/vendor/stripe/stripe-php/lib/ApiResource.php(137): Stripe\ApiResource::_staticRequest('post', '/v1/accounts', Array, NULL)
#4 /var/www/app/vendor/stripe/stripe-php/lib/Account.php(39): Stripe\ApiResource::_create(Array, NULL)
#5 /var/www/app/app/opsmatrix/billing/StripeBilling.php(1456): Stripe\Account::create(Array)


My test platform account is Canadian, here's my test input:

{
 
"email": "rese...@test.com",
 
"password": "firstPass123",
 
"first_name": "Alan",
 
"last_name": "Gervais",
 
"personal_address": {
   
"street_address": "123 Test Road",
   
"locality": "Beverly Hills",
   
"postal_code": "90210",
   
"country": "US",
   
"region": "CA",
   
"local_timezone": null,
   
"latitude": 45.545622,
   
"longitude": -75.280745
 
},
 
"business_type": "company",  
 
"business_name": "Reseller 1",
 
"business_address": {
   
"street_address": "123 Test Road",
   
"locality": "Beverly Hills",
   
"postal_code": "90210",
   
"country": "US",
   
"region": "CA",
   
"local_timezone": null,
   
"latitude": 45.545622,
   
"longitude": -75.280745
 
},
 
"business_phone": "555-555-7777",
 
"business_currency": "usd",
 
"application_fee_percent": 10.99,
 
"date_of_birth": "1976-06-14"
}

We are a Canadian business that will have resellers that we need to create managed accounts for working and banking in the US, is this not currently possible despite what the docs say?

Thanks,
Alan


Matthew Arkin

unread,
Aug 4, 2015, 5:06:22 PM8/4/15
to Jake K.
Hi Alan,
When you create the account, you should also pass the country parameter, if not my assumption is that it is defaulting to your account.

Matt

--
You received this message because you are subscribed to the Google Groups "Stripe API Discussion" group.
To post to this group, send email to api-d...@lists.stripe.com.
Visit this group at http://groups.google.com/a/lists.stripe.com/group/api-discuss/.

To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss...@lists.stripe.com.

Alan Gervais

unread,
Aug 4, 2015, 5:27:35 PM8/4/15
to api-d...@lists.stripe.com
Thanks Matt, that was exactly the issue, I was missing the 'country' param in the create request.

Thanks again!
Alan
Reply all
Reply to author
Forward
0 new messages