Create Account
curl --request POST \
--url https://sandbox.api.paylias.xyz/gateway/api/v1/csp/account \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--header 'x-partner-id: <x-partner-id>' \
--data '
{
"account_number": "1234567890123456",
"account_title": "John Doe",
"routing_number": "123456789",
"type": "AT_Checkings"
}
'import requests
url = "https://sandbox.api.paylias.xyz/gateway/api/v1/csp/account"
payload = {
"account_number": "1234567890123456",
"account_title": "John Doe",
"routing_number": "123456789",
"type": "AT_Checkings"
}
headers = {
"x-partner-id": "<x-partner-id>",
"idempotency-key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-partner-id': '<x-partner-id>',
'idempotency-key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
account_number: '1234567890123456',
account_title: 'John Doe',
routing_number: '123456789',
type: 'AT_Checkings'
})
};
fetch('https://sandbox.api.paylias.xyz/gateway/api/v1/csp/account', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.api.paylias.xyz/gateway/api/v1/csp/account",
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([
'account_number' => '1234567890123456',
'account_title' => 'John Doe',
'routing_number' => '123456789',
'type' => 'AT_Checkings'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"idempotency-key: <idempotency-key>",
"x-partner-id: <x-partner-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.paylias.xyz/gateway/api/v1/csp/account"
payload := strings.NewReader("{\n \"account_number\": \"1234567890123456\",\n \"account_title\": \"John Doe\",\n \"routing_number\": \"123456789\",\n \"type\": \"AT_Checkings\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-partner-id", "<x-partner-id>")
req.Header.Add("idempotency-key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.api.paylias.xyz/gateway/api/v1/csp/account")
.header("x-partner-id", "<x-partner-id>")
.header("idempotency-key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_number\": \"1234567890123456\",\n \"account_title\": \"John Doe\",\n \"routing_number\": \"123456789\",\n \"type\": \"AT_Checkings\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.paylias.xyz/gateway/api/v1/csp/account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-partner-id"] = '<x-partner-id>'
request["idempotency-key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_number\": \"1234567890123456\",\n \"account_title\": \"John Doe\",\n \"routing_number\": \"123456789\",\n \"type\": \"AT_Checkings\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"account_title": "John Doe",
"created_at": {
"seconds": 1635784800
},
"masked_account_number": "XXXX-XXXX-XXXX-1234",
"partner_id": "part_123456789",
"routing_number": "123456789",
"status": "active",
"token": "acct_123456789",
"type": "checking",
"updated_at": {
"seconds": 1635788400
},
"institution": {
"address": {
"address": "123 Main St",
"city": "New York",
"postal_code": "10001",
"state": "NY"
},
"name": "Example Bank",
"phone_number": "+1234567890",
"routing_number": "123456789"
}
},
"ok": true
}{
"code": "error.bad_request",
"message": "Invalid request parameters"
}{
"code": "error.unauthorized",
"message": "Authentication required"
}Accounts
Create Account
Create Account
POST
/
api
/
v1
/
csp
/
account
Create Account
curl --request POST \
--url https://sandbox.api.paylias.xyz/gateway/api/v1/csp/account \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--header 'x-partner-id: <x-partner-id>' \
--data '
{
"account_number": "1234567890123456",
"account_title": "John Doe",
"routing_number": "123456789",
"type": "AT_Checkings"
}
'import requests
url = "https://sandbox.api.paylias.xyz/gateway/api/v1/csp/account"
payload = {
"account_number": "1234567890123456",
"account_title": "John Doe",
"routing_number": "123456789",
"type": "AT_Checkings"
}
headers = {
"x-partner-id": "<x-partner-id>",
"idempotency-key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-partner-id': '<x-partner-id>',
'idempotency-key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
account_number: '1234567890123456',
account_title: 'John Doe',
routing_number: '123456789',
type: 'AT_Checkings'
})
};
fetch('https://sandbox.api.paylias.xyz/gateway/api/v1/csp/account', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.api.paylias.xyz/gateway/api/v1/csp/account",
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([
'account_number' => '1234567890123456',
'account_title' => 'John Doe',
'routing_number' => '123456789',
'type' => 'AT_Checkings'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"idempotency-key: <idempotency-key>",
"x-partner-id: <x-partner-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.paylias.xyz/gateway/api/v1/csp/account"
payload := strings.NewReader("{\n \"account_number\": \"1234567890123456\",\n \"account_title\": \"John Doe\",\n \"routing_number\": \"123456789\",\n \"type\": \"AT_Checkings\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-partner-id", "<x-partner-id>")
req.Header.Add("idempotency-key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.api.paylias.xyz/gateway/api/v1/csp/account")
.header("x-partner-id", "<x-partner-id>")
.header("idempotency-key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_number\": \"1234567890123456\",\n \"account_title\": \"John Doe\",\n \"routing_number\": \"123456789\",\n \"type\": \"AT_Checkings\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.paylias.xyz/gateway/api/v1/csp/account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-partner-id"] = '<x-partner-id>'
request["idempotency-key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_number\": \"1234567890123456\",\n \"account_title\": \"John Doe\",\n \"routing_number\": \"123456789\",\n \"type\": \"AT_Checkings\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"account_title": "John Doe",
"created_at": {
"seconds": 1635784800
},
"masked_account_number": "XXXX-XXXX-XXXX-1234",
"partner_id": "part_123456789",
"routing_number": "123456789",
"status": "active",
"token": "acct_123456789",
"type": "checking",
"updated_at": {
"seconds": 1635788400
},
"institution": {
"address": {
"address": "123 Main St",
"city": "New York",
"postal_code": "10001",
"state": "NY"
},
"name": "Example Bank",
"phone_number": "+1234567890",
"routing_number": "123456789"
}
},
"ok": true
}{
"code": "error.bad_request",
"message": "Invalid request parameters"
}{
"code": "error.unauthorized",
"message": "Authentication required"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The Partner ID header used for authorization
The Idempotency Key - usually a UUID
Body
application/json
Request to create a new account
Account number
Example:
"1234567890123456"
Title of the account
Example:
"John Doe"
Routing number of the account
Example:
"123456789"
Type of the account
Available options:
AT_Checkings, AT_Savings Example:
"AT_Checkings"
Was this page helpful?
⌘I