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 the payment amount option or apply date of a scheduled autopay, move it to a different bank account, or cancel it, on a customer's line of credit 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.

📘

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 Get Autopays endpoint.
  • 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",
  "paymentAmountOption": "minimum_payment | statement_balance | current_balance | past_due | other_amount",
  "applyDate": "YYYY-MM-DD",
  "status": "scheduled | completed | failed | cancelled | unknown"
}
{
  "applyDate": "2025-03-01"
}
{
  "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.
paymentAmountOptionstring. Optional. Which amount the autopay collects. Possible values: minimum_payment, statement_balance, current_balance, past_due, other_amount.
applyDatestring. Optional. The date on which the payment applies to the account, in YYYY-MM-DD format.
statusstring. Optional. The status of the autopay. Send cancelled to cancel the autopay. Possible values: scheduled, completed, failed, cancelled, unknown.
📘

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.

{
  "isSuccess": true
}
{
  "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:

  • 404 — The account_id, autopay_id or bankAccountId does not match an existing account, autopay or bank account.
  • 422 — A field value is invalid. For example, the status or paymentAmountOption value isn't recognised, or applyDate is in the wrong format. The response includes details of the validation failure.

Did this page help you?