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": "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": {
"processor_token": "tok_9f3a21c7",
"card_last4": "4412"
}
},
{
"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": "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": {
"processor_token": "tok_9f3a21c7",
"card_last4": "4412"
}
},
{
"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: '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: {processor_token: 'tok_9f3a21c7', card_last4: '4412'}
},
{
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' => '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' => [
'processor_token' => 'tok_9f3a21c7',
'card_last4' => '4412'
]
],
[
'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\": \"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 \"processor_token\": \"tok_9f3a21c7\",\n \"card_last4\": \"4412\"\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\": \"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 \"processor_token\": \"tok_9f3a21c7\",\n \"card_last4\": \"4412\"\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\": \"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 \"processor_token\": \"tok_9f3a21c7\",\n \"card_last4\": \"4412\"\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": 2,
"updated": 1,
"already_enrolled": 0,
"held": 0,
"failed": 0,
"results": [
{
"authorizer_unique_id": "1a2b3c4d",
"outcome": "enrolled",
"reason": null,
"message": null
},
{
"authorizer_unique_id": "5e6f7g8h",
"outcome": "updated",
"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. 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 |
| 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 | Yes | Cents. The most you will accept today |
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 |
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.
How Rightfoot collects
Omitcharge_instrument entirely and Rightfoot collects by ACH from the bank account you supplied. That is the common case.
To have a card charged instead, supply exactly one of:
processor_token
card_last4 alongside it.card
card_last4 is required with processor_token. The token itself is opaque to Rightfoot, so the last four digits are what confirm the card belongs to the account being monitored — a card drawing on a different account would make the balance Rightfoot reads meaningless.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": {
"processor_token": "tok_9f3a21c7",
"card_last4": "4412"
}
}
{
"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 — Rightfoot cannot read this bank | 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.Held borrowers
Aheld borrower’s details are kept. Monitoring simply did not start, because Rightfoot cannot reach their bank.
| 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. |
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
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": "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": {
"processor_token": "tok_9f3a21c7",
"card_last4": "4412"
}
},
{
"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": "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": {
"processor_token": "tok_9f3a21c7",
"card_last4": "4412"
}
},
{
"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: '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: {processor_token: 'tok_9f3a21c7', card_last4: '4412'}
},
{
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' => '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' => [
'processor_token' => 'tok_9f3a21c7',
'card_last4' => '4412'
]
],
[
'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\": \"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 \"processor_token\": \"tok_9f3a21c7\",\n \"card_last4\": \"4412\"\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\": \"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 \"processor_token\": \"tok_9f3a21c7\",\n \"card_last4\": \"4412\"\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\": \"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 \"processor_token\": \"tok_9f3a21c7\",\n \"card_last4\": \"4412\"\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": 2,
"updated": 1,
"already_enrolled": 0,
"held": 0,
"failed": 0,
"results": [
{
"authorizer_unique_id": "1a2b3c4d",
"outcome": "enrolled",
"reason": null,
"message": null
},
{
"authorizer_unique_id": "5e6f7g8h",
"outcome": "updated",
"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"
}
}