Facilities

Enable autopay for a facility

POST
Enables autopay for a facility

Path parameters

facility_idstringRequired

Request

This endpoint expects an object.
bank_account
objectRequired
The bank account details to use for scheduled payments
amount_type
enumRequired

The type of autopay amount, either minimum_payment or statement_balance

Allowed values: minimum_paymentstatement_balance
additional_amount
integerOptional
The additional amount to pay on top of the minimum payment, in cents (e.g. 1000 = $10.00)

Response

This endpoint returns an object
id
string
application_id
string

The application_id of the corresponding loan application for the facility

borrower_id
string

The borrower_id of the corresponding borrower the facility is for

loan_agreement_id
string

The loan_agreement_id of the corresponding loan agreement the facility is for

credit_type
enum
The type of credit production.
created_on
datetime
Timestamp the loan agreement object is created on
status
enum
The status of the facility.
Allowed values: activeclosed
account_number
string
The account number of the credit facility
transactions
list of strings
An array of transactions made (empty if no payments are due)
statements
list of objects
An array of statements for the loan (empty if no statements exist)
payments_due
list of strings
An array of payments due (empty if no payments are due)
terms
union
An object containing a summary of the terms of the facility.
amortization_schedule
list of objectsOptional
The amortization schedule of the loan
repayment_bank_details
objectOptional
The bank account information used to repay the loan
balance
integerOptional
The remaining balance of the loan, in cents
payoff_balance
integerOptional
The current payoff balance of the loan, in cents
origination_date
stringOptional
The date the loan was originated (YYYY-MM-DD)
disbursement_date
stringOptional
The date the loan was disbursed (YYYY-MM-DD)
remaining_term
integerOptional
The remaining term of the loan, in months
next_payment_amount
integerOptional
The amount of the next payment, in cents
next_payment_due_date
stringOptional
The date the next payment is due (YYYY-MM-DD)
current_payment_due_date
stringOptional
The date the current payment is due (YYYY-MM-DD)
last_payment_date
stringOptional
The date the last payment was made (YYYY-MM-DD)
principal_paid_thru
stringOptional
The date the principal is paid through (YYYY-MM-DD)
next_billing_date
stringOptional
The next billing date of the loan (YYYY-MM-DD)
interest_accrued_thru
stringOptional
The date the interest is accrued through (YYYY-MM-DD)
next_accrual_cutoff_date
stringOptional
The next accrual cutoff date of the loan (YYYY-MM-DD)
scheduled_payoff_date
stringOptional
The scheduled payoff date of the loan (YYYY-MM-DD)
autopay
objectOptional
Whether or not autopay is enabled for the facility.
documents
objectOptional
The documents associated with the facility

Errors

POST
1curl -X POST https://production.pier-finance.com/api/facilities/fac_18e5a3726b3943cda2635f40e1041ba4/enable_autopay \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "bank_account": {
6 "bank_account_number": "98989898",
7 "bank_routing_number": "021000021",
8 "type": "checking"
9 },
10 "amount_type": "statement_balance",
11 "additional_amount": 0
12}'
1{
2 "id": "fac_18e5a3726b3943cda2635f40e1041ba4",
3 "application_id": "app_f0467657bba948e6a87292e182132848",
4 "borrower_id": "bor_a1d0c30d77104f35b4c842b99132624e",
5 "loan_agreement_id": "doc_43da3b3f95c745e1985a71e9a00d6c27",
6 "credit_type": "consumer_installment_loan",
7 "created_on": "2023-05-12T19:46:09.293Z",
8 "status": "active",
9 "account_number": "401542198",
10 "transactions": [],
11 "statements": [],
12 "payments_due": [],
13 "terms": {
14 "type": "loan_offer",
15 "amount": 1000000,
16 "id": "off_86c05092a4384d89b03ef514ea4fee31",
17 "loan_term": {
18 "term_type": "months",
19 "term": 36
20 },
21 "first_payment_date": "2022-12-31",
22 "grace_period": {
23 "term": 0,
24 "interest_rate": 0
25 },
26 "interest_rate": 0,
27 "late_payment_fee": 0,
28 "origination_fee": 0,
29 "payment_period": "monthly"
30 },
31 "amortization_schedule": [
32 {
33 "payment_date": "2023-11-02",
34 "interest_payment_amount": 0,
35 "principal_payment_amount": 8333,
36 "other_payment_amount": 0,
37 "total_payment_amount": 8333,
38 "balance_amount": 91667,
39 "item_index": 1
40 },
41 {
42 "payment_date": "2023-12-02",
43 "interest_payment_amount": 0,
44 "principal_payment_amount": 8333,
45 "other_payment_amount": 0,
46 "total_payment_amount": 8333,
47 "balance_amount": 83334,
48 "item_index": 2
49 }
50 ],
51 "repayment_bank_details": null,
52 "balance": 5000000,
53 "payoff_balance": 5000000,
54 "origination_date": "2023-05-12",
55 "disbursement_date": "2023-05-12",
56 "remaining_term": 48,
57 "next_payment_amount": 124425,
58 "next_payment_due_date": "2023-06-12",
59 "current_payment_due_date": "2023-06-12",
60 "last_payment_date": null,
61 "principal_paid_thru": "2023-05-11",
62 "next_billing_date": "2023-05-28",
63 "interest_accrued_thru": "2023-05-11",
64 "next_accrual_cutoff_date": "2023-06-11",
65 "scheduled_payoff_date": "2027-05-12",
66 "autopay": {
67 "authorized": true,
68 "authorization_timestamp": "2021-01-01T00:00:00Z",
69 "bank_account": {
70 "bank_account_number": "98989898",
71 "bank_routing_number": "021000021",
72 "type": "checking"
73 },
74 "amount_type": "minimum_payment",
75 "additional_amount": 1000
76 }
77}