Enroll and Update Borrowers
Enroll borrowers and update them by re-sending — one route for your whole file
curl --request POST \
--url https://api.rightfoot.com/v1/payment_enrollments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"borrowers": [
{
"authorizer_unique_id": "1a2b3c4d",
"first_name": "John",
"last_name": "Doe",
"phone_number": "5551234567",
"date_of_birth": {
"day": 14,
"month": 3,
"year": 1988
},
"address": {
"street_address_line1": "123 Main St",
"city": "Anytown",
"state": "CA",
"zip_code": "12345",
"country": "US"
},
"ssn": "123456789",
"account_number": "1234567890",
"routing_number": "021000021",
"collectable_amount": 42500,
"days_past_due": 47,
"merchant_ref": "acme-nv"
},
{
"authorizer_unique_id": "3c4d5e6f",
"first_name": "Sam",
"last_name": "Lee",
"phone_number": "5556667777",
"date_of_birth": {
"day": 7,
"month": 1,
"year": 1990
},
"address": {
"zip_code": "30301"
},
"ssn": "234567891",
"account_number": "2233445566",
"routing_number": "061000104",
"days_past_due": 31,
"obligations": [
{
"id": "loan-123:inst-2",
"amount": 10000,
"priority": 1,
"metadata": {
"installment": 2,
"type": "representment"
}
},
{
"id": "loan-123:inst-3",
"amount": 10000,
"priority": 2,
"metadata": {
"installment": 3,
"type": "presentment"
}
}
],
"policy_overrides": {
"reserve_cents": 5000
}
},
{
"authorizer_unique_id": "5e6f7g8h",
"first_name": "Maria",
"last_name": "Alvarez",
"phone_number": "5559876543",
"date_of_birth": {
"day": 2,
"month": 11,
"year": 1979
},
"address": {
"street_address_line1": "88 Oak Ave",
"street_address_line2": "Apt 4B",
"city": "Springfield",
"state": "IL",
"zip_code": "62701",
"country": "US"
},
"ssn": "987654321",
"account_number": "9876543210",
"routing_number": "071000013",
"collectable_amount": 18000,
"days_past_due": 22,
"charge_instrument": {
"token": "tok_9f3a21c7",
"token_type": "card",
"last4": "4412"
}
},
{
"authorizer_unique_id": "7g8h9i0j",
"first_name": "Dana",
"last_name": "Ruiz",
"phone_number": "5554445555",
"date_of_birth": {
"day": 19,
"month": 8,
"year": 1985
},
"address": {
"street_address_line1": "41 Cedar Ln",
"city": "Columbus",
"state": "OH",
"zip_code": "43215",
"country": "US"
},
"ssn": "321654987",
"account_number": "4433221100",
"routing_number": "121000248",
"collectable_amount": 26000,
"days_past_due": 34,
"charge_instrument": {
"token": "pm_1QbK2xXyz",
"token_type": "bank_account",
"last4": "1100",
"customer_ref": "cus_1QbK2x"
}
},
{
"authorizer_unique_id": "9i0j1k2l",
"first_name": "Andre",
"last_name": "Boateng",
"phone_number": "5552223333",
"date_of_birth": {
"day": 30,
"month": 6,
"year": 1991
},
"address": {
"street_address_line1": "500 Pine Rd",
"city": "Austin",
"state": "TX",
"zip_code": "78701",
"country": "US"
},
"ssn": "456789123",
"account_number": "5544332211",
"routing_number": "111000025",
"collectable_amount": 7500,
"days_past_due": 9,
"charge_instrument": {
"card": {
"debit_card_number": "4111111111111111",
"cvv": "123",
"expiration_month": 4,
"expiration_year": 2030
}
}
}
]
}
'import requests
url = "https://api.rightfoot.com/v1/payment_enrollments"
payload = { "borrowers": [
{
"authorizer_unique_id": "1a2b3c4d",
"first_name": "John",
"last_name": "Doe",
"phone_number": "5551234567",
"date_of_birth": {
"day": 14,
"month": 3,
"year": 1988
},
"address": {
"street_address_line1": "123 Main St",
"city": "Anytown",
"state": "CA",
"zip_code": "12345",
"country": "US"
},
"ssn": "123456789",
"account_number": "1234567890",
"routing_number": "021000021",
"collectable_amount": 42500,
"days_past_due": 47,
"merchant_ref": "acme-nv"
},
{
"authorizer_unique_id": "3c4d5e6f",
"first_name": "Sam",
"last_name": "Lee",
"phone_number": "5556667777",
"date_of_birth": {
"day": 7,
"month": 1,
"year": 1990
},
"address": { "zip_code": "30301" },
"ssn": "234567891",
"account_number": "2233445566",
"routing_number": "061000104",
"days_past_due": 31,
"obligations": [
{
"id": "loan-123:inst-2",
"amount": 10000,
"priority": 1,
"metadata": {
"installment": 2,
"type": "representment"
}
},
{
"id": "loan-123:inst-3",
"amount": 10000,
"priority": 2,
"metadata": {
"installment": 3,
"type": "presentment"
}
}
],
"policy_overrides": { "reserve_cents": 5000 }
},
{
"authorizer_unique_id": "5e6f7g8h",
"first_name": "Maria",
"last_name": "Alvarez",
"phone_number": "5559876543",
"date_of_birth": {
"day": 2,
"month": 11,
"year": 1979
},
"address": {
"street_address_line1": "88 Oak Ave",
"street_address_line2": "Apt 4B",
"city": "Springfield",
"state": "IL",
"zip_code": "62701",
"country": "US"
},
"ssn": "987654321",
"account_number": "9876543210",
"routing_number": "071000013",
"collectable_amount": 18000,
"days_past_due": 22,
"charge_instrument": {
"token": "tok_9f3a21c7",
"token_type": "card",
"last4": "4412"
}
},
{
"authorizer_unique_id": "7g8h9i0j",
"first_name": "Dana",
"last_name": "Ruiz",
"phone_number": "5554445555",
"date_of_birth": {
"day": 19,
"month": 8,
"year": 1985
},
"address": {
"street_address_line1": "41 Cedar Ln",
"city": "Columbus",
"state": "OH",
"zip_code": "43215",
"country": "US"
},
"ssn": "321654987",
"account_number": "4433221100",
"routing_number": "121000248",
"collectable_amount": 26000,
"days_past_due": 34,
"charge_instrument": {
"token": "pm_1QbK2xXyz",
"token_type": "bank_account",
"last4": "1100",
"customer_ref": "cus_1QbK2x"
}
},
{
"authorizer_unique_id": "9i0j1k2l",
"first_name": "Andre",
"last_name": "Boateng",
"phone_number": "5552223333",
"date_of_birth": {
"day": 30,
"month": 6,
"year": 1991
},
"address": {
"street_address_line1": "500 Pine Rd",
"city": "Austin",
"state": "TX",
"zip_code": "78701",
"country": "US"
},
"ssn": "456789123",
"account_number": "5544332211",
"routing_number": "111000025",
"collectable_amount": 7500,
"days_past_due": 9,
"charge_instrument": { "card": {
"debit_card_number": "4111111111111111",
"cvv": "123",
"expiration_month": 4,
"expiration_year": 2030
} }
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
borrowers: [
{
authorizer_unique_id: '1a2b3c4d',
first_name: 'John',
last_name: 'Doe',
phone_number: '5551234567',
date_of_birth: {day: 14, month: 3, year: 1988},
address: {
street_address_line1: '123 Main St',
city: 'Anytown',
state: 'CA',
zip_code: '12345',
country: 'US'
},
ssn: '123456789',
account_number: '1234567890',
routing_number: '021000021',
collectable_amount: 42500,
days_past_due: 47,
merchant_ref: 'acme-nv'
},
{
authorizer_unique_id: '3c4d5e6f',
first_name: 'Sam',
last_name: 'Lee',
phone_number: '5556667777',
date_of_birth: {day: 7, month: 1, year: 1990},
address: {zip_code: '30301'},
ssn: '234567891',
account_number: '2233445566',
routing_number: '061000104',
days_past_due: 31,
obligations: [
{
id: 'loan-123:inst-2',
amount: 10000,
priority: 1,
metadata: {installment: 2, type: 'representment'}
},
{
id: 'loan-123:inst-3',
amount: 10000,
priority: 2,
metadata: {installment: 3, type: 'presentment'}
}
],
policy_overrides: {reserve_cents: 5000}
},
{
authorizer_unique_id: '5e6f7g8h',
first_name: 'Maria',
last_name: 'Alvarez',
phone_number: '5559876543',
date_of_birth: {day: 2, month: 11, year: 1979},
address: {
street_address_line1: '88 Oak Ave',
street_address_line2: 'Apt 4B',
city: 'Springfield',
state: 'IL',
zip_code: '62701',
country: 'US'
},
ssn: '987654321',
account_number: '9876543210',
routing_number: '071000013',
collectable_amount: 18000,
days_past_due: 22,
charge_instrument: {token: 'tok_9f3a21c7', token_type: 'card', last4: '4412'}
},
{
authorizer_unique_id: '7g8h9i0j',
first_name: 'Dana',
last_name: 'Ruiz',
phone_number: '5554445555',
date_of_birth: {day: 19, month: 8, year: 1985},
address: {
street_address_line1: '41 Cedar Ln',
city: 'Columbus',
state: 'OH',
zip_code: '43215',
country: 'US'
},
ssn: '321654987',
account_number: '4433221100',
routing_number: '121000248',
collectable_amount: 26000,
days_past_due: 34,
charge_instrument: {
token: 'pm_1QbK2xXyz',
token_type: 'bank_account',
last4: '1100',
customer_ref: 'cus_1QbK2x'
}
},
{
authorizer_unique_id: '9i0j1k2l',
first_name: 'Andre',
last_name: 'Boateng',
phone_number: '5552223333',
date_of_birth: {day: 30, month: 6, year: 1991},
address: {
street_address_line1: '500 Pine Rd',
city: 'Austin',
state: 'TX',
zip_code: '78701',
country: 'US'
},
ssn: '456789123',
account_number: '5544332211',
routing_number: '111000025',
collectable_amount: 7500,
days_past_due: 9,
charge_instrument: {
card: {
debit_card_number: '4111111111111111',
cvv: '123',
expiration_month: 4,
expiration_year: 2030
}
}
}
]
})
};
fetch('https://api.rightfoot.com/v1/payment_enrollments', 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://api.rightfoot.com/v1/payment_enrollments",
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([
'borrowers' => [
[
'authorizer_unique_id' => '1a2b3c4d',
'first_name' => 'John',
'last_name' => 'Doe',
'phone_number' => '5551234567',
'date_of_birth' => [
'day' => 14,
'month' => 3,
'year' => 1988
],
'address' => [
'street_address_line1' => '123 Main St',
'city' => 'Anytown',
'state' => 'CA',
'zip_code' => '12345',
'country' => 'US'
],
'ssn' => '123456789',
'account_number' => '1234567890',
'routing_number' => '021000021',
'collectable_amount' => 42500,
'days_past_due' => 47,
'merchant_ref' => 'acme-nv'
],
[
'authorizer_unique_id' => '3c4d5e6f',
'first_name' => 'Sam',
'last_name' => 'Lee',
'phone_number' => '5556667777',
'date_of_birth' => [
'day' => 7,
'month' => 1,
'year' => 1990
],
'address' => [
'zip_code' => '30301'
],
'ssn' => '234567891',
'account_number' => '2233445566',
'routing_number' => '061000104',
'days_past_due' => 31,
'obligations' => [
[
'id' => 'loan-123:inst-2',
'amount' => 10000,
'priority' => 1,
'metadata' => [
'installment' => 2,
'type' => 'representment'
]
],
[
'id' => 'loan-123:inst-3',
'amount' => 10000,
'priority' => 2,
'metadata' => [
'installment' => 3,
'type' => 'presentment'
]
]
],
'policy_overrides' => [
'reserve_cents' => 5000
]
],
[
'authorizer_unique_id' => '5e6f7g8h',
'first_name' => 'Maria',
'last_name' => 'Alvarez',
'phone_number' => '5559876543',
'date_of_birth' => [
'day' => 2,
'month' => 11,
'year' => 1979
],
'address' => [
'street_address_line1' => '88 Oak Ave',
'street_address_line2' => 'Apt 4B',
'city' => 'Springfield',
'state' => 'IL',
'zip_code' => '62701',
'country' => 'US'
],
'ssn' => '987654321',
'account_number' => '9876543210',
'routing_number' => '071000013',
'collectable_amount' => 18000,
'days_past_due' => 22,
'charge_instrument' => [
'token' => 'tok_9f3a21c7',
'token_type' => 'card',
'last4' => '4412'
]
],
[
'authorizer_unique_id' => '7g8h9i0j',
'first_name' => 'Dana',
'last_name' => 'Ruiz',
'phone_number' => '5554445555',
'date_of_birth' => [
'day' => 19,
'month' => 8,
'year' => 1985
],
'address' => [
'street_address_line1' => '41 Cedar Ln',
'city' => 'Columbus',
'state' => 'OH',
'zip_code' => '43215',
'country' => 'US'
],
'ssn' => '321654987',
'account_number' => '4433221100',
'routing_number' => '121000248',
'collectable_amount' => 26000,
'days_past_due' => 34,
'charge_instrument' => [
'token' => 'pm_1QbK2xXyz',
'token_type' => 'bank_account',
'last4' => '1100',
'customer_ref' => 'cus_1QbK2x'
]
],
[
'authorizer_unique_id' => '9i0j1k2l',
'first_name' => 'Andre',
'last_name' => 'Boateng',
'phone_number' => '5552223333',
'date_of_birth' => [
'day' => 30,
'month' => 6,
'year' => 1991
],
'address' => [
'street_address_line1' => '500 Pine Rd',
'city' => 'Austin',
'state' => 'TX',
'zip_code' => '78701',
'country' => 'US'
],
'ssn' => '456789123',
'account_number' => '5544332211',
'routing_number' => '111000025',
'collectable_amount' => 7500,
'days_past_due' => 9,
'charge_instrument' => [
'card' => [
'debit_card_number' => '4111111111111111',
'cvv' => '123',
'expiration_month' => 4,
'expiration_year' => 2030
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.rightfoot.com/v1/payment_enrollments"
payload := strings.NewReader("{\n \"borrowers\": [\n {\n \"authorizer_unique_id\": \"1a2b3c4d\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone_number\": \"5551234567\",\n \"date_of_birth\": {\n \"day\": 14,\n \"month\": 3,\n \"year\": 1988\n },\n \"address\": {\n \"street_address_line1\": \"123 Main St\",\n \"city\": \"Anytown\",\n \"state\": \"CA\",\n \"zip_code\": \"12345\",\n \"country\": \"US\"\n },\n \"ssn\": \"123456789\",\n \"account_number\": \"1234567890\",\n \"routing_number\": \"021000021\",\n \"collectable_amount\": 42500,\n \"days_past_due\": 47,\n \"merchant_ref\": \"acme-nv\"\n },\n {\n \"authorizer_unique_id\": \"3c4d5e6f\",\n \"first_name\": \"Sam\",\n \"last_name\": \"Lee\",\n \"phone_number\": \"5556667777\",\n \"date_of_birth\": {\n \"day\": 7,\n \"month\": 1,\n \"year\": 1990\n },\n \"address\": {\n \"zip_code\": \"30301\"\n },\n \"ssn\": \"234567891\",\n \"account_number\": \"2233445566\",\n \"routing_number\": \"061000104\",\n \"days_past_due\": 31,\n \"obligations\": [\n {\n \"id\": \"loan-123:inst-2\",\n \"amount\": 10000,\n \"priority\": 1,\n \"metadata\": {\n \"installment\": 2,\n \"type\": \"representment\"\n }\n },\n {\n \"id\": \"loan-123:inst-3\",\n \"amount\": 10000,\n \"priority\": 2,\n \"metadata\": {\n \"installment\": 3,\n \"type\": \"presentment\"\n }\n }\n ],\n \"policy_overrides\": {\n \"reserve_cents\": 5000\n }\n },\n {\n \"authorizer_unique_id\": \"5e6f7g8h\",\n \"first_name\": \"Maria\",\n \"last_name\": \"Alvarez\",\n \"phone_number\": \"5559876543\",\n \"date_of_birth\": {\n \"day\": 2,\n \"month\": 11,\n \"year\": 1979\n },\n \"address\": {\n \"street_address_line1\": \"88 Oak Ave\",\n \"street_address_line2\": \"Apt 4B\",\n \"city\": \"Springfield\",\n \"state\": \"IL\",\n \"zip_code\": \"62701\",\n \"country\": \"US\"\n },\n \"ssn\": \"987654321\",\n \"account_number\": \"9876543210\",\n \"routing_number\": \"071000013\",\n \"collectable_amount\": 18000,\n \"days_past_due\": 22,\n \"charge_instrument\": {\n \"token\": \"tok_9f3a21c7\",\n \"token_type\": \"card\",\n \"last4\": \"4412\"\n }\n },\n {\n \"authorizer_unique_id\": \"7g8h9i0j\",\n \"first_name\": \"Dana\",\n \"last_name\": \"Ruiz\",\n \"phone_number\": \"5554445555\",\n \"date_of_birth\": {\n \"day\": 19,\n \"month\": 8,\n \"year\": 1985\n },\n \"address\": {\n \"street_address_line1\": \"41 Cedar Ln\",\n \"city\": \"Columbus\",\n \"state\": \"OH\",\n \"zip_code\": \"43215\",\n \"country\": \"US\"\n },\n \"ssn\": \"321654987\",\n \"account_number\": \"4433221100\",\n \"routing_number\": \"121000248\",\n \"collectable_amount\": 26000,\n \"days_past_due\": 34,\n \"charge_instrument\": {\n \"token\": \"pm_1QbK2xXyz\",\n \"token_type\": \"bank_account\",\n \"last4\": \"1100\",\n \"customer_ref\": \"cus_1QbK2x\"\n }\n },\n {\n \"authorizer_unique_id\": \"9i0j1k2l\",\n \"first_name\": \"Andre\",\n \"last_name\": \"Boateng\",\n \"phone_number\": \"5552223333\",\n \"date_of_birth\": {\n \"day\": 30,\n \"month\": 6,\n \"year\": 1991\n },\n \"address\": {\n \"street_address_line1\": \"500 Pine Rd\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"zip_code\": \"78701\",\n \"country\": \"US\"\n },\n \"ssn\": \"456789123\",\n \"account_number\": \"5544332211\",\n \"routing_number\": \"111000025\",\n \"collectable_amount\": 7500,\n \"days_past_due\": 9,\n \"charge_instrument\": {\n \"card\": {\n \"debit_card_number\": \"4111111111111111\",\n \"cvv\": \"123\",\n \"expiration_month\": 4,\n \"expiration_year\": 2030\n }\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.rightfoot.com/v1/payment_enrollments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"borrowers\": [\n {\n \"authorizer_unique_id\": \"1a2b3c4d\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone_number\": \"5551234567\",\n \"date_of_birth\": {\n \"day\": 14,\n \"month\": 3,\n \"year\": 1988\n },\n \"address\": {\n \"street_address_line1\": \"123 Main St\",\n \"city\": \"Anytown\",\n \"state\": \"CA\",\n \"zip_code\": \"12345\",\n \"country\": \"US\"\n },\n \"ssn\": \"123456789\",\n \"account_number\": \"1234567890\",\n \"routing_number\": \"021000021\",\n \"collectable_amount\": 42500,\n \"days_past_due\": 47,\n \"merchant_ref\": \"acme-nv\"\n },\n {\n \"authorizer_unique_id\": \"3c4d5e6f\",\n \"first_name\": \"Sam\",\n \"last_name\": \"Lee\",\n \"phone_number\": \"5556667777\",\n \"date_of_birth\": {\n \"day\": 7,\n \"month\": 1,\n \"year\": 1990\n },\n \"address\": {\n \"zip_code\": \"30301\"\n },\n \"ssn\": \"234567891\",\n \"account_number\": \"2233445566\",\n \"routing_number\": \"061000104\",\n \"days_past_due\": 31,\n \"obligations\": [\n {\n \"id\": \"loan-123:inst-2\",\n \"amount\": 10000,\n \"priority\": 1,\n \"metadata\": {\n \"installment\": 2,\n \"type\": \"representment\"\n }\n },\n {\n \"id\": \"loan-123:inst-3\",\n \"amount\": 10000,\n \"priority\": 2,\n \"metadata\": {\n \"installment\": 3,\n \"type\": \"presentment\"\n }\n }\n ],\n \"policy_overrides\": {\n \"reserve_cents\": 5000\n }\n },\n {\n \"authorizer_unique_id\": \"5e6f7g8h\",\n \"first_name\": \"Maria\",\n \"last_name\": \"Alvarez\",\n \"phone_number\": \"5559876543\",\n \"date_of_birth\": {\n \"day\": 2,\n \"month\": 11,\n \"year\": 1979\n },\n \"address\": {\n \"street_address_line1\": \"88 Oak Ave\",\n \"street_address_line2\": \"Apt 4B\",\n \"city\": \"Springfield\",\n \"state\": \"IL\",\n \"zip_code\": \"62701\",\n \"country\": \"US\"\n },\n \"ssn\": \"987654321\",\n \"account_number\": \"9876543210\",\n \"routing_number\": \"071000013\",\n \"collectable_amount\": 18000,\n \"days_past_due\": 22,\n \"charge_instrument\": {\n \"token\": \"tok_9f3a21c7\",\n \"token_type\": \"card\",\n \"last4\": \"4412\"\n }\n },\n {\n \"authorizer_unique_id\": \"7g8h9i0j\",\n \"first_name\": \"Dana\",\n \"last_name\": \"Ruiz\",\n \"phone_number\": \"5554445555\",\n \"date_of_birth\": {\n \"day\": 19,\n \"month\": 8,\n \"year\": 1985\n },\n \"address\": {\n \"street_address_line1\": \"41 Cedar Ln\",\n \"city\": \"Columbus\",\n \"state\": \"OH\",\n \"zip_code\": \"43215\",\n \"country\": \"US\"\n },\n \"ssn\": \"321654987\",\n \"account_number\": \"4433221100\",\n \"routing_number\": \"121000248\",\n \"collectable_amount\": 26000,\n \"days_past_due\": 34,\n \"charge_instrument\": {\n \"token\": \"pm_1QbK2xXyz\",\n \"token_type\": \"bank_account\",\n \"last4\": \"1100\",\n \"customer_ref\": \"cus_1QbK2x\"\n }\n },\n {\n \"authorizer_unique_id\": \"9i0j1k2l\",\n \"first_name\": \"Andre\",\n \"last_name\": \"Boateng\",\n \"phone_number\": \"5552223333\",\n \"date_of_birth\": {\n \"day\": 30,\n \"month\": 6,\n \"year\": 1991\n },\n \"address\": {\n \"street_address_line1\": \"500 Pine Rd\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"zip_code\": \"78701\",\n \"country\": \"US\"\n },\n \"ssn\": \"456789123\",\n \"account_number\": \"5544332211\",\n \"routing_number\": \"111000025\",\n \"collectable_amount\": 7500,\n \"days_past_due\": 9,\n \"charge_instrument\": {\n \"card\": {\n \"debit_card_number\": \"4111111111111111\",\n \"cvv\": \"123\",\n \"expiration_month\": 4,\n \"expiration_year\": 2030\n }\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rightfoot.com/v1/payment_enrollments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"borrowers\": [\n {\n \"authorizer_unique_id\": \"1a2b3c4d\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone_number\": \"5551234567\",\n \"date_of_birth\": {\n \"day\": 14,\n \"month\": 3,\n \"year\": 1988\n },\n \"address\": {\n \"street_address_line1\": \"123 Main St\",\n \"city\": \"Anytown\",\n \"state\": \"CA\",\n \"zip_code\": \"12345\",\n \"country\": \"US\"\n },\n \"ssn\": \"123456789\",\n \"account_number\": \"1234567890\",\n \"routing_number\": \"021000021\",\n \"collectable_amount\": 42500,\n \"days_past_due\": 47,\n \"merchant_ref\": \"acme-nv\"\n },\n {\n \"authorizer_unique_id\": \"3c4d5e6f\",\n \"first_name\": \"Sam\",\n \"last_name\": \"Lee\",\n \"phone_number\": \"5556667777\",\n \"date_of_birth\": {\n \"day\": 7,\n \"month\": 1,\n \"year\": 1990\n },\n \"address\": {\n \"zip_code\": \"30301\"\n },\n \"ssn\": \"234567891\",\n \"account_number\": \"2233445566\",\n \"routing_number\": \"061000104\",\n \"days_past_due\": 31,\n \"obligations\": [\n {\n \"id\": \"loan-123:inst-2\",\n \"amount\": 10000,\n \"priority\": 1,\n \"metadata\": {\n \"installment\": 2,\n \"type\": \"representment\"\n }\n },\n {\n \"id\": \"loan-123:inst-3\",\n \"amount\": 10000,\n \"priority\": 2,\n \"metadata\": {\n \"installment\": 3,\n \"type\": \"presentment\"\n }\n }\n ],\n \"policy_overrides\": {\n \"reserve_cents\": 5000\n }\n },\n {\n \"authorizer_unique_id\": \"5e6f7g8h\",\n \"first_name\": \"Maria\",\n \"last_name\": \"Alvarez\",\n \"phone_number\": \"5559876543\",\n \"date_of_birth\": {\n \"day\": 2,\n \"month\": 11,\n \"year\": 1979\n },\n \"address\": {\n \"street_address_line1\": \"88 Oak Ave\",\n \"street_address_line2\": \"Apt 4B\",\n \"city\": \"Springfield\",\n \"state\": \"IL\",\n \"zip_code\": \"62701\",\n \"country\": \"US\"\n },\n \"ssn\": \"987654321\",\n \"account_number\": \"9876543210\",\n \"routing_number\": \"071000013\",\n \"collectable_amount\": 18000,\n \"days_past_due\": 22,\n \"charge_instrument\": {\n \"token\": \"tok_9f3a21c7\",\n \"token_type\": \"card\",\n \"last4\": \"4412\"\n }\n },\n {\n \"authorizer_unique_id\": \"7g8h9i0j\",\n \"first_name\": \"Dana\",\n \"last_name\": \"Ruiz\",\n \"phone_number\": \"5554445555\",\n \"date_of_birth\": {\n \"day\": 19,\n \"month\": 8,\n \"year\": 1985\n },\n \"address\": {\n \"street_address_line1\": \"41 Cedar Ln\",\n \"city\": \"Columbus\",\n \"state\": \"OH\",\n \"zip_code\": \"43215\",\n \"country\": \"US\"\n },\n \"ssn\": \"321654987\",\n \"account_number\": \"4433221100\",\n \"routing_number\": \"121000248\",\n \"collectable_amount\": 26000,\n \"days_past_due\": 34,\n \"charge_instrument\": {\n \"token\": \"pm_1QbK2xXyz\",\n \"token_type\": \"bank_account\",\n \"last4\": \"1100\",\n \"customer_ref\": \"cus_1QbK2x\"\n }\n },\n {\n \"authorizer_unique_id\": \"9i0j1k2l\",\n \"first_name\": \"Andre\",\n \"last_name\": \"Boateng\",\n \"phone_number\": \"5552223333\",\n \"date_of_birth\": {\n \"day\": 30,\n \"month\": 6,\n \"year\": 1991\n },\n \"address\": {\n \"street_address_line1\": \"500 Pine Rd\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"zip_code\": \"78701\",\n \"country\": \"US\"\n },\n \"ssn\": \"456789123\",\n \"account_number\": \"5544332211\",\n \"routing_number\": \"111000025\",\n \"collectable_amount\": 7500,\n \"days_past_due\": 9,\n \"charge_instrument\": {\n \"card\": {\n \"debit_card_number\": \"4111111111111111\",\n \"cvv\": \"123\",\n \"expiration_month\": 4,\n \"expiration_year\": 2030\n }\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"enrolled": 4,
"updated": 1,
"already_enrolled": 0,
"held": 0,
"failed": 0,
"results": [
{
"authorizer_unique_id": "1a2b3c4d",
"outcome": "enrolled",
"reason": null,
"message": null
},
{
"authorizer_unique_id": "3c4d5e6f",
"outcome": "enrolled",
"reason": null,
"message": null,
"obligations": [
{
"id": "loan-123:inst-2",
"outcome": "enrolled",
"reason": null,
"message": null
},
{
"id": "loan-123:inst-3",
"outcome": "enrolled",
"reason": null,
"message": null
}
]
},
{
"authorizer_unique_id": "5e6f7g8h",
"outcome": "updated",
"reason": null,
"message": null
},
{
"authorizer_unique_id": "7g8h9i0j",
"outcome": "enrolled",
"reason": null,
"message": null
},
{
"authorizer_unique_id": "9i0j1k2l",
"outcome": "enrolled",
"reason": null,
"message": null
}
]
}{
"status": "error",
"status_code": 400,
"error": {
"code": "BAD_REQUEST",
"message": "borrowers must contain between 1 and 1000 entries.",
"timestamp": "2024-12-12T12:00:00Z"
}
}{
"status": "error",
"status_code": 401,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key.",
"timestamp": "2024-12-12T12:00:00Z"
}
}Enroll and Update Borrowers
Enroll a batch of borrowers in a single call. Rightfoot stores each borrower, monitors their balance, and acts once there is enough in the account to collect. This is also the update route: send a borrower you have already enrolled and their details and amount are refreshed in place. There is no separate update call. For each borrower, send either a singlecollectable_amount or a list of obligations — for example, each past-due installment of a loan — that Rightfoot collects separately from the same bank account.
Send up to 1000 borrowers per request.
Send your whole file, every day
This endpoint is an upsert — re-sending a borrower is how you update them. Someone already being monitored comes back asupdated: their details are refreshed and the collectable_amount in that request is applied to the monitor they already have.
That means you do not need to track what you have already sent, or which borrowers changed. Push your full delinquent file on whatever cadence suits you and let the response tell you what happened to each borrower. To stop monitoring a borrower altogether, use Remove Borrowers from Monitoring.
What a re-send changes
| Sent again | Effect on a monitored borrower |
|---|---|
collectable_amount | Applied to the existing monitor. Rightfoot works toward the new figure from the next payment on |
obligations | The full set, replacing the last one: each obligation sent is applied to its own monitor, and any obligation left out stops being collected. See Collecting several obligations separately |
policy_overrides | Replaced. Omitting it returns the borrower to your collection policy |
| Identity and bank account fields | Re-stored. The borrower keeps a single record however many times you send them |
merchant_ref | Replaced |
charge_instrument | Replaced. Omitting it for a borrower you previously sent with a card moves them back to ACH |
collectable_amount.
updated as well. Rightfoot cannot tell “re-sent unchanged” from “re-sent with edits” — the stored details are encrypted and cannot be read back to compare — so read updated as “this borrower is monitored against the amount you just sent”, not as “something about them changed”.Monitoring lapses if you stop sending
Monitoring expires 30 days after it starts. Sending a borrower again after their monitoring has expired starts fresh monitoring, using thecollectable_amount in that request.
Re-sending a borrower who is still being monitored updates them but does not extend that window — the 30 days run from when monitoring started, not from your last push.
Your regular push is therefore what keeps monitoring alive. If a borrower drops out of your file, monitoring for them lapses within 30 days.
What you send for each borrower
The identity and bank account fields are the same ones the balance endpoints accept, so an existing integration can reuse its serialization.| Field | Required | Notes |
|---|---|---|
authorizer_unique_id | Yes | Your own identifier for this borrower |
first_name, last_name | Yes | |
phone_number | Yes | |
date_of_birth | Yes | Object with day, month, year |
address | Yes | Only zip_code is required within it |
ssn or ein | Yes | One of the two |
account_number, routing_number | Yes | See below |
collectable_amount | One of these two | Cents. The most you will accept today |
obligations | One of these two | The borrower’s debt split into amounts collected separately. See Collecting several obligations separately |
days_past_due | Yes | As of this request |
merchant_ref | No | The tag of the processor key to settle to. Omit it to use your default key |
charge_instrument | No | See How Rightfoot collects |
policy_overrides | No | Exceptions to your collection policy for this borrower. See Per-borrower policy overrides |
authorizer_unique_id stable for the life of the loan. Monitoring history accumulates against it. An identifier that changes between pushes resets that history, and monitoring quietly degrades rather than failing.The bank account is always required
account_number and routing_number are required for every borrower, including those you intend to charge by card. They are what Rightfoot uses to read the balance, and no charge instrument substitutes for them.
The amount is a ceiling, in cents
collectable_amount is an integer number of cents — 42500 is $425.00. Rightfoot treats it as a ceiling, and will not attempt more than that in a single payment.
Collecting several obligations separately
Some borrowers owe more than one amount at once — say two past-due installments of $100, one that was already presented and returned and one coming due. Instead of a singlecollectable_amount, send each as an obligation, and Rightfoot monitors and collects each one on its own.
Send exactly one of collectable_amount or obligations for a borrower. A borrower with both or neither, or with two obligations sharing an id, fails validation, and the whole request is rejected with a 400.
| Field | Required | Notes |
|---|---|---|
id | Yes | Your identifier for the obligation, unique within the borrower — for example loan number plus installment. Keep it stable |
amount | Yes | Cents. The amount to collect for this obligation |
priority | No | Collection order when the balance cannot cover every obligation. Lower is collected first; obligations without a priority come after every prioritized one |
metadata | No | Any JSON object you want kept with the obligation, such as an installment number or payment type. Echoed back on payment events; never used to decide whether or how much to collect |
{
"authorizer_unique_id": "1a2b3c4d",
"account_number": "1234567890",
"routing_number": "021000021",
"days_past_due": 31,
"obligations": [
{
"id": "loan-123:inst-2",
"amount": 10000,
"priority": 1,
"metadata": { "installment": 2, "type": "representment" }
},
{
"id": "loan-123:inst-3",
"amount": 10000,
"priority": 2,
"metadata": { "installment": 3, "type": "presentment" }
}
]
}
How obligations are collected
- One balance check covers them all. Every obligation draws on the same bank account, so Rightfoot reads the balance once and decides every obligation from that reading.
- In priority order, until the balance runs out. An obligation is collected when the balance covers it, everything ahead of it, and your reserve. With a $100 reserve, a $500 balance collects both $100 installments above; a $250 balance collects only
loan-123:inst-2. - Each obligation is collected whole, as its own payment. An obligation is never split to fit the balance or combined with another, so a returned payment is always re-presented at its original amount. If one does not fit, a smaller one behind it can still be collected.
- One payment at a time per account. While a payment for any of the borrower’s obligations is still at the bank, nothing new is collected for that borrower. Obligations decided together from the same balance check go out together.
- Retries are counted per obligation. Each obligation that comes back returned is retried within NACHA’s limit for that payment, independently of the others.
The push carries the full set
Each push replaces the borrower’s obligations:- An obligation you send again is updated in place — its amount, priority and metadata are refreshed, and it keeps its retry history.
- An obligation left out of the push stops being collected. This is how you take an installment back — for example on the day you re-present it yourself.
- Switching a borrower between
collectable_amountandobligationsreplaces one with the other; Rightfoot never collects both.
Per-borrower policy overrides
Your collection policy decides when a balance is high enough to collect: the reserve that must stay in the account after a payment, and the minimum payment Rightfoot submits.policy_overrides changes either for one borrower; anything you leave out follows your policy.
| Field | Notes |
|---|---|
reserve_cents | Cents that must remain in the account after the payment |
min_debit_cents | The smallest payment Rightfoot submits for this borrower. An amount or obligation below it is held with amount_below_minimum |
"policy_overrides": { "reserve_cents": 0, "min_debit_cents": 2500 }
How Rightfoot collects
Omitcharge_instrument entirely and Rightfoot collects by ACH from the bank account you supplied. That is the common case.
charge_instrument is required on every borrower. Rightfoot charges the payment method you name; there is no fallback to the bank account, since that account is read for its balance rather than debited.token
card
token_type is optional but worth sending. Processors issue one token format for both kinds — Stripe uses pm_ for cards and bank accounts alike — so Rightfoot cannot tell from the value which it holds. Omitting it records the kind as unknown; Rightfoot does not guess one.token_type or last4: Rightfoot derives the last four from the number it stores, so it describes the card actually held. Sending either alongside card is rejected.
The routing and account number stay required whichever instrument collects — they are what Rightfoot reads the balance from.
Each borrower in the same request can use a different option. Only the charge_instrument differs — the identity and bank account fields are the same either way.
{
"authorizer_unique_id": "1a2b3c4d",
"account_number": "1234567890",
"routing_number": "021000021",
"collectable_amount": 42500,
"days_past_due": 47
}
{
"authorizer_unique_id": "5e6f7g8h",
"account_number": "9876543210",
"routing_number": "071000013",
"collectable_amount": 18000,
"days_past_due": 22,
"charge_instrument": {
"token": "tok_9f3a21c7",
"token_type": "card",
"last4": "4412"
}
}
{
"authorizer_unique_id": "7g8h9i0j",
"account_number": "4433221100",
"routing_number": "121000248",
"collectable_amount": 26000,
"days_past_due": 34,
"charge_instrument": {
"token": "pm_1QbK2xXyz",
"token_type": "bank_account",
"last4": "1100",
"customer_ref": "cus_1QbK2x"
}
}
{
"authorizer_unique_id": "9i0j1k2l",
"account_number": "5544332211",
"routing_number": "111000025",
"collectable_amount": 7500,
"days_past_due": 9,
"charge_instrument": {
"card": {
"debit_card_number": "4111111111111111",
"cvv": "123",
"expiration_month": 4,
"expiration_year": 2030
}
}
}
first_name, last_name, phone_number, date_of_birth, address, and ssn or ein) are required on every borrower — see the full example above.Reading the response
The response is207, and every borrower you sent has an entry in results, in the order you sent them. Check each outcome rather than relying on the status code — one bad record never blocks the rest of the batch.
| Outcome | What it means | What to do |
|---|---|---|
enrolled | Stored, and monitoring started | Nothing |
updated | Monitoring was already running; details refreshed and the amount you sent applied to it | Nothing |
held | Stored, but not monitored | See reason |
failed | The details in this request were not stored | See reason |
already_enrolled is no longer returned. It stays in the response as a count that is always 0 so that an integration parsing the old shape keeps working — a re-sent borrower is reported updated instead.Results for obligations
A borrower sent withobligations also carries an obligations array in their result, one entry per obligation in the order you sent them, each with its own outcome, reason and message. The borrower’s own outcome sums them up:
enrolledif any obligation started being collected,- otherwise
updatedif any was applied to monitoring already running, - otherwise
held, with the first obligation’sreason.
enrolled while one of their obligations is held — for example an installment below your minimum payment. Read the obligation results to see which.
{
"authorizer_unique_id": "1a2b3c4d",
"outcome": "enrolled",
"reason": null,
"message": null,
"obligations": [
{ "id": "loan-123:inst-2", "outcome": "enrolled", "reason": null, "message": null },
{ "id": "loan-123:inst-3", "outcome": "held", "reason": "amount_below_minimum", "message": "..." }
]
}
collectable_amount has no obligations in their result.
Held borrowers
Aheld borrower’s details are kept. Monitoring did not start, for the reason given. With obligations, the same reasons apply to each obligation.
| Reason | Meaning |
|---|---|
institution_not_supported | Rightfoot does not currently support this bank. Your data is correct; there is no action to take. Keep sending them — monitoring starts automatically if support is added. |
unresolvable_routing_number | The routing number did not match a known bank. Check it. |
amount_below_minimum | The amount is below the minimum payment. Send it again at or above the minimum. |
authorization_revoked | A payment on this borrower came back as unauthorized. Monitoring stays stopped until authorization is re-established and monitoring is deliberately resumed. |
bank_account_invalid | A payment on this bank account came back as closed or invalid. Send the borrower with a different bank account. |
retry_limit_reached | Payments for this borrower or obligation have already been returned the maximum number of times. Monitoring stays stopped until it is deliberately resumed. |
Failed borrowers
| Reason | Meaning |
|---|---|
duplicate_in_request | This identifier appeared more than once in the request. Every copy is rejected rather than guessing which you meant. |
tokenization_failed | The borrower’s details were rejected. message names the problem — correct it and send again. |
card_tokenization_failed | The card details were rejected. See message. |
chunk_failed | A temporary failure affecting part of the batch. Send these borrowers again. |
monitor_open_failed | The borrower was stored but monitoring did not start. Send them again. |
chunk_failed and monitor_open_failed are both safe to retry — re-sending a borrower who did enroll returns updated and re-applies the same amount, rather than creating anything twice.Authorizations
Authentication to the API is performed via Bearer Token Authentication. Provide your API key as the bearer token in the Authorization header.
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
Body
The borrowers to enroll. Up to 1000 per request.
1 - 1000 elementsOne borrower to enroll. The identity and bank account fields match the
Authorizer schema used by the balance endpoints, so an existing integration
can reuse the same serialization.
- Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
Response
Batch processed. Every borrower in the request has an entry in results;
inspect each outcome rather than relying on the status code.
Counts plus one result per borrower, in the order you sent them.
Borrowers now stored, with monitoring newly started.
Borrowers who were already being monitored. Their details were refreshed and the amount in this request applied to their existing monitor.
Always 0. Kept so the response shape stays stable for integrations
parsing it; a re-sent borrower is reported under updated instead.
Borrowers stored but not monitored.
Borrowers whose details from this request were not stored.
Show child attributes
Show child attributes
Was this page helpful?
curl --request POST \
--url https://api.rightfoot.com/v1/payment_enrollments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"borrowers": [
{
"authorizer_unique_id": "1a2b3c4d",
"first_name": "John",
"last_name": "Doe",
"phone_number": "5551234567",
"date_of_birth": {
"day": 14,
"month": 3,
"year": 1988
},
"address": {
"street_address_line1": "123 Main St",
"city": "Anytown",
"state": "CA",
"zip_code": "12345",
"country": "US"
},
"ssn": "123456789",
"account_number": "1234567890",
"routing_number": "021000021",
"collectable_amount": 42500,
"days_past_due": 47,
"merchant_ref": "acme-nv"
},
{
"authorizer_unique_id": "3c4d5e6f",
"first_name": "Sam",
"last_name": "Lee",
"phone_number": "5556667777",
"date_of_birth": {
"day": 7,
"month": 1,
"year": 1990
},
"address": {
"zip_code": "30301"
},
"ssn": "234567891",
"account_number": "2233445566",
"routing_number": "061000104",
"days_past_due": 31,
"obligations": [
{
"id": "loan-123:inst-2",
"amount": 10000,
"priority": 1,
"metadata": {
"installment": 2,
"type": "representment"
}
},
{
"id": "loan-123:inst-3",
"amount": 10000,
"priority": 2,
"metadata": {
"installment": 3,
"type": "presentment"
}
}
],
"policy_overrides": {
"reserve_cents": 5000
}
},
{
"authorizer_unique_id": "5e6f7g8h",
"first_name": "Maria",
"last_name": "Alvarez",
"phone_number": "5559876543",
"date_of_birth": {
"day": 2,
"month": 11,
"year": 1979
},
"address": {
"street_address_line1": "88 Oak Ave",
"street_address_line2": "Apt 4B",
"city": "Springfield",
"state": "IL",
"zip_code": "62701",
"country": "US"
},
"ssn": "987654321",
"account_number": "9876543210",
"routing_number": "071000013",
"collectable_amount": 18000,
"days_past_due": 22,
"charge_instrument": {
"token": "tok_9f3a21c7",
"token_type": "card",
"last4": "4412"
}
},
{
"authorizer_unique_id": "7g8h9i0j",
"first_name": "Dana",
"last_name": "Ruiz",
"phone_number": "5554445555",
"date_of_birth": {
"day": 19,
"month": 8,
"year": 1985
},
"address": {
"street_address_line1": "41 Cedar Ln",
"city": "Columbus",
"state": "OH",
"zip_code": "43215",
"country": "US"
},
"ssn": "321654987",
"account_number": "4433221100",
"routing_number": "121000248",
"collectable_amount": 26000,
"days_past_due": 34,
"charge_instrument": {
"token": "pm_1QbK2xXyz",
"token_type": "bank_account",
"last4": "1100",
"customer_ref": "cus_1QbK2x"
}
},
{
"authorizer_unique_id": "9i0j1k2l",
"first_name": "Andre",
"last_name": "Boateng",
"phone_number": "5552223333",
"date_of_birth": {
"day": 30,
"month": 6,
"year": 1991
},
"address": {
"street_address_line1": "500 Pine Rd",
"city": "Austin",
"state": "TX",
"zip_code": "78701",
"country": "US"
},
"ssn": "456789123",
"account_number": "5544332211",
"routing_number": "111000025",
"collectable_amount": 7500,
"days_past_due": 9,
"charge_instrument": {
"card": {
"debit_card_number": "4111111111111111",
"cvv": "123",
"expiration_month": 4,
"expiration_year": 2030
}
}
}
]
}
'import requests
url = "https://api.rightfoot.com/v1/payment_enrollments"
payload = { "borrowers": [
{
"authorizer_unique_id": "1a2b3c4d",
"first_name": "John",
"last_name": "Doe",
"phone_number": "5551234567",
"date_of_birth": {
"day": 14,
"month": 3,
"year": 1988
},
"address": {
"street_address_line1": "123 Main St",
"city": "Anytown",
"state": "CA",
"zip_code": "12345",
"country": "US"
},
"ssn": "123456789",
"account_number": "1234567890",
"routing_number": "021000021",
"collectable_amount": 42500,
"days_past_due": 47,
"merchant_ref": "acme-nv"
},
{
"authorizer_unique_id": "3c4d5e6f",
"first_name": "Sam",
"last_name": "Lee",
"phone_number": "5556667777",
"date_of_birth": {
"day": 7,
"month": 1,
"year": 1990
},
"address": { "zip_code": "30301" },
"ssn": "234567891",
"account_number": "2233445566",
"routing_number": "061000104",
"days_past_due": 31,
"obligations": [
{
"id": "loan-123:inst-2",
"amount": 10000,
"priority": 1,
"metadata": {
"installment": 2,
"type": "representment"
}
},
{
"id": "loan-123:inst-3",
"amount": 10000,
"priority": 2,
"metadata": {
"installment": 3,
"type": "presentment"
}
}
],
"policy_overrides": { "reserve_cents": 5000 }
},
{
"authorizer_unique_id": "5e6f7g8h",
"first_name": "Maria",
"last_name": "Alvarez",
"phone_number": "5559876543",
"date_of_birth": {
"day": 2,
"month": 11,
"year": 1979
},
"address": {
"street_address_line1": "88 Oak Ave",
"street_address_line2": "Apt 4B",
"city": "Springfield",
"state": "IL",
"zip_code": "62701",
"country": "US"
},
"ssn": "987654321",
"account_number": "9876543210",
"routing_number": "071000013",
"collectable_amount": 18000,
"days_past_due": 22,
"charge_instrument": {
"token": "tok_9f3a21c7",
"token_type": "card",
"last4": "4412"
}
},
{
"authorizer_unique_id": "7g8h9i0j",
"first_name": "Dana",
"last_name": "Ruiz",
"phone_number": "5554445555",
"date_of_birth": {
"day": 19,
"month": 8,
"year": 1985
},
"address": {
"street_address_line1": "41 Cedar Ln",
"city": "Columbus",
"state": "OH",
"zip_code": "43215",
"country": "US"
},
"ssn": "321654987",
"account_number": "4433221100",
"routing_number": "121000248",
"collectable_amount": 26000,
"days_past_due": 34,
"charge_instrument": {
"token": "pm_1QbK2xXyz",
"token_type": "bank_account",
"last4": "1100",
"customer_ref": "cus_1QbK2x"
}
},
{
"authorizer_unique_id": "9i0j1k2l",
"first_name": "Andre",
"last_name": "Boateng",
"phone_number": "5552223333",
"date_of_birth": {
"day": 30,
"month": 6,
"year": 1991
},
"address": {
"street_address_line1": "500 Pine Rd",
"city": "Austin",
"state": "TX",
"zip_code": "78701",
"country": "US"
},
"ssn": "456789123",
"account_number": "5544332211",
"routing_number": "111000025",
"collectable_amount": 7500,
"days_past_due": 9,
"charge_instrument": { "card": {
"debit_card_number": "4111111111111111",
"cvv": "123",
"expiration_month": 4,
"expiration_year": 2030
} }
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
borrowers: [
{
authorizer_unique_id: '1a2b3c4d',
first_name: 'John',
last_name: 'Doe',
phone_number: '5551234567',
date_of_birth: {day: 14, month: 3, year: 1988},
address: {
street_address_line1: '123 Main St',
city: 'Anytown',
state: 'CA',
zip_code: '12345',
country: 'US'
},
ssn: '123456789',
account_number: '1234567890',
routing_number: '021000021',
collectable_amount: 42500,
days_past_due: 47,
merchant_ref: 'acme-nv'
},
{
authorizer_unique_id: '3c4d5e6f',
first_name: 'Sam',
last_name: 'Lee',
phone_number: '5556667777',
date_of_birth: {day: 7, month: 1, year: 1990},
address: {zip_code: '30301'},
ssn: '234567891',
account_number: '2233445566',
routing_number: '061000104',
days_past_due: 31,
obligations: [
{
id: 'loan-123:inst-2',
amount: 10000,
priority: 1,
metadata: {installment: 2, type: 'representment'}
},
{
id: 'loan-123:inst-3',
amount: 10000,
priority: 2,
metadata: {installment: 3, type: 'presentment'}
}
],
policy_overrides: {reserve_cents: 5000}
},
{
authorizer_unique_id: '5e6f7g8h',
first_name: 'Maria',
last_name: 'Alvarez',
phone_number: '5559876543',
date_of_birth: {day: 2, month: 11, year: 1979},
address: {
street_address_line1: '88 Oak Ave',
street_address_line2: 'Apt 4B',
city: 'Springfield',
state: 'IL',
zip_code: '62701',
country: 'US'
},
ssn: '987654321',
account_number: '9876543210',
routing_number: '071000013',
collectable_amount: 18000,
days_past_due: 22,
charge_instrument: {token: 'tok_9f3a21c7', token_type: 'card', last4: '4412'}
},
{
authorizer_unique_id: '7g8h9i0j',
first_name: 'Dana',
last_name: 'Ruiz',
phone_number: '5554445555',
date_of_birth: {day: 19, month: 8, year: 1985},
address: {
street_address_line1: '41 Cedar Ln',
city: 'Columbus',
state: 'OH',
zip_code: '43215',
country: 'US'
},
ssn: '321654987',
account_number: '4433221100',
routing_number: '121000248',
collectable_amount: 26000,
days_past_due: 34,
charge_instrument: {
token: 'pm_1QbK2xXyz',
token_type: 'bank_account',
last4: '1100',
customer_ref: 'cus_1QbK2x'
}
},
{
authorizer_unique_id: '9i0j1k2l',
first_name: 'Andre',
last_name: 'Boateng',
phone_number: '5552223333',
date_of_birth: {day: 30, month: 6, year: 1991},
address: {
street_address_line1: '500 Pine Rd',
city: 'Austin',
state: 'TX',
zip_code: '78701',
country: 'US'
},
ssn: '456789123',
account_number: '5544332211',
routing_number: '111000025',
collectable_amount: 7500,
days_past_due: 9,
charge_instrument: {
card: {
debit_card_number: '4111111111111111',
cvv: '123',
expiration_month: 4,
expiration_year: 2030
}
}
}
]
})
};
fetch('https://api.rightfoot.com/v1/payment_enrollments', 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://api.rightfoot.com/v1/payment_enrollments",
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([
'borrowers' => [
[
'authorizer_unique_id' => '1a2b3c4d',
'first_name' => 'John',
'last_name' => 'Doe',
'phone_number' => '5551234567',
'date_of_birth' => [
'day' => 14,
'month' => 3,
'year' => 1988
],
'address' => [
'street_address_line1' => '123 Main St',
'city' => 'Anytown',
'state' => 'CA',
'zip_code' => '12345',
'country' => 'US'
],
'ssn' => '123456789',
'account_number' => '1234567890',
'routing_number' => '021000021',
'collectable_amount' => 42500,
'days_past_due' => 47,
'merchant_ref' => 'acme-nv'
],
[
'authorizer_unique_id' => '3c4d5e6f',
'first_name' => 'Sam',
'last_name' => 'Lee',
'phone_number' => '5556667777',
'date_of_birth' => [
'day' => 7,
'month' => 1,
'year' => 1990
],
'address' => [
'zip_code' => '30301'
],
'ssn' => '234567891',
'account_number' => '2233445566',
'routing_number' => '061000104',
'days_past_due' => 31,
'obligations' => [
[
'id' => 'loan-123:inst-2',
'amount' => 10000,
'priority' => 1,
'metadata' => [
'installment' => 2,
'type' => 'representment'
]
],
[
'id' => 'loan-123:inst-3',
'amount' => 10000,
'priority' => 2,
'metadata' => [
'installment' => 3,
'type' => 'presentment'
]
]
],
'policy_overrides' => [
'reserve_cents' => 5000
]
],
[
'authorizer_unique_id' => '5e6f7g8h',
'first_name' => 'Maria',
'last_name' => 'Alvarez',
'phone_number' => '5559876543',
'date_of_birth' => [
'day' => 2,
'month' => 11,
'year' => 1979
],
'address' => [
'street_address_line1' => '88 Oak Ave',
'street_address_line2' => 'Apt 4B',
'city' => 'Springfield',
'state' => 'IL',
'zip_code' => '62701',
'country' => 'US'
],
'ssn' => '987654321',
'account_number' => '9876543210',
'routing_number' => '071000013',
'collectable_amount' => 18000,
'days_past_due' => 22,
'charge_instrument' => [
'token' => 'tok_9f3a21c7',
'token_type' => 'card',
'last4' => '4412'
]
],
[
'authorizer_unique_id' => '7g8h9i0j',
'first_name' => 'Dana',
'last_name' => 'Ruiz',
'phone_number' => '5554445555',
'date_of_birth' => [
'day' => 19,
'month' => 8,
'year' => 1985
],
'address' => [
'street_address_line1' => '41 Cedar Ln',
'city' => 'Columbus',
'state' => 'OH',
'zip_code' => '43215',
'country' => 'US'
],
'ssn' => '321654987',
'account_number' => '4433221100',
'routing_number' => '121000248',
'collectable_amount' => 26000,
'days_past_due' => 34,
'charge_instrument' => [
'token' => 'pm_1QbK2xXyz',
'token_type' => 'bank_account',
'last4' => '1100',
'customer_ref' => 'cus_1QbK2x'
]
],
[
'authorizer_unique_id' => '9i0j1k2l',
'first_name' => 'Andre',
'last_name' => 'Boateng',
'phone_number' => '5552223333',
'date_of_birth' => [
'day' => 30,
'month' => 6,
'year' => 1991
],
'address' => [
'street_address_line1' => '500 Pine Rd',
'city' => 'Austin',
'state' => 'TX',
'zip_code' => '78701',
'country' => 'US'
],
'ssn' => '456789123',
'account_number' => '5544332211',
'routing_number' => '111000025',
'collectable_amount' => 7500,
'days_past_due' => 9,
'charge_instrument' => [
'card' => [
'debit_card_number' => '4111111111111111',
'cvv' => '123',
'expiration_month' => 4,
'expiration_year' => 2030
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.rightfoot.com/v1/payment_enrollments"
payload := strings.NewReader("{\n \"borrowers\": [\n {\n \"authorizer_unique_id\": \"1a2b3c4d\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone_number\": \"5551234567\",\n \"date_of_birth\": {\n \"day\": 14,\n \"month\": 3,\n \"year\": 1988\n },\n \"address\": {\n \"street_address_line1\": \"123 Main St\",\n \"city\": \"Anytown\",\n \"state\": \"CA\",\n \"zip_code\": \"12345\",\n \"country\": \"US\"\n },\n \"ssn\": \"123456789\",\n \"account_number\": \"1234567890\",\n \"routing_number\": \"021000021\",\n \"collectable_amount\": 42500,\n \"days_past_due\": 47,\n \"merchant_ref\": \"acme-nv\"\n },\n {\n \"authorizer_unique_id\": \"3c4d5e6f\",\n \"first_name\": \"Sam\",\n \"last_name\": \"Lee\",\n \"phone_number\": \"5556667777\",\n \"date_of_birth\": {\n \"day\": 7,\n \"month\": 1,\n \"year\": 1990\n },\n \"address\": {\n \"zip_code\": \"30301\"\n },\n \"ssn\": \"234567891\",\n \"account_number\": \"2233445566\",\n \"routing_number\": \"061000104\",\n \"days_past_due\": 31,\n \"obligations\": [\n {\n \"id\": \"loan-123:inst-2\",\n \"amount\": 10000,\n \"priority\": 1,\n \"metadata\": {\n \"installment\": 2,\n \"type\": \"representment\"\n }\n },\n {\n \"id\": \"loan-123:inst-3\",\n \"amount\": 10000,\n \"priority\": 2,\n \"metadata\": {\n \"installment\": 3,\n \"type\": \"presentment\"\n }\n }\n ],\n \"policy_overrides\": {\n \"reserve_cents\": 5000\n }\n },\n {\n \"authorizer_unique_id\": \"5e6f7g8h\",\n \"first_name\": \"Maria\",\n \"last_name\": \"Alvarez\",\n \"phone_number\": \"5559876543\",\n \"date_of_birth\": {\n \"day\": 2,\n \"month\": 11,\n \"year\": 1979\n },\n \"address\": {\n \"street_address_line1\": \"88 Oak Ave\",\n \"street_address_line2\": \"Apt 4B\",\n \"city\": \"Springfield\",\n \"state\": \"IL\",\n \"zip_code\": \"62701\",\n \"country\": \"US\"\n },\n \"ssn\": \"987654321\",\n \"account_number\": \"9876543210\",\n \"routing_number\": \"071000013\",\n \"collectable_amount\": 18000,\n \"days_past_due\": 22,\n \"charge_instrument\": {\n \"token\": \"tok_9f3a21c7\",\n \"token_type\": \"card\",\n \"last4\": \"4412\"\n }\n },\n {\n \"authorizer_unique_id\": \"7g8h9i0j\",\n \"first_name\": \"Dana\",\n \"last_name\": \"Ruiz\",\n \"phone_number\": \"5554445555\",\n \"date_of_birth\": {\n \"day\": 19,\n \"month\": 8,\n \"year\": 1985\n },\n \"address\": {\n \"street_address_line1\": \"41 Cedar Ln\",\n \"city\": \"Columbus\",\n \"state\": \"OH\",\n \"zip_code\": \"43215\",\n \"country\": \"US\"\n },\n \"ssn\": \"321654987\",\n \"account_number\": \"4433221100\",\n \"routing_number\": \"121000248\",\n \"collectable_amount\": 26000,\n \"days_past_due\": 34,\n \"charge_instrument\": {\n \"token\": \"pm_1QbK2xXyz\",\n \"token_type\": \"bank_account\",\n \"last4\": \"1100\",\n \"customer_ref\": \"cus_1QbK2x\"\n }\n },\n {\n \"authorizer_unique_id\": \"9i0j1k2l\",\n \"first_name\": \"Andre\",\n \"last_name\": \"Boateng\",\n \"phone_number\": \"5552223333\",\n \"date_of_birth\": {\n \"day\": 30,\n \"month\": 6,\n \"year\": 1991\n },\n \"address\": {\n \"street_address_line1\": \"500 Pine Rd\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"zip_code\": \"78701\",\n \"country\": \"US\"\n },\n \"ssn\": \"456789123\",\n \"account_number\": \"5544332211\",\n \"routing_number\": \"111000025\",\n \"collectable_amount\": 7500,\n \"days_past_due\": 9,\n \"charge_instrument\": {\n \"card\": {\n \"debit_card_number\": \"4111111111111111\",\n \"cvv\": \"123\",\n \"expiration_month\": 4,\n \"expiration_year\": 2030\n }\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.rightfoot.com/v1/payment_enrollments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"borrowers\": [\n {\n \"authorizer_unique_id\": \"1a2b3c4d\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone_number\": \"5551234567\",\n \"date_of_birth\": {\n \"day\": 14,\n \"month\": 3,\n \"year\": 1988\n },\n \"address\": {\n \"street_address_line1\": \"123 Main St\",\n \"city\": \"Anytown\",\n \"state\": \"CA\",\n \"zip_code\": \"12345\",\n \"country\": \"US\"\n },\n \"ssn\": \"123456789\",\n \"account_number\": \"1234567890\",\n \"routing_number\": \"021000021\",\n \"collectable_amount\": 42500,\n \"days_past_due\": 47,\n \"merchant_ref\": \"acme-nv\"\n },\n {\n \"authorizer_unique_id\": \"3c4d5e6f\",\n \"first_name\": \"Sam\",\n \"last_name\": \"Lee\",\n \"phone_number\": \"5556667777\",\n \"date_of_birth\": {\n \"day\": 7,\n \"month\": 1,\n \"year\": 1990\n },\n \"address\": {\n \"zip_code\": \"30301\"\n },\n \"ssn\": \"234567891\",\n \"account_number\": \"2233445566\",\n \"routing_number\": \"061000104\",\n \"days_past_due\": 31,\n \"obligations\": [\n {\n \"id\": \"loan-123:inst-2\",\n \"amount\": 10000,\n \"priority\": 1,\n \"metadata\": {\n \"installment\": 2,\n \"type\": \"representment\"\n }\n },\n {\n \"id\": \"loan-123:inst-3\",\n \"amount\": 10000,\n \"priority\": 2,\n \"metadata\": {\n \"installment\": 3,\n \"type\": \"presentment\"\n }\n }\n ],\n \"policy_overrides\": {\n \"reserve_cents\": 5000\n }\n },\n {\n \"authorizer_unique_id\": \"5e6f7g8h\",\n \"first_name\": \"Maria\",\n \"last_name\": \"Alvarez\",\n \"phone_number\": \"5559876543\",\n \"date_of_birth\": {\n \"day\": 2,\n \"month\": 11,\n \"year\": 1979\n },\n \"address\": {\n \"street_address_line1\": \"88 Oak Ave\",\n \"street_address_line2\": \"Apt 4B\",\n \"city\": \"Springfield\",\n \"state\": \"IL\",\n \"zip_code\": \"62701\",\n \"country\": \"US\"\n },\n \"ssn\": \"987654321\",\n \"account_number\": \"9876543210\",\n \"routing_number\": \"071000013\",\n \"collectable_amount\": 18000,\n \"days_past_due\": 22,\n \"charge_instrument\": {\n \"token\": \"tok_9f3a21c7\",\n \"token_type\": \"card\",\n \"last4\": \"4412\"\n }\n },\n {\n \"authorizer_unique_id\": \"7g8h9i0j\",\n \"first_name\": \"Dana\",\n \"last_name\": \"Ruiz\",\n \"phone_number\": \"5554445555\",\n \"date_of_birth\": {\n \"day\": 19,\n \"month\": 8,\n \"year\": 1985\n },\n \"address\": {\n \"street_address_line1\": \"41 Cedar Ln\",\n \"city\": \"Columbus\",\n \"state\": \"OH\",\n \"zip_code\": \"43215\",\n \"country\": \"US\"\n },\n \"ssn\": \"321654987\",\n \"account_number\": \"4433221100\",\n \"routing_number\": \"121000248\",\n \"collectable_amount\": 26000,\n \"days_past_due\": 34,\n \"charge_instrument\": {\n \"token\": \"pm_1QbK2xXyz\",\n \"token_type\": \"bank_account\",\n \"last4\": \"1100\",\n \"customer_ref\": \"cus_1QbK2x\"\n }\n },\n {\n \"authorizer_unique_id\": \"9i0j1k2l\",\n \"first_name\": \"Andre\",\n \"last_name\": \"Boateng\",\n \"phone_number\": \"5552223333\",\n \"date_of_birth\": {\n \"day\": 30,\n \"month\": 6,\n \"year\": 1991\n },\n \"address\": {\n \"street_address_line1\": \"500 Pine Rd\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"zip_code\": \"78701\",\n \"country\": \"US\"\n },\n \"ssn\": \"456789123\",\n \"account_number\": \"5544332211\",\n \"routing_number\": \"111000025\",\n \"collectable_amount\": 7500,\n \"days_past_due\": 9,\n \"charge_instrument\": {\n \"card\": {\n \"debit_card_number\": \"4111111111111111\",\n \"cvv\": \"123\",\n \"expiration_month\": 4,\n \"expiration_year\": 2030\n }\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rightfoot.com/v1/payment_enrollments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"borrowers\": [\n {\n \"authorizer_unique_id\": \"1a2b3c4d\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone_number\": \"5551234567\",\n \"date_of_birth\": {\n \"day\": 14,\n \"month\": 3,\n \"year\": 1988\n },\n \"address\": {\n \"street_address_line1\": \"123 Main St\",\n \"city\": \"Anytown\",\n \"state\": \"CA\",\n \"zip_code\": \"12345\",\n \"country\": \"US\"\n },\n \"ssn\": \"123456789\",\n \"account_number\": \"1234567890\",\n \"routing_number\": \"021000021\",\n \"collectable_amount\": 42500,\n \"days_past_due\": 47,\n \"merchant_ref\": \"acme-nv\"\n },\n {\n \"authorizer_unique_id\": \"3c4d5e6f\",\n \"first_name\": \"Sam\",\n \"last_name\": \"Lee\",\n \"phone_number\": \"5556667777\",\n \"date_of_birth\": {\n \"day\": 7,\n \"month\": 1,\n \"year\": 1990\n },\n \"address\": {\n \"zip_code\": \"30301\"\n },\n \"ssn\": \"234567891\",\n \"account_number\": \"2233445566\",\n \"routing_number\": \"061000104\",\n \"days_past_due\": 31,\n \"obligations\": [\n {\n \"id\": \"loan-123:inst-2\",\n \"amount\": 10000,\n \"priority\": 1,\n \"metadata\": {\n \"installment\": 2,\n \"type\": \"representment\"\n }\n },\n {\n \"id\": \"loan-123:inst-3\",\n \"amount\": 10000,\n \"priority\": 2,\n \"metadata\": {\n \"installment\": 3,\n \"type\": \"presentment\"\n }\n }\n ],\n \"policy_overrides\": {\n \"reserve_cents\": 5000\n }\n },\n {\n \"authorizer_unique_id\": \"5e6f7g8h\",\n \"first_name\": \"Maria\",\n \"last_name\": \"Alvarez\",\n \"phone_number\": \"5559876543\",\n \"date_of_birth\": {\n \"day\": 2,\n \"month\": 11,\n \"year\": 1979\n },\n \"address\": {\n \"street_address_line1\": \"88 Oak Ave\",\n \"street_address_line2\": \"Apt 4B\",\n \"city\": \"Springfield\",\n \"state\": \"IL\",\n \"zip_code\": \"62701\",\n \"country\": \"US\"\n },\n \"ssn\": \"987654321\",\n \"account_number\": \"9876543210\",\n \"routing_number\": \"071000013\",\n \"collectable_amount\": 18000,\n \"days_past_due\": 22,\n \"charge_instrument\": {\n \"token\": \"tok_9f3a21c7\",\n \"token_type\": \"card\",\n \"last4\": \"4412\"\n }\n },\n {\n \"authorizer_unique_id\": \"7g8h9i0j\",\n \"first_name\": \"Dana\",\n \"last_name\": \"Ruiz\",\n \"phone_number\": \"5554445555\",\n \"date_of_birth\": {\n \"day\": 19,\n \"month\": 8,\n \"year\": 1985\n },\n \"address\": {\n \"street_address_line1\": \"41 Cedar Ln\",\n \"city\": \"Columbus\",\n \"state\": \"OH\",\n \"zip_code\": \"43215\",\n \"country\": \"US\"\n },\n \"ssn\": \"321654987\",\n \"account_number\": \"4433221100\",\n \"routing_number\": \"121000248\",\n \"collectable_amount\": 26000,\n \"days_past_due\": 34,\n \"charge_instrument\": {\n \"token\": \"pm_1QbK2xXyz\",\n \"token_type\": \"bank_account\",\n \"last4\": \"1100\",\n \"customer_ref\": \"cus_1QbK2x\"\n }\n },\n {\n \"authorizer_unique_id\": \"9i0j1k2l\",\n \"first_name\": \"Andre\",\n \"last_name\": \"Boateng\",\n \"phone_number\": \"5552223333\",\n \"date_of_birth\": {\n \"day\": 30,\n \"month\": 6,\n \"year\": 1991\n },\n \"address\": {\n \"street_address_line1\": \"500 Pine Rd\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"zip_code\": \"78701\",\n \"country\": \"US\"\n },\n \"ssn\": \"456789123\",\n \"account_number\": \"5544332211\",\n \"routing_number\": \"111000025\",\n \"collectable_amount\": 7500,\n \"days_past_due\": 9,\n \"charge_instrument\": {\n \"card\": {\n \"debit_card_number\": \"4111111111111111\",\n \"cvv\": \"123\",\n \"expiration_month\": 4,\n \"expiration_year\": 2030\n }\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"enrolled": 4,
"updated": 1,
"already_enrolled": 0,
"held": 0,
"failed": 0,
"results": [
{
"authorizer_unique_id": "1a2b3c4d",
"outcome": "enrolled",
"reason": null,
"message": null
},
{
"authorizer_unique_id": "3c4d5e6f",
"outcome": "enrolled",
"reason": null,
"message": null,
"obligations": [
{
"id": "loan-123:inst-2",
"outcome": "enrolled",
"reason": null,
"message": null
},
{
"id": "loan-123:inst-3",
"outcome": "enrolled",
"reason": null,
"message": null
}
]
},
{
"authorizer_unique_id": "5e6f7g8h",
"outcome": "updated",
"reason": null,
"message": null
},
{
"authorizer_unique_id": "7g8h9i0j",
"outcome": "enrolled",
"reason": null,
"message": null
},
{
"authorizer_unique_id": "9i0j1k2l",
"outcome": "enrolled",
"reason": null,
"message": null
}
]
}{
"status": "error",
"status_code": 400,
"error": {
"code": "BAD_REQUEST",
"message": "borrowers must contain between 1 and 1000 entries.",
"timestamp": "2024-12-12T12:00:00Z"
}
}{
"status": "error",
"status_code": 401,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key.",
"timestamp": "2024-12-12T12:00:00Z"
}
}