Get Autopays

Use the Get Autopays API endpoint to retrieve the autopays currently scheduled against 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 Get Autopays endpoint enables you to retrieve the current autopays on a customer's line of credit account, whichever of the customer's bank accounts each one collects from. Use this endpoint to display a customer's scheduled payments, or to retrieve an autopayId before updating or cancelling an autopay with the Update Autopay endpoint.

By default, the endpoint returns every current autopay on the account. To retrieve a single autopay, include its ID in the autopay_id query parameter.

📘

Note

Creating an autopay does not replace an existing one, so an account can have several current autopays and more than one payment may be scheduled. Completed, failed, cancelled and inactive autopays are not included in the response.

📘

More Information

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

Prerequisites

To integrate calls to the Get Autopays 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.
  • To retrieve a single autopay, the autopayId of the autopay. This is returned when you create the autopay with the Create Autopay endpoint, and in the response to this endpoint.

Example Request

Retrieve the autopays on an account by making a GET request to the Get Autopays endpoint.

GET {{baseUrl}}/api/v1/credit/accounts/{account_id}/payment/autopay

To retrieve a single autopay, add its ID as a query parameter:

GET {{baseUrl}}/api/v1/credit/accounts/{account_id}/payment/autopay?autopay_id={autopay_id}

Path Parameters

ParameterDescription
account_idstring. Required. The unique identifier of the line of credit account.

Query Parameters

ParameterDescription
autopay_idinteger. Optional. The unique identifier of a single current autopay to return. Must be a positive whole number. Omit it to return every current autopay on the account.

Example Response

A successful request returns a 200 HTTP status code.

All Autopays

If you do not include autopay_id, the response contains every current autopay on the account, most recently created first. If the account has no current autopays, autopays is an empty list.

{
  "accountId": "acc_123456",
  "autopays": [
    {
      "autopayId": "789012",
      "status": "scheduled",
      "autopayType": "recurring",
      "recurringPeriods": 12,
      "achType": "standard",
      "paymentAmountOption": "statement_balance",
      "amount": null,
      "paymentDate": "2025-02-15",
      "frequency": "monthly"
    },
    {
      "autopayId": "654321",
      "status": "scheduled",
      "autopayType": "single",
      "recurringPeriods": null,
      "achType": "same_day",
      "paymentAmountOption": "other_amount",
      "amount": "100.00",
      "paymentDate": "2025-02-01",
      "frequency": "one_time"
    }
  ]
}

Single Autopay

If you include autopay_id, the response contains that autopay as a single Autopay Object, without the accountId and autopays wrapper.

{
  "autopayId": "654321",
  "status": "scheduled",
  "autopayType": "single",
  "recurringPeriods": null,
  "achType": "same_day",
  "paymentAmountOption": "other_amount",
  "amount": "100.00",
  "paymentDate": "2025-02-01",
  "frequency": "one_time"
}
{
  "detail": "Account mapping not found."
}
{
  "detail": "Current autopay not found."
}

Response Fields

Autopay Response Object

Returned when you do not include autopay_id.

AttributeDescription
accountIdstring. The unique identifier of the line of credit account the autopays belong to.
autopaysarray. The current autopays on the account, most recently created first. See Autopay Object below.

Autopay Object

AttributeDescription
autopayIdstring. The unique identifier of the autopay. Pass this value to the Update Autopay endpoint to update or cancel it.
statusstring. The status of the autopay. See Autopay Status Values below.
autopayTypestring. Whether the autopay is a single payment (single) or a monthly recurring payment (recurring).
recurringPeriodsinteger or null. The number of monthly payments for a recurring autopay.
achTypestring. The ACH transfer speed: standard or same_day.
paymentAmountOptionstring. Which amount the autopay collects. See Payment Amount Option Values below.
amountstring or null. The payment amount. Only set when paymentAmountOption is other_amount. For every other option, the loan management system calculates the amount when the payment runs.
paymentDatestring. The date the payment applies on, in YYYY-MM-DD format.
frequencystring. How often the autopay repeats. See Frequency Values below.

Autopay Status Values

ValueDescription
scheduledThe autopay is scheduled and has not yet run.
completedThe autopay has run successfully.
failedThe autopay attempt failed.
cancelledThe autopay was cancelled before it ran.
unknownThe status of the autopay could not be determined.

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 on the autopay.

Frequency Values

ValueDescription
one_timeThe autopay runs once and does not repeat.
weeklyThe autopay repeats every week.
biweeklyThe autopay repeats every two weeks.
semi_monthlyThe autopay repeats twice a month.
semi_monthly_altAn alternate twice-a-month schedule.
monthlyThe autopay repeats every month.
quarterlyThe autopay repeats every quarter.
semi_annuallyThe autopay repeats every six months.
annuallyThe autopay repeats every year.
customA custom repeat schedule.

Error Messages

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

  • 404: The account_id does not match an existing account, or the autopay_id is not a current autopay on the account.
  • 422: The autopay_id is not valid, or Thredd could not retrieve the autopays from the loan management system. Try the request again.
{
  "detail": "Unable to retrieve the autopay configuration, please try again."
}

Did this page help you?