Testing "retry" correction in the sandbox

I’ve successfully create a customer in the sandbox with a status of “retry”. I’m trying to update that customer to “Verified” by resending all the personal information along with a 9 digit ssn. I keep getting an error message from Dwolla saying “Invalid Ssn”. I don’t see anything specific in the Developer guide that says this is even possible in the sandbox but it seems like it should be.

Data sent:
address1: “123 Main St”
city: “Some City”
dateOfBirth: “1991-05-05”
dwollaCustomerId: “faad2389-c22a-42ee-a954-a4c3694f7fa8”
email: “test@test.com
firstName: “test”
lastName: “test”
postalCode: “12345”
ssn: “5555-55-5555”
state: “NY”
type: “personal”

Hi @Pat! Looks like the SNN in the code is 10 digits. Can you try a 9 digit SSN and let us know if you run into any further trouble?

Doy :upside_down_face: Thank you.

New question, any suggestions for where I might find php syntax for creating a customer document in PHP?

Hi @Pat. Unfortunately we do not have a PHP code snippet for creating a customer document at this time, but here are some other PHP resources as it relates to this function.

List Documents for a Customer
Dwolla Swagger PHP

I’ve also created a ticket for this so we can add this snippet in out docs for the developers in our PHP community. Thank you for pointing this out!

I’m still fighting with document upload. My latest error is

{“code”:“ValidationError”,“message”:“Validation error(s) present. See embedded errors list for more details.”,"_embedded":{“errors”:[{“code”:“Invalid”,“message”:“Invalid file type.”,“path”:"/file","_links":{}}]}}

The customer id is: 30f89075-93e7-490c-809f-bbab467a2012

Is this enough information for you to check the logs on your end and maybe give me a little more information.

Thanks, Pat

Hi @Pat,

We do have a Drop-in component for the document upload function that you could take a look at if you’re running into troubles with doing this entirely server-side. You can find a quick how-to in this blog.

Server-side document upload

The PHP client library doesn’t currently contain support for document upload unfortunately. You could look at pulling in an external REST client to make this call. After looking at the Guzzle docs, this seemed to work for me:

require 'autoload.php';
use GuzzleHttp\Client;
$dwollaHost = 'api-sandbox.dwolla.com';
$filePath = 'https://cdn.dwolla.com/images/sandbox-test-images/test-document-upload-fail.png';
$customerID = 'cde723c7-65d7-4b40-8e7b-a5a4b42e285c';
$client = new \GuzzleHttp\Client();
$url = 'https://' . $dwollaHost . '/customers/' . $customerID . '/documents';
try {
  $response = $client->request('POST', $url, [
    'headers'  => [
          'Authorization' => 'Bearer ' . $token,
          'Accept' => 'application/vnd.dwolla.v1.hal+json'
    'multipart' => [
              'name'     => 'documentType',
              'contents' => 'license',
              'name'     => 'file',
              'contents' => fopen($filePath, 'r'),
  echo $response->getHeader('Location')[0];
} catch (\Exception $e) {
  echo $e->getMessage();
  $response = $e->getResponse();
  $responseBody = $response->getBody()->getContents();
  echo $responseBody;

Keep in mind, the only file format types supported are .png, .jpeg, .jpg, and .pdf (if business).

Hope this helps!