Recurring Repayments
Recurring Repayments allows you to create and execute repayments according to a predefined repayment schedule.
As long as the Recurring Repayment is in Active
status, repayments will keep being created and executed according the the standard flow with regards to the repayment type.
When the account containing recurrent repayments schedule(s) is frozen, the schedule will not be deleted, but the repayments will be rejected upon creation, until the account is unfrozen.
If that account gets closed the recurring repayment schedule(s) on it will become Disabled
.
If the creation of a repayment according to the Recurring Repayments schedule fails, a Recurring Repayment Failed webhook event will be fired.
Recurring Repayment Schedule
The schedule will is set according to the repayment due date of the credit account, with the start date set to the current date.
The recurring repayment will run until it is manually disabled.
On the next scheduled repayment date if the remaining amount due is 0, a new repayment will not be created and a Recurring Repayment Skipped webhook event will be fired.
The execution day of the repayment may altered to accommodate for the bank's working days schedule.
Times in Recurring Repayments are given in EST.
Recurring Repayment Statuses
Recurring Repayments have a status
attribute, which represents their current status.
Status | Description |
---|---|
Active | Upon creation, the status will be set to Active . |
Disabled | When recurring repayment has been disabled, the status will be set to Disabled . |
Create Recurring ACH Repayment
Originates a Recurring ACH Repayment. The counterparty for the payment should be created separately through the Create Counterparty API. The Recurring Repayment Created webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/recurring-repayments |
Required Scope | repayments-write |
Data Type | recurringAchRepayment |
Timeout (Seconds) | 5 |
Attributes
Name | Type | Description |
---|---|---|
description | string | Repayment description (maximum of 50 characters). This will show up on the statement of the counterparty. |
addenda | string | Optional, additional repayment description (maximum of 80 characters), not all institutions present that in payment description. |
sameDay | boolean | Optional, default is false . See Same Day ACH. |
secCode | string | Optional. See Use a custom SEC Code. |
idempotencyKey | string | Optional. See Idempotency. |
tags | object | Optional. See Tags. Tags that will be copied to any transaction that this recurring repayment creates (see Tag Inheritance). |
Relationships
Name | Type | Description |
---|---|---|
account | JSON:API Relationship | The Deposit Account the repayment will be deposited into. |
creditAccount | JSON:API Relationship | The Credit Account that the repayment is made against. |
counterparty | JSON:API Relationship | The ACH Counterparty the repayment will come from. |
curl -X POST 'https://api.s.unit.sh/recurring-repayments'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "recurringAchRepayment",
"attributes": {
"description": "ACH Repayments",
"idempotencyKey": "adjaw1sqvies-7aepu852-h4d6sxh-8jkyhfa"
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "10016"
}
},
"creditAccount": {
"data": {
"type": "creditAccount",
"id": "10005"
}
},
"counterparty": {
"data": {
"type": "counterparty",
"id": "1"
}
}
}
}
}'
Response
Response is a JSON:API document.
201 Created
Field | Type | Description |
---|---|---|
data | RecurringAchRepayment | The target resource after the operation was completed. |
{
"data": {
"type": "recurringAchRepayment",
"id": "2",
"attributes": {
"createdAt": "2024-02-13T11:06:23.680Z",
"schedule": {
"startTime": "2024-02-13",
"interval": "Monthly",
"nextScheduledAction": "2024-03-29",
"dayOfMonth": 29
},
"description": "ACH Repayments",
"sameDay": false,
"numberOfRepayments": 0,
"status": "Active"
},
"relationships": {
"org": {
"data": {
"type": "org",
"id": "2"
}
},
"account": {
"data": {
"type": "account",
"id": "10016"
}
},
"creditAccount": {
"data": {
"type": "creditAccount",
"id": "10005"
}
},
"counterparty": {
"data": {
"type": "counterparty",
"id": "1"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
}
}
}
}
Create Recurring Book Repayment
Originates a Recurring Book Repayment. The Recurring Repayment Created webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/recurring-repayments |
Required Scope | repayments-write |
Data Type | recurringBookRepayment |
Timeout (Seconds) | 5 |
Attributes
Name | Type | Description |
---|---|---|
description | string | Repayment description (maximum of 80 characters), this will show up on the statement of the counterparty. |
transactionSummaryOverride | string | Optional. If this field is populated, its contents will be returned as the bookTransaction’s summary field (maximum of 100 characters). |
idempotencyKey | string | Optional. See Idempotency. |
tags | object | Optional. See Tags. |
Relationships
Name | Type | Description |
---|---|---|
account | JSON:API Relationship | The Deposit Account the repayment will be deposited into. |
creditAccount | JSON:API Relationship | The Credit Account that the repayment is made against. |
counterpartyAccount | JSON:API Relationship | The Deposit Account the repayment funds are taken from. |
curl -X POST 'https://api.s.unit.sh/recurring-repayments'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "recurringBookRepayment",
"attributes": {
"description": "Book Repayments",
"transactionSummaryOverride": "Paid Piper Repayment",
"idempotencyKey": "adjaw1sqvies-7aep52-h4d6sxh-8hfa"
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "10016"
}
},
"creditAccount": {
"data": {
"type": "creditAccount",
"id": "10005"
}
},
"counterpartyAccount": {
"data": {
"type": "account",
"id": "10012"
}
}
}
}
}'
Response
Response is a JSON:API document.
201 Created
Field | Type | Description |
---|---|---|
data | RecurringBookRepayment | The target resource after the operation was completed. |
{
"data": {
"type": "recurringBookRepayment",
"id": "5",
"attributes": {
"createdAt": "2024-02-13T12:08:20.239Z",
"schedule": {
"startTime": "2024-02-13",
"interval": "Monthly",
"nextScheduledAction": "2024-03-29",
"dayOfMonth": 29
},
"description": "Book Repayments",
"transactionSummaryOverride": "Paid Piper Repayment",
"numberOfRepayments": 0,
"status": "Active"
},
"relationships": {
"org": {
"data": {
"type": "org",
"id": "2"
}
},
"account": {
"data": {
"type": "account",
"id": "10016"
}
},
"creditAccount": {
"data": {
"type": "creditAccount",
"id": "10005"
}
},
"counterpartyAccount": {
"data": {
"type": "account",
"id": "10012"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
}
}
}
}
Capital Partner Repayments
When using the Capital Partner as part of your lending program, end-customer repayments should be made to the capital partner. You do not need to provide the details of the receiving account when creating these repayments, as the capital partner's account is a pre-configured account in the org-bank-agreement.
Create Recurring Capital Partner ACH Repayment
Originates a Recurring Capital Partner ACH Repayment. The counterparty should be created separately through the Create Counterparty API. The Recurring Repayment Created webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/recurring-repayments |
Required Scope | repayments-write |
Data Type | recurringAchRepayment |
Timeout (Seconds) | 5 |
Attributes
Name | Type | Description |
---|---|---|
description | string | Repayment description (maximum of 50 characters), this will show up on the statement of the counterparty. |
addenda | string | Optional, additional repayment description (maximum of 80 characters), not all institutions present that in the description. |
sameDay | boolean | Optional, default is false . See Same Day ACH. |
secCode | string | Optional. See Use a custom SEC Code. |
idempotencyKey | string | Optional. See Idempotency. |
tags | object | Optional. See Tags. Tags that will be copied to any transaction that this recurring repayment creates (see Tag Inheritance). |
Relationships
Name | Type | Description |
---|---|---|
creditAccount | JSON:API Relationship | The Credit Account that the repayment is made against. |
counterparty | JSON:API Relationship | The ACH Counterparty the repayment will come from. |
curl -X POST 'https://api.s.unit.sh/recurring-repayments'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "recurringCapitalPartnerAchRepayment",
"attributes": {
"description": "ACH Repayments",
"idempotencyKey": "adjaw1sqvies-7aepu852-h4d6sxh-8jkyhfa"
},
"relationships": {
"creditAccount": {
"data": {
"type": "creditAccount",
"id": "10010"
}
},
"counterparty": {
"data": {
"type": "counterparty",
"id": "1"
}
}
}
}
}'
Response
Response is a JSON:API document.
201 Created
Field | Type | Description |
---|---|---|
data | RecurringCapitalPartnerAchRepayment | The target resource after the operation was completed. |
{
"data": {
"type": "recurringCapitalPartnerAchRepayment",
"id": "1",
"attributes": {
"createdAt": "2024-02-13T10:54:24.373Z",
"schedule": {
"startTime": "2024-02-13",
"interval": "Monthly",
"nextScheduledAction": "2024-03-29",
"dayOfMonth": 29
},
"description": "Capital partner ACH Repayments",
"sameDay": false,
"numberOfRepayments": 0,
"status": "Active"
},
"relationships": {
"org": {
"data": {
"type": "org",
"id": "1"
}
},
"creditAccount": {
"data": {
"type": "creditAccount",
"id": "10010"
}
},
"counterparty": {
"data": {
"type": "counterparty",
"id": "1"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10001"
}
}
}
}
}
Create Recurring Capital Partner Book Repayment
Originates a Recurring Capital Partner Book Repayment. The Recurring Repayment Created webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/recurring-repayments |
Required Scope | repayments-write |
Data Type | recurringBookRepayment |
Timeout (Seconds) | 5 |
Attributes
Name | Type | Description |
---|---|---|
description | string | Repayment description (maximum of 50 characters), this will show up on the statement of the counterparty. |
transactionSummaryOverride | string | Optional. If this field is populated, its contents will be returned as the bookTransaction’s summary field (maximum of 100 characters). |
idempotencyKey | string | Optional. See Idempotency. |
tags | object | Optional. See Tags. |
Relationships
Name | Type | Description |
---|---|---|
creditAccount | JSON:API Relationship | The Credit Account that the repayment is made against. |
counterpartyAccount | JSON:API Relationship | The Deposit Account the repayment funds are taken from. |
curl -X POST 'https://api.s.unit.sh/recurring-repayments'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "recurringCapitalPartnerBookRepayment",
"attributes": {
"description": "Capital Partner Book Repayments",
"transactionSummaryOverride": "Paid Piper Repayment",
"idempotencyKey": "adjaw1sqvies-7aep52-h4d6sxh-8hfa"
},
"relationships": {
"creditAccount": {
"data": {
"type": "creditAccount",
"id": "10005"
}
},
"counterpartyAccount": {
"data": {
"type": "account",
"id": "10012"
}
}
}
}
}'
Response
Response is a JSON:API document.
201 Created
Field | Type | Description |
---|---|---|
data | RecurringCapitalPartnerBookRepayment | The target resource after the operation was completed. |
{
"data": {
"type": "recurringCapitalPartnerBookRepayment",
"id": "5",
"attributes": {
"createdAt": "2024-02-13T12:08:20.239Z",
"schedule": {
"startTime": "2024-02-13",
"interval": "Monthly",
"nextScheduledAction": "2024-03-29",
"dayOfMonth": 29
},
"description": "Book Repayments",
"transactionSummaryOverride": "Paid Piper Repayment",
"numberOfRepayments": 0,
"status": "Active"
},
"relationships": {
"org": {
"data": {
"type": "org",
"id": "2"
}
},
"creditAccount": {
"data": {
"type": "creditAccount",
"id": "10005"
}
},
"counterpartyAccount": {
"data": {
"type": "account",
"id": "10012"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
}
}
}
}
Disable Recurring Repayment
Disable a Recurring Repayment by id. When a Recurring Repayment is disabled, the Recurring Repayment Status Changed webhook event is fired and future repayments will no longer be created according to the defined schedule.
Verb | POST |
Url | https://api.s.unit.sh/recurring-repayments/{id}/disable |
Required Scope | repayments |
Timeout (Seconds) | 5 |
Response
Response is a JSON:API document.
200 OK
Field | Type | Description |
---|---|---|
data | One of the following types (Recurring ACH Repayment or Recurring Book Repayment or Recurring Capital Partner ACH Repayment or Recurring Capital Partner Book Repayment | Recurring Repayment resource. |
curl -X POST 'https://api.s.unit.sh/recurring-repayments/12/disable' \
-H "Authorization: Bearer ${TOKEN}"
Response
Response is a JSON:API document.
{
"data": {
"type": "recurringAchRepayment",
"id": "2",
"attributes": {
"createdAt": "2024-02-13T11:06:23.680Z",
"updatedAt": "2024-02-14T11:13:33.482Z",
"schedule": {
"startTime": "2024-02-13",
"interval": "Monthly",
"nextScheduledAction": "2024-03-29",
"dayOfMonth": 29
},
"description": "ACH Repayments",
"sameDay": false,
"numberOfRepayments": 0,
"status": "Disabled"
},
"relationships": {
"org": {
"data": {
"type": "org",
"id": "2"
}
},
"account": {
"data": {
"type": "account",
"id": "10016"
}
},
"creditAccount": {
"data": {
"type": "creditAccount",
"id": "10005"
}
},
"counterparty": {
"data": {
"type": "counterparty",
"id": "1"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
}
}
}
}
Enable Recurring Repayment
Enable a recurring repayment by id. When a Recurring Repayment is enabled, its status is set to Active according to the start date and end date that were defined in the schedule. See Recurring Repayment Statuses. When enabled, the Recurring Repayment Status Changed webhook event is fired.
Verb | POST |
Url | https://api.s.unit.sh/recurring-repayments/{id}/enable |
Required Scope | repayments |
Timeout (Seconds) | 5 |
Response
Response is a JSON:API document.
200 OK
Field | Type | Description |
---|---|---|
data | One of the following types (Recurring ACH Repayment or Recurring Book Repayment or Recurring Capital Partner ACH Repayment or Recurring Capital Partner Book Repayment | Recurring Repayment resource. |
curl -X POST 'https://api.s.unit.sh/recurring-repayments/12/enable' \
-H "Authorization: Bearer ${TOKEN}"
Response
Response is a JSON:API document.
{
"data": {
"type": "recurringCapitalPartnerAchRepayment",
"id": "1",
"attributes": {
"createdAt": "2024-02-13T10:54:24.373Z",
"schedule": {
"startTime": "2024-02-13",
"interval": "Monthly",
"nextScheduledAction": "2024-03-29",
"dayOfMonth": 29
},
"description": "Capital partner ACH Repayments",
"sameDay": false,
"numberOfRepayments": 0,
"status": "Active"
},
"relationships": {
"org": {
"data": {
"type": "org",
"id": "1"
}
},
"creditAccount": {
"data": {
"type": "creditAccount",
"id": "10010"
}
},
"counterparty": {
"data": {
"type": "counterparty",
"id": "1"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10001"
}
}
}
}
}
Get by Id
Get a recurring repayment by id.
Verb | GET |
Url | https://api.s.unit.sh/recurring-repayments/{id} |
Required Scope | repayments |
Timeout (Seconds) | 5 |
Response
Response is a JSON:API document.
200 OK
Field | Type | Description |
---|---|---|
data | One of the following types (Recurring ACH Repayment or Recurring Book Repayment or Recurring Capital Partner ACH Repayment or Recurring Capital Partner Book Repayment | Recurring Repayment resource. |
curl -X GET 'https://api.s.unit.sh/recurring-repayments/100' \
-H "Authorization: Bearer ${TOKEN}"
List Recurring Repayments
List recurring repayments resources. Filtering, paging and sorting can be applied.
Verb | GET |
Url | https://api.s.unit.sh/recurring-repayments |
Required Scope | repayments |
Timeout (Seconds) | 5 |
Query Parameters
Name | Type | Default | Description |
---|---|---|---|
page[limit] | integer | 100 | Optional. Maximum number of resources that will be returned. Maximum is 1000 resources. See Pagination. |
page[offset] | integer | 0 | Optional. Number of resources to skip. See Pagination. |
filter[creditAccountId] | string | (empty) | Optional. Filters the results by the specified credit account id. |
filter[customerId] | string | (empty) | Optional. Filters the results by the specified customer id. |
filter[status] | string | (empty) | Optional. Filter recurring repayments by status (Active or Disabled). Usage example: *filter[status]=Active |
filter[fromStartTime] | RFC3339 Date string | (empty) | Optional. Filters the Recurring Repayments that their start time occurred after the specified date. e.g. 2022-06-13 |
filter[toStartTime] | RFC3339 Date string | (empty) | Optional. Filters the Recurring Repayments that their start time occurred before the specified date. e.g. 2022-05-13 |
sort | string | sort=-createdAt | Optional. Leave empty or provide sort=createdAt for ascending order. Provide sort=-createdAt (leading minus sign) for descending order. |
curl -X GET 'https://api.s.unit.sh/recurring-repayments?page[limit]=20&page[offset]=10&filter[status][]=Enabled' \
-H "Authorization: Bearer ${TOKEN}"
Response
Response is a JSON:API document.
200 OK
Field | Type | Description |
---|---|---|
data | An array of Recurring Repayments (Recurring ACH Repayment or Recurring Book Repayment or Recurring Capital Partner ACH Repayment or Recurring Capital Partner Book Repayment | Recurring Repayment resource. |
meta | JSON object that contains pagination data | Pagination data includes offset, limit and total (estimated total items). |
{
"data": [
{
"type": "recurringAchRepayment",
"id": "2",
"attributes": {
"createdAt": "2024-02-13T11:06:23.680Z",
"schedule": {
"startTime": "2024-02-13",
"interval": "Monthly",
"nextScheduledAction": "2024-03-29",
"dayOfMonth": 29
},
"description": "ACH Repayments",
"sameDay": false,
"numberOfRepayments": 0,
"status": "Active"
},
"relationships": {
"org": {
"data": {
"type": "org",
"id": "2"
}
},
"account": {
"data": {
"type": "account",
"id": "10016"
}
},
"creditAccount": {
"data": {
"type": "creditAccount",
"id": "10005"
}
},
"counterparty": {
"data": {
"type": "counterparty",
"id": "1"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
}
}
},
{
"type": "recurringBookRepayment",
"id": "5",
"attributes": {
"createdAt": "2024-02-13T12:08:20.239Z",
"schedule": {
"startTime": "2024-02-13",
"interval": "Monthly",
"nextScheduledAction": "2024-03-29",
"dayOfMonth": 29
},
"description": "Book Repayments",
"transactionSummaryOverride": "override",
"numberOfRepayments": 0,
"status": "Active"
},
"relationships": {
"org": {
"data": {
"type": "org",
"id": "2"
}
},
"account": {
"data": {
"type": "account",
"id": "10016"
}
},
"creditAccount": {
"data": {
"type": "creditAccount",
"id": "10005"
}
},
"counterpartyAccount": {
"data": {
"type": "account",
"id": "10012"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
}
}
},
{
"type": "recurringCapitalPartnerBookRepayment",
"id": "5",
"attributes": {
"createdAt": "2024-02-13T12:08:20.239Z",
"schedule": {
"startTime": "2024-02-13",
"interval": "Monthly",
"nextScheduledAction": "2024-03-29",
"dayOfMonth": 29
},
"description": "Book Repayments",
"transactionSummaryOverride": "override",
"numberOfRepayments": 0,
"status": "Active"
},
"relationships": {
"org": {
"data": {
"type": "org",
"id": "2"
}
},
"creditAccount": {
"data": {
"type": "creditAccount",
"id": "10005"
}
},
"counterpartyAccount": {
"data": {
"type": "account",
"id": "10012"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
}
}
}
],
"meta": {
"pagination": {
"total": 3,
"limit": 100,
"offset": 0
}
}
}