Skip to main content

Recurring Payments

With Ntropy Recurring Payments, you can extract all recurring payments from your customers' bank transactions.

Getting Started

The first step is to add the entire transaction history of an account holder using Ntropy enrichment. If you have previously added these transactions, you do not need to add them again.

Once transactions have been added, the recurring payments can be retrieved:

$ curl \
-H "Content-Type: application/json" \
-X POST \<account_holder_id>/recurring-payments

You will get back a list of recurring payment groups:

017.99Netflixnetflix.commonthly2022-01-012022-04-012022-05-01subscriptionFalseTrue, tx-3, tx-2, tx-1Recurring Debit Purchase Card 1350 #6063924 CA71.96USD
111.99Dropboxdropbox.commonthly2022-03-152022-03-152022-04-15subscriptionFalseTrue*RJXZ4L113B58 DROPBOX.COM CA 03/1511.99USD
29.99Spotifyspotify.commonthly2022-01-152022-03-152022-04-15subscriptionFalseTrue, tx-6, tx-5SPOTIFY 877-778-1161 NY S582210783453432 CARD 337329.97USD
3100Consolidated Edisonconed.commonthly2022-01-012022-03-012022-04-01billTrueTrue, tx-13, tx-12Consolidated Edison300.0USD
41000Avesta Housingavestahousing.orgmonthly2022-01-012022-03-012022-04-01billTrueTrue, tx-10, tx-9Payment from Avesta Housing3000.0USD

Each output field within the response is explained below.

latest_payment_amountfloatAmount of the latest recurring payment in this group.
merchantstringNormalized merchant name (if a merchant is present).
websitestringWebsite of the merchant (if a merchant is present).
logourlLogo of the merchant (if a merchant is present).
labelslist(string)Label from our live hierarchy (consumer).
periodicityenumTime between payments in the recurring payments group; weekly, bi-weekly, monthly, bi-monthly, quarterly, semi-yearly, yearly, other (based on the mode interval between two sequential payments).
first_payment_datedateDate of the first recurring payment for this group.
latest_payment_datedateDate of the most recent recurring payment for this group.
next_expected_payment_datedateDate of the next expected recurring payment for this group. This is determined by adding up the periodicity to the latest latestpayment_date. (null_ if group is inactive).
latest_payment_descriptionstringDescription of the most recent recurring payment for this group.
typestringType of recurring payments. Can be one of:
subscription - subscriptions like Netflix, DropBox, Spotify etc.
bill - recurring bills such as electricity bills or rent bills.
is_essentialbooleanIndicates whether the recurring payments are essential (e.g. rent, tax payments, transportation subscription), or non-essential (discretionary spending e.g. music streaming, gym subscription).
is_activebooleanIndicates whether the recurring payments group is still active. This is determined by checking whether the next_expected_payment_date is in the future compared to the latest payment date of the account holder.
transaction_idslist(string)Ids of transactions that belong to this recurring payments group.
transactionslist(Transaction)Returns a list of the transactions that belong to this recurring payments group (SDK only).
total_amountfloatTotal amount of the recurring payments during the period between first_payment_date and latest_payment_date.
iso_currency_codestringCurrency of the recurring payments in ISO-4217 format. See supported options.

Example Code

from ntropy_sdk import SDK, Transaction
import uuid

sdk = SDK("<YOUR-API-KEY>")
account_holder_id = str(uuid.uuid4())

transactions = [
("2021-01-01", 17.99, "Recurring Debit Purchase Card 1350 #3233432 CA",),
("2021-02-01", 17.99, "Recurring Debit Purchase Card 1350 #4248423 CA"),
("2021-03-01", 17.99, "Recurring Debit Purchase Card 1350 #5364213 CA"),
("2021-04-01", 17.99, "Recurring Debit Purchase Card 1350 #6063924 CA"),

("2021-01-15", 17.24, "SPOTIFY 877-778-1161 NY S582210763326751 CARD 3373"),
("2021-02-15", 17.24, "SPOTIFY 877-778-1161 NY S582210773412353 CARD 3373"),
("2021-03-15", 17.24, "SPOTIFY 877-778-1161 NY S582210783453432 CARD 3373"),

("2021-03-15", 11.99, "DROPBOX*RJXZ4L113B58 DROPBOX.COM CA 03/15"),

("2021-01-01", 100.0, "Consolidated Edison"),
("2021-02-01", 100.0, "Consolidated Edison"),
("2021-03-01", 100.0, "Consolidated Edison"),

("2021-01-01", 1000.0, 'Payment from Avesta Housing'),
("2021-02-01", 1000.0, 'Payment from Avesta Housing'),
("2021-03-01", 1000.0, 'Payment from Avesta Housing'),

transactions = [
for i, tx in enumerate(transactions)

enriched_transactions = sdk.add_transactions(transactions)
recurring_payments = sdk.get_recurring_payments(account_holder_id)


Utility functions

The SDK provides a few utility functions that can be used to help with filtering the recurring payments.

# returns a list of subscriptions

# returns a list of active subscriptions

# returns a list of past subscriptions which are not active anymore

# returns a list of bills

# returns a list of essential recurring payments

# returns a list of non-essential recurring payments