Building a Student Debt Repayment App
The Basics
APIs are not much more than a contract between two services. The goal is to make these contracts as simple as possible with clearly defined side-effects. At Rightfoot, we provide clear, focused APIs to allow any app to provide student debt repayment as part of its product.
Performing a student debt payment with our platform is straightforward an requires only a few steps:
* Provide information about the borrower (Beneficiary)
* Provide information about the student Loan
* Link a FundingSource to make a payment from
* Request a payment to be issued from the FundingSource
to the Loan
Making Your First Payment
Using our TypeScript SDK (npm install rightfoot-node
):
// Bootstrap the client.
const config: Configuration = new Configuration( {
apiKey: `Bearer ${RIGHTFOOT_API_KEY}`,
});
const rightfootClient = new RightfootApi(
config, "https://sandbox.api.rightfoot.com");
// Create a Beneficiary.
const { beneficiary: { uuid: beneficiaryUuid } } =
await rightfootClient.createBeneficiary({
firstName: 'John',
lastName: 'Doe',
dateOfBirth: "1970-01-01",
phoneNumber: '+1 650 555 5555',
mailingAddress: {
line1: "123 Easy Street",
city: "Palo Alto",
state: "CA",
zipCode: "12345-0123"
}
});
// Attach Loan details.
const { loan: { uuid: loanUuid } } =
rightfootClient.addPlaidTokenToBeneficiary({
uuid: '12345678-abcd-1234-abcd-12345678abcd',
plaidPublicToken: 'plaid-token',
})
// Add a bank account as a FundingSource.
const { fundingSource: { uuid: fundingSourceUuid } } =
await rightfootClient.createFundingSource({
beneficiaryUuid,
emailAddress: 'beneficiary@domain.com',
plaidPublicToken: 'plaid-public-token',
accountId: 'selected-account-id'
})
// Issue a Loan Payment.
await rightfootClient.createPayment({
beneficiaryUuid,
loanUuid,
fundingSourceuuid,
paymentAmount: 50000, // 50,000cents == $500.00
});