Update Autopay

Use the Update Autopay API endpoint to change a scheduled autopay, or to cancel it, on a customer's line of credit 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 Update Autopay endpoint enables you to change a scheduled autopay on a customer's line of credit account, or to cancel it. You can change the payment amount, the apply date, whether the autopay is a single or monthly recurring payment, and the ACH transfer speed. You can also move the autopay to a different bank account. Use this endpoint when a customer wants to adjust an autopay they've already set up, or to stop a future payment. To create a new autopay instead, use the Create Autopay endpoint.

Any settings you leave out of the request stay as they are.

📘

More Information

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

Prerequisites

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

  • The account_id of the line of credit account. This is the Thredd Account ID, returned when a credit application is approved.
  • The autopay_id of the autopay to update. This is the autopayId value returned by the Create Autopay and Get Autopays endpoints.
  • The field or fields you want to change. All request fields are optional, so include only the fields you want to update.

Example Request

Update an autopay by making a PUT request to the Update Autopay endpoint.

PUT {{baseUrl}}/api/v1/credit/accounts/{account_id}/payment/autopay/{autopay_id}

Path Parameters

ParameterDescription
account_idstring. Required. The unique identifier of the line of credit account.
autopay_idstring. Required. The unique identifier of the autopay to update.

Example Payload

{
  "bankAccountId": "string",
  "autopayType": "single | recurring",
  "recurringPeriods": 0,
  "paymentAmountOption": "minimum_payment | statement_balance | current_balance | past_due | other_amount",
  "amount": 0,
  "paymentDateOption": "due_date | specific_date",
  "applyDate": "YYYY-MM-DD",
  "achType": "standard | same_day",
  "status": "scheduled | completed | failed | cancelled | unknown"
}
{
  "paymentAmountOption": "other_amount",
  "amount": 25.50
}
{
  "paymentDateOption": "specific_date",
  "applyDate": "2025-03-01"
}
{
  "autopayType": "recurring",
  "recurringPeriods": 6
}
{
  "bankAccountId": "9a4c7e15-2b8d-4f30-a6e1-5c9d0b3f7a26"
}
{
  "status": "cancelled"
}

Request Fields

AttributeDescription
bankAccountIdstring. Optional. The unique identifier (UUID) of the bank account to move the autopay to. If you omit this field, the autopay stays on its current bank account.
autopayTypestring. Optional. Whether the autopay is a single payment or a monthly recurring payment. Possible values: single, recurring. If you change this without setting a date, the payment applies on the account's next due date.
recurringPeriodsinteger. Optional. The number of monthly payments for a recurring autopay, as a whole number of 1 or more.
paymentAmountOptionstring. Optional. Which amount the autopay collects. Possible values: minimum_payment, statement_balance, current_balance, past_due, other_amount.
amountnumber or string. Conditional. The payment amount, as a positive number. Required when paymentAmountOption is other_amount. For the other options, the loan management system calculates the amount.
paymentDateOptionstring. Optional. Which date the payment applies on. Possible values: due_date (the account's next due date), specific_date (the date in applyDate).
applyDatestring. Conditional. The date on which the payment applies to the account, in YYYY-MM-DD format. Required when paymentDateOption is specific_date.
achTypestring. Optional. The ACH transfer speed. Possible values: standard, same_day.
statusstring. Optional. The status of the autopay. Send cancelled to cancel the autopay. Possible values: scheduled, completed, failed, cancelled, unknown.

The request must not include any other fields. Thredd rejects fields it does not recognise with a 422 error.

When you change the apply date, Thredd also reschedules processing to three calendar days before the new date.

📘

Note

To cancel an autopay before it runs, send "status": "cancelled" and no other fields.

Example Response

A successful request returns a 200 HTTP status code confirming the autopay has been updated. To see the updated autopay, call the Get Autopays endpoint with the autopay_id query parameter.

{
  "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", "status"],
      "msg": "Input should be 'scheduled', 'completed', 'failed', 'cancelled' or 'unknown'",
      "type": "enum"
    }
  ]
}

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 because the account has no next due date. For example, the autopay applies on the due date, or you changed autopayType without setting a date. Set paymentDateOption to specific_date with an applyDate instead.
  • 404: The account_id, autopay_id or bankAccountId does not match an existing account, autopay or bank account.
  • 422: A field value is invalid, a conditional field is missing, or the request includes a field Thredd does not recognise. For example, the status or paymentAmountOption value isn't recognised, amount is missing for other_amount, or applyDate is in the wrong format. The response includes details of the validation failure.

Did this page help you?