Skip to main content

Recurring Repayments APIs

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

description
string
Repayment description (maximum of 50 characters). This will show up on the statement of the counterparty.
addendaOptional
string
Optional, additional repayment description (maximum of 80 characters), not all institutions present that in payment description.
sameDayOptional
boolean
Optional, default is false. See Same Day ACH.
secCodeOptional
string
Optional. See Use a custom SEC Code.
idempotencyKeyOptional
string
Optional. See Idempotency.
tagsOptional
object
Optional. See Tags. Tags that will be copied to any transaction that this recurring repayment creates (see Tag Inheritance).

Relationships

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.
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

data
The 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.Tags that will be copied to any transaction that this recurring repayment creates (see Tag Inheritance).

Relationships

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.
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

data
The 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

description
string
Repayment description (maximum of 50 characters), this will show up on the statement of the counterparty.
addendaOptional
string
Optional, additional repayment description (maximum of 80 characters), not all institutions present that in the description.
sameDayOptional
boolean
Optional, default is false. See Same Day ACH.
secCodeOptional
string
Optional. See Use a custom SEC Code.
idempotencyKeyOptional
string
Optional. See Idempotency.
tagsOptional
object
Optional. See Tags. Tags that will be copied to any transaction that this recurring repayment creates (see Tag Inheritance).

Relationships

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.
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

data
The 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.Tags that will be copied to any transaction that this recurring repayment creates (see Tag Inheritance).

Relationships

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.
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

data
The 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

curl -X POST 'https://api.s.unit.sh/recurring-repayments/12/disable'
-H 'Content-Type: application/vnd.api+json'
-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

curl -X POST 'https://api.s.unit.sh/recurring-repayments/12/enable'
-H 'Content-Type: application/vnd.api+json'
-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

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

meta
JSON object that contains pagination data
Pagination 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
}
}
}