Skip to main content
POST
/
customers
Create a customer
curl --request POST \
  --url https://api.dwolla.com/customers \
  --header 'Accept: <accept>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/vnd.dwolla.v1.hal+json' \
  --data '
{
  "firstName": "Account",
  "lastName": "Admin",
  "email": "accountAdmin@email.com",
  "type": "<string>",
  "ipAddress": "143.156.7.8",
  "phone": "5555555555",
  "correlationId": "fc451a7a-ae30-4404-aB95-e3553fcd733",
  "businessName": "Jane Corp llc"
}
'
const options = {
method: 'POST',
headers: {
Accept: '<accept>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/vnd.dwolla.v1.hal+json'
},
body: JSON.stringify({
firstName: 'Account',
lastName: 'Admin',
email: 'accountAdmin@email.com',
type: '<string>',
ipAddress: '143.156.7.8',
phone: '5555555555',
correlationId: 'fc451a7a-ae30-4404-aB95-e3553fcd733',
businessName: 'Jane Corp llc'
})
};

fetch('https://api.dwolla.com/customers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
import requests

url = "https://api.dwolla.com/customers"

payload = {
"firstName": "Account",
"lastName": "Admin",
"email": "accountAdmin@email.com",
"type": "<string>",
"ipAddress": "143.156.7.8",
"phone": "5555555555",
"correlationId": "fc451a7a-ae30-4404-aB95-e3553fcd733",
"businessName": "Jane Corp llc"
}
headers = {
"Accept": "<accept>",
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.dwolla.v1.hal+json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dwolla.com/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'firstName' => 'Account',
'lastName' => 'Admin',
'email' => 'accountAdmin@email.com',
'type' => '<string>',
'ipAddress' => '143.156.7.8',
'phone' => '5555555555',
'correlationId' => 'fc451a7a-ae30-4404-aB95-e3553fcd733',
'businessName' => 'Jane Corp llc'
]),
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"Authorization: Bearer <token>",
"Content-Type: application/vnd.dwolla.v1.hal+json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
require 'uri'
require 'net/http'

url = URI("https://api.dwolla.com/customers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Accept"] = '<accept>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/vnd.dwolla.v1.hal+json'
request.body = "{\n \"firstName\": \"Account\",\n \"lastName\": \"Admin\",\n \"email\": \"accountAdmin@email.com\",\n \"type\": \"<string>\",\n \"ipAddress\": \"143.156.7.8\",\n \"phone\": \"5555555555\",\n \"correlationId\": \"fc451a7a-ae30-4404-aB95-e3553fcd733\",\n \"businessName\": \"Jane Corp llc\"\n}"

response = http.request(request)
puts response.read_body
{
  "code": "BadRequest",
  "message": "The request body contains bad syntax or is incomplete."
}
{
"code": "forbidden",
"message": "Not authorized to create customers."
}
{
"code": "notFound",
"message": "not found."
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

Accept
enum<string>
default:application/vnd.dwolla.v1.hal+json
required

The media type of the response. Must be application/vnd.dwolla.v1.hal+json

Available options:
application/vnd.dwolla.v1.hal+json

Body

application/vnd.dwolla.v1.hal+json

Parameters for customer to be created

Create a Receive Only User

firstName
string
required
Example:

"Account"

lastName
string
required
Example:

"Admin"

email
string
required
Example:

"accountAdmin@email.com"

type
string
required
Allowed value: "receive-only"
ipAddress
string
Example:

"143.156.7.8"

phone
string
Example:

"5555555555"

correlationId
string
Example:

"fc451a7a-ae30-4404-aB95-e3553fcd733"

businessName
string
Example:

"Jane Corp llc"

Response

successful operation