@@ -5,7 +5,7 @@ export type RecurringPaymentStatus = "Active" | "Completed" | "Disabled"
55
66export type Interval = "Monthly"
77
8- export type RecurringPayment = RecurringCreditAchPayment | RecurringCreditBookPayment
8+ export type RecurringPayment = RecurringCreditAchPayment | RecurringCreditBookPayment | RecurringDebitAchPayment
99
1010interface RecurringPaymentAttributes {
1111 /**
@@ -53,7 +53,7 @@ interface RecurringPaymentAttributes {
5353
5454interface RecurringPaymentRelationships {
5555 /**
56- * The Deposit Account originating the recurring payment.
56+ * The [ Deposit Account](https://docs.unit.co/deposit-accounts/) originating the recurring payment.
5757 */
5858 account : Relationship
5959
@@ -63,7 +63,7 @@ interface RecurringPaymentRelationships {
6363 org : Relationship
6464
6565 /**
66- * The Customer the deposit account belongs to. This relationship is only available if the account belongs to a single customer, business or individual.
66+ * The [ Customer](https://docs.unit.co/customers/) the deposit account belongs to. This relationship is only available if the account belongs to a single customer, business or individual.
6767 */
6868 customer ?: Relationship
6969}
@@ -132,6 +132,38 @@ export interface RecurringCreditBookPayment {
132132 } & RecurringPaymentRelationships
133133}
134134
135+ export interface RecurringDebitAchPayment {
136+ /**
137+ * Identifier of the recurring credit book payment resource.
138+ */
139+ id : string
140+
141+ /**
142+ * Type of the payment resource. The value is always recurringDebitAchPayment.
143+ */
144+ type : "recurringDebitAchPayment"
145+
146+ /**
147+ * JSON object representing the recurring payment resource.
148+ */
149+ attributes : {
150+ /**
151+ * Optional, additional payment description (maximum of 80 characters), not all institutions present that.
152+ */
153+ addenda ?: string
154+ } & RecurringPaymentAttributes
155+
156+ /**
157+ * Describes relationships between the Recurring Debit ACH payment and the originating deposit account and org.
158+ */
159+ relationships : {
160+ /**
161+ * The [Counterparty](https://docs.unit.co/payments-counterparties) the payment to be made to.
162+ */
163+ counterparty : Relationship
164+ } & RecurringPaymentRelationships
165+ }
166+
135167interface BaseSchedule {
136168 /**
137169 * RFC3339 format. For more information: https://en.wikipedia.org/wiki/ISO_8601#RFCs
@@ -172,7 +204,7 @@ export interface Schedule extends BaseSchedule {
172204 nextScheduledAction : string
173205}
174206
175- export type CreateRecurringPaymentRequest = CreateRecurringCreditAchPaymentRequest | CreateRecurringCreditBookPaymentRequest
207+ export type CreateRecurringPaymentRequest = CreateRecurringCreditAchPaymentRequest | CreateRecurringCreditBookPaymentRequest | CreateRecurringDebitAchPaymentRequest
176208
177209interface CreateRecurringRequestAttributes {
178210 /**
@@ -201,6 +233,18 @@ interface CreateRecurringRequestAttributes {
201233 tags ?: object
202234}
203235
236+ interface CreateRecurringRequestRelationships {
237+ /**
238+ * The Deposit Account originating the recurring payment.
239+ */
240+ account : Relationship
241+
242+ /**
243+ * The Counterparty account to which the payment will be made.
244+ */
245+ counterparty : Relationship
246+ }
247+
204248export interface CreateRecurringCreditAchPaymentRequest {
205249 type : "recurringCreditAchPayment"
206250
@@ -217,17 +261,7 @@ export interface CreateRecurringCreditAchPaymentRequest {
217261 /**
218262 * JSON:API Relationships. Describes relationships between the Recurring Credit ACH payment and the originating deposit account and org.
219263 */
220- relationships : {
221- /**
222- * The Deposit Account originating the recurring payment.
223- */
224- account : Relationship
225-
226- /**
227- * The Counterparty the payment to be made to.
228- */
229- counterparty : Relationship
230- }
264+ relationships : CreateRecurringRequestRelationships
231265}
232266
233267export interface CreateRecurringCreditBookPaymentRequest {
@@ -259,3 +293,29 @@ export interface CreateRecurringCreditBookPaymentRequest {
259293 }
260294}
261295
296+ export interface CreateRecurringDebitAchPaymentRequest {
297+ type : "recurringDebitAchPayment"
298+
299+ /**
300+ * JSON object representing the recurring payment resource.
301+ */
302+ attributes : {
303+ /**
304+ * Optional, additional payment description (maximum of 50 characters), not all institutions present that.
305+ */
306+ addenda ?: string
307+
308+ /**
309+ * Optional, default is false. Verify the counterparty balance, if balance verification fails the payment will be rejected with reason set to CounterpartyInsufficientFunds.
310+ */
311+ verifyCounterpartyBalance ?: boolean
312+
313+ /**
314+ * Optional, default is false. See Same Day ACH.
315+ */
316+ sameDay ?: boolean
317+ } & CreateRecurringRequestAttributes
318+
319+ relationships : CreateRecurringRequestRelationships
320+ }
321+
0 commit comments