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.
| 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 Optional | string | Optional, additional repayment description (maximum of 80 characters), not all institutions present that in payment description. |
| sameDay Optional | boolean | Optional, default is false. See Same Day ACH. |
| secCode Optional | string | Optional. See Use a custom SEC Code. |
| idempotencyKey Optional | string | Optional. See Idempotency. |
| tags Optional | 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
| Name | 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 Optional | string | Optional. If this field is populated, its contents will be returned as the bookTransaction's summary field (maximum of 100 characters). |
| idempotencyKey Optional | string | Optional. See Idempotency. |
| tags Optional | 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. |
| 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
| Name | 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 Optional | string | Optional, additional repayment description (maximum of 80 characters), not all institutions present that in the description. |
| sameDay Optional | boolean | Optional, default is false. See Same Day ACH. |
| secCode Optional | string | Optional. See Use a custom SEC Code. |
| idempotencyKey Optional | string | Optional. See Idempotency. |
| tags Optional | 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
| Name | 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 Optional | string | Optional. If this field is populated, its contents will be returned as the bookTransaction's summary field (maximum of 100 characters). |
| idempotencyKey Optional | string | Optional. See Idempotency. |
| tags Optional | 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. |
| 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
| Name | 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
| Name | 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 'Content-Type: application/vnd.api+json'
-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
| Name | 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 'Content-Type: application/vnd.api+json'
-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
| Name | 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
| Name | 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
}
}
}