Creates a new Promise to Pay Plan.
Promise to pay plan post
Amount required to be fulfilled for each period of the promise to pay plan. Peach's system will use the amount provided to trigger any required promise status transitions.
Note:
- If
amountis passed to the endpoint, ensure thatfrequencyanddurationare also provided. - If you are providing an
amountobject, you should not pass theschedule. In case both are provided in the request, a400 Bad Request errorwill be returned.
The duration of the promise to pay plan as a number of frequency periods. For example: if frequency=weekly and duration=6, the promise will be created with 6 weeks duration and will have 6 periods all with the same amount.
Note:
- If
durationis passed to the endpoint, ensure thatfrequencyandamountare also provided. - If you are providing a
durationobject, you should not pass theschedule. In case both are provided in the request, a400 Bad Request errorwill be returned.
A lender's identifier for a promise to pay plan. After the object is successfully created, a lender can use ID or externalId identifiers to fetch the object. To fetch the object using externalId you need to add ext- to the URL. Note: Don't add ext- to the identifier value. For example: if the external identifier is ABCDE, then pass externalId=ACBCE and NOT ext-ABCDE when creating the object.
The agreed payment frequency of the promise. Peach's system will use the desired frequency to create promise to pay period(s) so the lender can monitor progress against promised payment dates and amount paid. weekly, everyTwoWeeks, twiceMonthly, and monthly options create multiple promise to pay periods, according to the duration. singleTerm creates a promise with a single period and desired duration of X calendar days or a specific date that should be passed in specificDays.
Note:
- If
frequencyis passed to the endpoint, ensure thatdurationandamountare also provided. - If you are providing a
frequencyobject, you should not pass theschedule. In case both are provided in the request, a400 Bad Request errorwill be returned.
In previewMode=true, the Promise to Pay Plan and corresponding Promise Period Objects will be returned for preview without committing the object to database
To create a custom promise to pay schedule with varying amounts or irregular periods, pass a schedule when creating the promise to pay plan. Note: Either schedule object or schedule descriptor attributes (startDate, frequency, specificDays , 'duration' and 'amount') can be passed to create a promise to pay plan. In case both are provided in the request, a 400 Bad Request error will be returned.
When set to true, Peach's system will send a notice to the borrower about the promise to pay plan. Note: If sendNotice is not passed, the system will default to true.
Specific days designate the day(s) that due dates will fall on. The allowed values for specific day(s) depends on the paymentFrequency.
weekly - provide one number in the valid range 1-7. 1=Monday...7=Sunday.
For example: [1].
everyTwoWeeks - provide two inputs. The first input (required) is an integer in the valid range 1-7. 1=Monday...7=Sunday.
The second input is a date that indicates when to start the cycle. If the second input is not passed, the system will default to the first valid start date based on the first input (the day of week passed in). If this date is provided then it can override the minimum due date gap specified on the loan type.
For example: [1, "2020-09-16"].
twiceMonthly - provide two numbers in the valid range 1-31. 1=first day of a month. Use 31 to indicate the last day of a month.
For example: [1, 15] or [15, 31].
monthly - provide one number in the valid range 1-31. 1=first day of a month. Use 31 to indicate the last day of a month.
For example: [1].
singleTerm - provide one number to indicate duration as a number of calendar days or provide a valid calendar date in the future. For example: [90] or ["2020-09-16"].
For weekly, everyTwoWeeks, twiceMonthly, monthly: If specificDays is left null, then the system will calculate due dates according to the paymentFrequency relative to the origination or activation date (or use existing specific days in the case of change due date).
For singleTerm: The specificDays is mandatory.
The start date of the promise to pay plan. If startDate is not provided upon promise to pay plan creation, the system will use the created date (i.e. "today") as the startDate. If startDate is provided, it must be a date in the future. Notes:
- If you are providing a
scheduleobject, you should not pass thestartDate. In case both are provided in the request, a400 Bad Request errorwill be returned. - If Peach's system creates the schedule based on
frequency,specificDaysanddurationpassed, the system will schedule Promise to Pay Periods starting after thestartDate.
- oauth2
- bearerAuth
- apiKeyHeader
- string
- integer
curl -i -X POST \
'https://sandboxapi.peach.finance/api/people/{personId}/loans/{loanId}/promise-to-pay-plans' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"amount": 0.01,
"caseId": "string",
"duration": 1,
"externalId": "string",
"frequency": "weekly",
"previewMode": false,
"schedule": [
{
"amount": 0.01,
"dueDate": "2019-08-24"
}
],
"sendNotice": true,
"specificDays": [
"string"
],
"startDate": "2019-08-24"
}'{ "message": "string", "status": 0, "data": { "createdAt": "2019-08-24T14:15:22Z", "deletedAt": "2019-08-24T14:15:22Z", "id": "string", "updatedAt": "2019-08-24T14:15:22Z", "cancellationReason": "canceledByUser", "caseId": "string", "companyId": "string", "endDate": "2019-08-24", "externalId": "string", "isOverdue": true, "loanId": "string", "object": "promiseToPayPlan", "reasonDetails": "string", "schedule": [ … ], "startDate": "2019-08-24", "status": "scheduled" } }