1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "feeSchedules": [
12 {
13 "id": "stripe_us_card",
14 "rules": [
15 {
16 "percent": "2.9",
17 "fixed": "0.30"
18 }
19 ]
20 }
21 ],
22 "text": {
23 "items": "id,Type,Amount,Currency,Created (UTC)\nch_1,charge,100.00,usd,2026-10-01 09:12:44\nch_2,charge,250.00,usd,2026-10-01 14:03:10\nch_3,charge,40.00,usd,2026-10-02 08:45:31\nre_1,refund,25.00,usd,2026-10-02 16:20:05",
24 "settlements": "id,Amount,Currency,Arrival Date\npo_1,314.25,usd,2026-10-05"
25 }
26};
27
28
29const run = await client.actor("davidcondrey/wl-reconcile-ledger").call(input);
30
31
32console.log('Results from dataset');
33console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
34const { items } = await client.dataset(run.defaultDatasetId).listItems();
35items.forEach((item) => {
36 console.dir(item);
37});
38
39