How can I split a payment collection into calculated monthly installments?

Hi everyone,

I’m receiving the following collection from an incoming webhook:

[
    {
        "Contact": "Test Person",
        "Value": "€ 3,000",
        "Terms": "3",
        "Email": "info@test.nl",
        "Date": "2025-06-27 12:53"
    }
]

What I’m trying to achieve is to automatically generate a new array of collections based on the number of installments (Term) and split the total amount (Value) evenly across those terms. Additionally, each installment should be assigned a date — recurring monthly from the original date provided.

Here’s an example of the desired output:

[ 
{
"Term": [
    {
        "Contact": "Test Person",
        "Value": "€ 1,000",
        "Email": "info@test.nl",
        "Date": "2025-06-27 00:00"
    },
    {
        "Contact": "Test Person",
        "Value": "€ 1,000",
        "Email": "info@test.nl",
        "Date": "2025-07-27 00:00"
    },
    {
        "Contact": "Test Person",
        "Value": "€ 1,000",
        "Email": "info@test.nl",
        "Date": "2025-08-27 00:00"
    }
]
}
]

If, for example, the total value is €12,000 and the terms are 12, then I would expect 12 monthly entries of €1,000 each, with the date increasing by one month per entry.

I’ve tried several approaches using Iterators, Aggregators, and Set Variable modules in Make, but I haven’t been able to get it to work properly. I’ve been stuck on this for a few days now and starting to wonder if it’s even possible with the tools in Make.

If anyone could point me in the right direction (or share a working example or blueprint), I’d really appreciate it!

Thanks so much in advance :folded_hands:

1 Like

Hi @TT92
Workflow:

Sample structure from your side

Create a structure in Aggregate to json module.


Map the array from array aggregator:

Then setup the array aggregator, select target structure as term from aggregate json

Best regards,
Msquare Automation
Platinum Partner of Make
@Msquare_Automation

Hi @TT92

Refer the attached blueprint:
Shirin_Msquare.blueprint.json (9.3 KB)

Best regards,
Msquare Automation
Platinum Partner of Make
@Msquare_Automation

@Msquare_Automation Thanks for the input! It’s definitely heading in the right direction!

There are a few small issues in your screenshots, but I can see the logic behind your setup and understand how the modules are correcting the values.

I’ve managed to get the desired value and term output. However, I’m unsure how best to handle the dates.

The first term date should match the actual payment date, and each subsequent term should increment by +1 month.

Normally, I would use the bundle order position to determine how many months to add, but since I’m working within an Aggregation module, I can’t retrieve the original date (i.e. the date from the first bundle) easily within the loop.

Do you have any suggestions on how to handle this smartly within an aggregation context?

Already found a way :slight_smile:

Thank you for the help!

1 Like