1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "asOf": "2026-10-01T12:00:00.000Z",
12 "currencyScales": {
13 "USD": 2,
14 "EUR": 2
15 },
16 "transactions": {
17 "csv": "processor,account,currency,id,payoutId,category,gross,fee,net,date\nstripe,merchant-001,USD,txn-001,po-001,charge,100.00,3.00,97.00,2026-09-20\nstripe,merchant-001,USD,txn-002,po-001,refund,-10.00,0.00,-10.00,2026-09-21\nstripe,merchant-001,USD,txn-002,po-001,refund,-10.00,0.00,-10.00,2026-09-21\nshopify,store-002,USD,00003,payout-002,charge,50.00,2.00,48.00,2026-09-22\npaypal,seller-003,EUR,adj-004,payout-003,charge,20.00,2.00,18.00,2026-09-22\n"
18 },
19 "payouts": {
20 "csv": "processor,account,currency,id,amount,status,expectedArrivalDate,mode\nstripe,merchant-001,USD,po-001,87.00,paid,2026-09-25,automatic\nshopify,store-002,USD,payout-002,45.00,paid,2026-09-25,automatic\npaypal,seller-003,EUR,payout-003,18.00,paid,2026-09-26,automatic\n"
21 },
22 "deposits": {
23 "csv": "processor,account,currency,id,amount,postingDate,reference\nstripe,merchant-001,USD,bank-001,87.00,2026-09-25,explicit-reference-001\nstripe,merchant-001,USD,unrelated-same-amount,87.00,2026-09-25,other-payment\nshopify,store-002,USD,bank-002,45.00,2026-09-25,explicit-reference-002\npaypal,seller-003,EUR,bank-003,18.00,2026-09-26,unlinked-credit\n"
24 },
25 "depositLinks": {
26 "csv": "processor,account,currency,payoutId,depositId,allocation\nstripe,merchant-001,USD,po-001,bank-001,\nshopify,store-002,USD,payout-002,bank-002,\n"
27 },
28 "transactionCoverage": [
29 {
30 "processor": "stripe",
31 "account": "merchant-001",
32 "currency": "USD",
33 "startDate": "2026-09-01",
34 "endDate": "2026-10-01",
35 "complete": true
36 },
37 {
38 "processor": "shopify",
39 "account": "store-002",
40 "currency": "USD",
41 "startDate": "2026-09-01",
42 "endDate": "2026-10-01",
43 "complete": true
44 },
45 {
46 "processor": "paypal",
47 "account": "seller-003",
48 "currency": "EUR",
49 "startDate": "2026-09-01",
50 "endDate": "2026-10-01",
51 "complete": true
52 }
53 ],
54 "bankCoverage": [
55 {
56 "processor": "stripe",
57 "account": "merchant-001",
58 "currency": "USD",
59 "startDate": "2026-09-01",
60 "endDate": "2026-10-01",
61 "complete": true
62 },
63 {
64 "processor": "shopify",
65 "account": "store-002",
66 "currency": "USD",
67 "startDate": "2026-09-01",
68 "endDate": "2026-10-01",
69 "complete": true
70 },
71 {
72 "processor": "paypal",
73 "account": "seller-003",
74 "currency": "EUR",
75 "startDate": "2026-09-01",
76 "endDate": "2026-10-01",
77 "complete": false
78 }
79 ]
80};
81
82
83const run = await client.actor("h_murdock/processor-payout-exceptions").call(input);
84
85
86console.log('Results from dataset');
87console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
88const { items } = await client.dataset(run.defaultDatasetId).listItems();
89items.forEach((item) => {
90 console.dir(item);
91});
92
93