Create Autopay

Use the Create Autopay API endpoint to schedule an automatic payment against a customer's line of credit account using a linked bank account.

📘

Early Access

Credit API endpoints are currently being finalised as part of ongoing product development. While we do not anticipate significant changes, some interfaces, behaviours, and documentation may be refined before general availability.

The Create Autopay endpoint enables you to schedule a single automatic payment (autopay) against a customer's line of credit account, using a specific bank account linked to the customer. Use this endpoint to set up a scheduled ACH payment. To record a payment that has already been made outside of an automated bank transfer, use the Log Payment endpoint instead.

📘

More Information

For more information about the Accounts endpoints, see: Credit Accounts.

Prerequisites

To integrate calls to the Create Autopay endpoint, you need:

- The account_id of the line of credit account to schedule the payment against. This is the Thredd Account ID, returned when a credit application is approved.
- The bank_account_id of the bank account to use for the autopay. Bank accounts must first be created using the Create Bank Account endpoint before they can be referenced here.
- A decision on which amount the autopay should collect, and which date it should apply on — see Payment Amount Option Values and Payment Date Option Values below.

Example Request

Schedule an autopay by making a POST request to the Create Autopay endpoint.

POST {{baseUrl}}/api/v1/credit/accounts/{account_id}/bank-accounts/{bank_account_id}/payment/autopay

Path Parameters

ParameterDescription
account_idstring. Required. The unique identifier of the line of credit account.
bank_account_idstring. Required. The unique identifier of the bank account to use for the autopay.

Example Payload

{
  "paymentMethodAccountType": "checking | savings",
  "type": "standard | same_day",
  "paymentAmountOption": "minimum_payment | statement_balance | current_balance | past_due | other_amount",
  "amount": 0,
  "paymentDateOption": "due_date | specific_date",
  "applyDate": "YYYY-MM-DD"
}
{
  "paymentMethodAccountType": "checking",
  "type": "standard",
  "paymentAmountOption": "other_amount",
  "amount": 250.00,
  "paymentDateOption": "specific_date",
  "applyDate": "2025-02-15"
}
{
  "paymentMethodAccountType": "checking",
  "type": "standard",
  "paymentAmountOption": "statement_balance",
  "paymentDateOption": "due_date"
}

Request Fields

AttributeDescription
paymentMethodAccountTypestring. Required. The type of bank account. Possible values: checking, savings.
typestring. Required. The ACH transfer speed. Possible values: standard, same_day.
paymentAmountOptionstring. Optional. Which amount the autopay collects. Defaults to other_amount. Possible values: minimum_payment, statement_balance, current_balance, past_due, other_amount.
amountnumber or string. Conditional. The payment amount, as a positive number with up to two decimal places. Required when paymentAmountOption is other_amount, and rejected for every other option.
paymentDateOptionstring. Optional. Which date the payment applies on. Defaults to due_date. Possible values: due_date (the account's next due date), specific_date.
applyDatestring. Conditional. The date on which the payment applies to the account, in YYYY-MM-DD format. Required when paymentDateOption is specific_date, and rejected for due_date.

ACH Type Values

ValueDescription
standardStandard-speed ACH transfer.
same_daySame-day ACH transfer.

Payment Amount Option Values

ValueDescription
minimum_paymentCollects the account's current minimum payment.
statement_balanceCollects the account's most recent statement balance.
current_balanceCollects the account's current balance at the time the autopay runs.
past_dueCollects the amount currently past due on the account.
other_amountCollects the specific amount supplied in the request. This is the default.

Payment Date Option Values

ValueDescription
due_dateApplies the payment on the account's next due date. This is the default.
specific_dateApplies the payment on the applyDate supplied in the request.

Example Response

A successful request returns a 200 HTTP status code confirming the autopay has been scheduled.

📘

Note

If the request contains invalid data or is incomplete, the system returns a 422 HTTP error and details of the validation failure.

{
  "isSuccess": true
}
{
  "detail": "The account has no next due date, so an autopay cannot be scheduled on its due date."
}
{
  "detail": "Account mapping not found."
}
{
  "detail": "Bank Account mapping not found."
}
{
  "detail": [
    {
      "loc": ["body", "paymentMethodAccountType"],
      "msg": "Field required",
      "type": "missing"
    }
  ]
}

Response Fields

AttributeDescription
isSuccessboolean. Indicates whether the operation was successful.

Error Messages

If there is a problem with the request, the response returns one of the following errors:

- 400 — The autopay cannot be scheduled against the account in its current state — for example, if paymentDateOption is due_date but the account has no next due date set.
- 404 — The account_id or bank_account_id provided does not match an existing account or bank account.
- 422 — A required field or its value is missing or invalid, or a conditional field (amount or applyDate) was supplied when it should have been omitted, or omitted when required. The response includes details of the validation failure.

📘

More Information

To view or cancel autopays already scheduled on an account, see List Autopays and Update Autopay.


Did this page help you?