Skip to main content

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.

note

The execution day of the repayment may altered to accommodate for the bank's working days schedule.

note

Times in Recurring Repayments are given in EST.

Recurring Repayment Statuses

Recurring Repayments have a status attribute, which represents their current status.

StatusDescription
ActiveUpon creation, the status will be set to Active.
DisabledWhen 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.

VerbPOST
Urlhttps://api.s.unit.sh/recurring-repayments
Required Scoperepayments-write
Data TyperecurringAchRepayment
Timeout (Seconds)5

Attributes

NameTypeDescription
descriptionstringRepayment description (maximum of 50 characters). This will show up on the statement of the counterparty.
addendastringOptional, additional repayment description (maximum of 80 characters), not all institutions present that in payment description.
sameDaybooleanOptional, default is false. See Same Day ACH.
secCodestringOptional. See Use a custom SEC Code.
idempotencyKeystringOptional. See Idempotency.
tagsobjectOptional. See Tags. Tags that will be copied to any transaction that this recurring repayment creates (see Tag Inheritance).

Relationships

NameTypeDescription
accountJSON:API RelationshipThe Deposit Account the repayment will be deposited into.
creditAccountJSON:API RelationshipThe Credit Account that the repayment is made against.
counterpartyJSON:API RelationshipThe ACH Counterparty the repayment will come from.
Example Request:
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

FieldTypeDescription
dataRecurringAchRepaymentThe target resource after the operation was completed.
Example Response:
{
"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.

VerbPOST
Urlhttps://api.s.unit.sh/recurring-repayments
Required Scoperepayments-write
Data TyperecurringBookRepayment
Timeout (Seconds)5

Attributes

NameTypeDescription
descriptionstringRepayment description (maximum of 80 characters), this will show up on the statement of the counterparty.
transactionSummaryOverridestringOptional. If this field is populated, its contents will be returned as the bookTransaction’s summary field (maximum of 100 characters).
idempotencyKeystringOptional. See Idempotency.
tagsobjectOptional. See Tags.

Relationships

NameTypeDescription
accountJSON:API RelationshipThe Deposit Account the repayment will be deposited into.
creditAccountJSON:API RelationshipThe Credit Account that the repayment is made against.
counterpartyAccountJSON:API RelationshipThe Deposit Account the repayment funds are taken from.
Example Request:
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

FieldTypeDescription
dataRecurringBookRepaymentThe target resource after the operation was completed.
Example Response:
{
"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.

VerbPOST
Urlhttps://api.s.unit.sh/recurring-repayments
Required Scoperepayments-write
Data TyperecurringAchRepayment
Timeout (Seconds)5

Attributes

NameTypeDescription
descriptionstringRepayment description (maximum of 50 characters), this will show up on the statement of the counterparty.
addendastringOptional, additional repayment description (maximum of 80 characters), not all institutions present that in the description.
sameDaybooleanOptional, default is false. See Same Day ACH.
secCodestringOptional. See Use a custom SEC Code.
idempotencyKeystringOptional. See Idempotency.
tagsobjectOptional. See Tags. Tags that will be copied to any transaction that this recurring repayment creates (see Tag Inheritance).

Relationships

NameTypeDescription
creditAccountJSON:API RelationshipThe Credit Account that the repayment is made against.
counterpartyJSON:API RelationshipThe ACH Counterparty the repayment will come from.
Example Request:
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

FieldTypeDescription
dataRecurringCapitalPartnerAchRepaymentThe target resource after the operation was completed.
Example Response:
{
"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.

VerbPOST
Urlhttps://api.s.unit.sh/recurring-repayments
Required Scoperepayments-write
Data TyperecurringBookRepayment
Timeout (Seconds)5

Attributes

NameTypeDescription
descriptionstringRepayment description (maximum of 50 characters), this will show up on the statement of the counterparty.
transactionSummaryOverridestringOptional. If this field is populated, its contents will be returned as the bookTransaction’s summary field (maximum of 100 characters).
idempotencyKeystringOptional. See Idempotency.
tagsobjectOptional. See Tags.

Relationships

NameTypeDescription
creditAccountJSON:API RelationshipThe Credit Account that the repayment is made against.
counterpartyAccountJSON:API RelationshipThe Deposit Account the repayment funds are taken from.
Example Request:
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

FieldTypeDescription
dataRecurringCapitalPartnerBookRepaymentThe target resource after the operation was completed.
Example Response:
{
"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.

VerbPOST
Urlhttps://api.s.unit.sh/recurring-repayments/{id}/disable
Required Scoperepayments
Timeout (Seconds)5

Response

Response is a JSON:API document.

200 OK

FieldTypeDescription
dataOne of the following types (Recurring ACH Repayment or Recurring Book Repayment or Recurring Capital Partner ACH Repayment or Recurring Capital Partner Book RepaymentRecurring 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.

Example Response:
{
"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.

VerbPOST
Urlhttps://api.s.unit.sh/recurring-repayments/{id}/enable
Required Scoperepayments
Timeout (Seconds)5

Response

Response is a JSON:API document.

200 OK

FieldTypeDescription
dataOne of the following types (Recurring ACH Repayment or Recurring Book Repayment or Recurring Capital Partner ACH Repayment or Recurring Capital Partner Book RepaymentRecurring 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.

Example Response:
{
"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.

VerbGET
Urlhttps://api.s.unit.sh/recurring-repayments/{id}
Required Scoperepayments
Timeout (Seconds)5

Response

Response is a JSON:API document.

200 OK

FieldTypeDescription
dataOne of the following types (Recurring ACH Repayment or Recurring Book Repayment or Recurring Capital Partner ACH Repayment or Recurring Capital Partner Book RepaymentRecurring 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.

VerbGET
Urlhttps://api.s.unit.sh/recurring-repayments
Required Scoperepayments
Timeout (Seconds)5

Query Parameters

NameTypeDefaultDescription
page[limit]integer100Optional. Maximum number of resources that will be returned. Maximum is 1000 resources. See Pagination.
page[offset]integer0Optional. 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
sortstringsort=-createdAtOptional. 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

FieldTypeDescription
dataAn array of Recurring Repayments (Recurring ACH Repayment or Recurring Book Repayment or Recurring Capital Partner ACH Repayment or Recurring Capital Partner Book RepaymentRecurring Repayment resource.
metaJSON object that contains pagination dataPagination data includes offset, limit and total (estimated total items).
Example Response:
{
"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
}
}
}