Create Customer PHP Function & PHP Support/Updates

Hi Support team,

We are currently considering Dwolla for our needs and working with the SDK. Looked at the Dwolla swagger SDK and most methods and functions are being recognized:
(ie DwollaSwagger\CustomerListResponse) - working ok and others

However seem to be running into an issue with the create customer function, which based on the documentation here 2022-05-30_17-42-17 the arguments we are pssing should work.

In this case the below error is returned:

Argument ‘1’ passed to create() is expected to be of type DwollaSwagger\CreateCustomer, array givenPHP(PHP0406)

We are using (cannot downgrade):
PHP 8.1+
Laravel 9+

Perhaps we are missing something?


Hi Jeremy – Apologies for the late reply to your post! :bowing_woman:

We did find that our PHP SDK is not supported in the latest version of PHP (v8.1). We have logged this as feedback for updating the library to be compatible with the latest version. For now, since the API is exposed via HTTP, you may look into implementing the API integration using an HTTP framework like Guzzle, or something you’re most comfortable with!

Thank you.

I also noticed there is no php function in the SDK for creating a document.
Is this intended or just missing? 2022-08-20_09-23-58

Hi Jeremy – That is intended. We don’t have anything available within the dwolla-swagger-php client library for that function. You could pull in something like Guzzle to make this specific request and do something like the following:

require 'vendor/autoload.php';
$access_token = '';

$path = realpath('/Path/to/file/someFile.jpeg');
$customerId = 'e528f2be-56f5-4d86-8a79-b854488fd689';

$client = new GuzzleHttp\Client(['base_uri' => '']);
  $response =  $client->post('/customers/' . $customerId . '/documents', [
         'headers' => [
             'Accept' => 'application/vnd.dwolla.v1.hal+json',
             'Authorization' => 'Bearer ' . $access_token,
         'multipart' => [
                 'name' => 'documentType',
                 'contents' => 'passport'
                 'Content-type' => 'multipart/form-data',
                 'name'     => 'file',
                 'contents' => fopen($path, 'r')

$response = $response->getHeader('location');
echo $response[0];

A pull request with the related code for the customer document upload call has been pending since 2021. Please consider that contribution, along with a number of other submissions. Pull requests · Dwolla/dwolla-swagger-php · GitHub

Hi @jbaop – thanks for looking into the PR and testing it out! We plan on pulling it into our next sprint for review!

Is there a schedule for the next release?

Hey @jbaop – while we don’t have a fixed release schedule for the SDK, our goal is to release the next version by mid-March, which will incorporate the updates and changes suggested in the outstanding pull requests.