APG PayAPG Paydocs

API reference

Loans

38 endpoints

A loan is a revolving facility a borrower draws against and repays. Its balances, the limit, what is used, what is available, what is reserved and what is pending, are always in one currency, so the currency is stated once.

Opening a loan takes two calls. POST with LoanCmdApply and you get an offer: the terms the platform will lend on, signed with an offerToken. Send that offer back with LoanCmdAcceptOffer and the loan opens. The two steps exist because a borrower has to be shown the terms and agree to them, and there is no way to skip the agreement.

Movements are not here a drawdown or a card charge is a /loan-transactions. This collection is the loan itself: its status, its terms, and what it currently owes.

A trading account carries a metadata template, the rules its card transactions' metadata must meet. It is set on the application, comes back in the offer, which signs it, and is read under the loan's specification. LoanUpdateTradingAccount replaces it whole. A template is checked when it is set, and one that fails is refused with 400 naming the path at fault.

A loan's statement settings are a sub-resource. GET /loans/{loanId}/statement-settings reads which documents its statements produce, who they are mailed to and how the attachment is encrypted. PATCH with LoanUpdateStatementSettings replaces them whole, and LoanUpdateClearStatementSettings deletes them. All three need Loans_Update; the transfer secret is write-only.

GET/loans/{loanId}
RBAC
GET/loans
RBAC
POST/loans
ADT
RBAC
PATCH/loans/{loanId}
ADT
RBAC
GET/loans/{loanId}/statement-settings
RBAC
GET/loan-facilities/{loanFacilityId}
RBAC
GET/loan-facilities
RBAC
POST/loan-facilities
ADT
RBAC
PATCH/loan-facilities/{loanFacilityId}
ADT
RBAC
GET/loan-statements/{loanStatementId}
RBAC
GET/loan-statements
RBAC
POST/loan-statements
ADT
RBAC
PATCH/loan-statements/{loanStatementId}
ADT
RBAC
GET/loan-statements/{loanStatementId}/documents/{format}
RBAC
GET/loan-statements/{loanStatementId}/documents
RBAC
GET/loan-transactions/{loanTransactionId}
RBAC
GET/loan-transactions
RBAC
POST/loan-transactions
ADT
RBAC
PATCH/loan-transactions/{loanTransactionId}
ADT
RBAC
GET/loan-products/{loanProductId}
RBAC
GET/loan-products
RBAC
POST/loan-products
ADT
RBAC
PATCH/loan-products/{loanProductId}
ADT
RBAC
GET/loan-agreements/{loanAgreementId}
RBAC
GET/loan-agreements
RBAC
POST/loan-agreements
ADT
RBAC
PATCH/loan-agreements/{loanAgreementId}
ADT
RBAC
GET/statement-receipts
RBAC
POST/statement-receipts
ADT
RBAC
GET/statement-receipt-batches/{statementReceiptBatchId}
RBAC
GET/statement-receipt-batches
RBAC
PATCH/statement-receipt-batches/{statementReceiptBatchId}
ADT
RBAC
GET/daily-card-file-runs
RBAC
GET/daily-card-file-runs/{dailyCardFileRunId}/files/{format}
RBAC
GET/loan-statement-lines
RBAC
GET/statement-dbi-batches/{statementDbiBatchId}
RBAC
PUT/statement-dbi-batches/{statementDbiBatchId}
ADT
RBAC
PATCH/statement-dbi-batches/{statementDbiBatchId}
ADT
RBAC