dodopayments-mcp 1.52.6 → 1.53.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +9 -0
  2. package/package.json +2 -2
  3. package/server.js +1 -1
  4. package/server.mjs +1 -1
  5. package/src/server.ts +1 -1
  6. package/src/tools/customers/wallets/ledger-entries/create-wallets-customers-ledger-entries.ts +217 -0
  7. package/src/tools/customers/wallets/ledger-entries/list-wallets-customers-ledger-entries.ts +209 -0
  8. package/src/tools/customers/wallets/list-customers-wallets.ts +47 -0
  9. package/src/tools/index.ts +6 -0
  10. package/src/tools/licenses/activate-licenses.ts +1 -1
  11. package/src/tools/refunds/create-refunds.ts +1 -1
  12. package/src/tools/refunds/list-refunds.ts +1 -1
  13. package/src/tools/refunds/retrieve-refunds.ts +1 -1
  14. package/src/tools/subscriptions/charge-subscriptions.ts +14 -0
  15. package/tools/customers/wallets/ledger-entries/create-wallets-customers-ledger-entries.d.mts +45 -0
  16. package/tools/customers/wallets/ledger-entries/create-wallets-customers-ledger-entries.d.mts.map +1 -0
  17. package/tools/customers/wallets/ledger-entries/create-wallets-customers-ledger-entries.d.ts +45 -0
  18. package/tools/customers/wallets/ledger-entries/create-wallets-customers-ledger-entries.d.ts.map +1 -0
  19. package/tools/customers/wallets/ledger-entries/create-wallets-customers-ledger-entries.js +210 -0
  20. package/tools/customers/wallets/ledger-entries/create-wallets-customers-ledger-entries.js.map +1 -0
  21. package/tools/customers/wallets/ledger-entries/create-wallets-customers-ledger-entries.mjs +206 -0
  22. package/tools/customers/wallets/ledger-entries/create-wallets-customers-ledger-entries.mjs.map +1 -0
  23. package/tools/customers/wallets/ledger-entries/list-wallets-customers-ledger-entries.d.mts +45 -0
  24. package/tools/customers/wallets/ledger-entries/list-wallets-customers-ledger-entries.d.mts.map +1 -0
  25. package/tools/customers/wallets/ledger-entries/list-wallets-customers-ledger-entries.d.ts +45 -0
  26. package/tools/customers/wallets/ledger-entries/list-wallets-customers-ledger-entries.d.ts.map +1 -0
  27. package/tools/customers/wallets/ledger-entries/list-wallets-customers-ledger-entries.js +204 -0
  28. package/tools/customers/wallets/ledger-entries/list-wallets-customers-ledger-entries.js.map +1 -0
  29. package/tools/customers/wallets/ledger-entries/list-wallets-customers-ledger-entries.mjs +200 -0
  30. package/tools/customers/wallets/ledger-entries/list-wallets-customers-ledger-entries.mjs.map +1 -0
  31. package/tools/customers/wallets/list-customers-wallets.d.mts +45 -0
  32. package/tools/customers/wallets/list-customers-wallets.d.mts.map +1 -0
  33. package/tools/customers/wallets/list-customers-wallets.d.ts +45 -0
  34. package/tools/customers/wallets/list-customers-wallets.d.ts.map +1 -0
  35. package/tools/customers/wallets/list-customers-wallets.js +42 -0
  36. package/tools/customers/wallets/list-customers-wallets.js.map +1 -0
  37. package/tools/customers/wallets/list-customers-wallets.mjs +38 -0
  38. package/tools/customers/wallets/list-customers-wallets.mjs.map +1 -0
  39. package/tools/index.d.mts.map +1 -1
  40. package/tools/index.d.ts.map +1 -1
  41. package/tools/index.js +6 -0
  42. package/tools/index.js.map +1 -1
  43. package/tools/index.mjs +6 -0
  44. package/tools/index.mjs.map +1 -1
  45. package/tools/licenses/activate-licenses.js +1 -1
  46. package/tools/licenses/activate-licenses.js.map +1 -1
  47. package/tools/licenses/activate-licenses.mjs +1 -1
  48. package/tools/licenses/activate-licenses.mjs.map +1 -1
  49. package/tools/refunds/create-refunds.js +1 -1
  50. package/tools/refunds/create-refunds.js.map +1 -1
  51. package/tools/refunds/create-refunds.mjs +1 -1
  52. package/tools/refunds/create-refunds.mjs.map +1 -1
  53. package/tools/refunds/list-refunds.js +1 -1
  54. package/tools/refunds/list-refunds.js.map +1 -1
  55. package/tools/refunds/list-refunds.mjs +1 -1
  56. package/tools/refunds/list-refunds.mjs.map +1 -1
  57. package/tools/refunds/retrieve-refunds.js +1 -1
  58. package/tools/refunds/retrieve-refunds.js.map +1 -1
  59. package/tools/refunds/retrieve-refunds.mjs +1 -1
  60. package/tools/refunds/retrieve-refunds.mjs.map +1 -1
  61. package/tools/subscriptions/charge-subscriptions.d.mts.map +1 -1
  62. package/tools/subscriptions/charge-subscriptions.d.ts.map +1 -1
  63. package/tools/subscriptions/charge-subscriptions.js +14 -0
  64. package/tools/subscriptions/charge-subscriptions.js.map +1 -1
  65. package/tools/subscriptions/charge-subscriptions.mjs +14 -0
  66. package/tools/subscriptions/charge-subscriptions.mjs.map +1 -1
package/README.md CHANGED
@@ -296,6 +296,15 @@ The following tools are available in this MCP server.
296
296
 
297
297
  - `create_customers_customer_portal` (`write`):
298
298
 
299
+ ### Resource `customers.wallets`:
300
+
301
+ - `list_customers_wallets` (`read`):
302
+
303
+ ### Resource `customers.wallets.ledger_entries`:
304
+
305
+ - `create_wallets_customers_ledger_entries` (`write`):
306
+ - `list_wallets_customers_ledger_entries` (`read`):
307
+
299
308
  ### Resource `refunds`:
300
309
 
301
310
  - `create_refunds` (`write`):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dodopayments-mcp",
3
- "version": "1.52.6",
3
+ "version": "1.53.2",
4
4
  "description": "The official MCP Server for the Dodo Payments API",
5
5
  "author": "Dodo Payments <founders@dodopayments.com>",
6
6
  "types": "./index.d.ts",
@@ -27,7 +27,7 @@
27
27
  "fix": "eslint --fix --ext ts,js ."
28
28
  },
29
29
  "dependencies": {
30
- "dodopayments": "^1.52.6",
30
+ "dodopayments": "^1.53.2",
31
31
  "@cloudflare/cabidela": "^0.2.4",
32
32
  "@modelcontextprotocol/sdk": "^1.11.5",
33
33
  "@valtown/deno-http-worker": "^0.0.21",
package/server.js CHANGED
@@ -21,7 +21,7 @@ var tools_2 = require("./tools.js");
21
21
  Object.defineProperty(exports, "endpoints", { enumerable: true, get: function () { return tools_2.endpoints; } });
22
22
  const newMcpServer = () => new mcp_js_1.McpServer({
23
23
  name: 'dodopayments_api',
24
- version: '1.52.6',
24
+ version: '1.53.2',
25
25
  }, { capabilities: { tools: {}, logging: {} } });
26
26
  exports.newMcpServer = newMcpServer;
27
27
  // Create server instance
package/server.mjs CHANGED
@@ -10,7 +10,7 @@ export { ClientType } from "./compat.mjs";
10
10
  export { endpoints } from "./tools.mjs";
11
11
  export const newMcpServer = () => new McpServer({
12
12
  name: 'dodopayments_api',
13
- version: '1.52.6',
13
+ version: '1.53.2',
14
14
  }, { capabilities: { tools: {}, logging: {} } });
15
15
  // Create server instance
16
16
  export const server = newMcpServer();
package/src/server.ts CHANGED
@@ -32,7 +32,7 @@ export const newMcpServer = () =>
32
32
  new McpServer(
33
33
  {
34
34
  name: 'dodopayments_api',
35
- version: '1.52.6',
35
+ version: '1.53.2',
36
36
  },
37
37
  { capabilities: { tools: {}, logging: {} } },
38
38
  );
@@ -0,0 +1,217 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { maybeFilter } from 'dodopayments-mcp/filtering';
4
+ import { Metadata, asTextContentResult } from 'dodopayments-mcp/tools/types';
5
+
6
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
+ import DodoPayments from 'dodopayments';
8
+
9
+ export const metadata: Metadata = {
10
+ resource: 'customers.wallets.ledger_entries',
11
+ operation: 'write',
12
+ tags: [],
13
+ httpMethod: 'post',
14
+ httpPath: '/customers/{customer_id}/wallets/ledger-entries',
15
+ operationId: 'create_customer_ledger_entry',
16
+ };
17
+
18
+ export const tool: Tool = {
19
+ name: 'create_wallets_customers_ledger_entries',
20
+ description:
21
+ "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/customer_wallet',\n $defs: {\n customer_wallet: {\n type: 'object',\n properties: {\n balance: {\n type: 'integer'\n },\n created_at: {\n type: 'string',\n format: 'date-time'\n },\n currency: {\n $ref: '#/$defs/currency'\n },\n customer_id: {\n type: 'string'\n },\n updated_at: {\n type: 'string',\n format: 'date-time'\n }\n },\n required: [ 'balance',\n 'created_at',\n 'currency',\n 'customer_id',\n 'updated_at'\n ]\n },\n currency: {\n type: 'string',\n enum: [ 'AED',\n 'ALL',\n 'AMD',\n 'ANG',\n 'AOA',\n 'ARS',\n 'AUD',\n 'AWG',\n 'AZN',\n 'BAM',\n 'BBD',\n 'BDT',\n 'BGN',\n 'BHD',\n 'BIF',\n 'BMD',\n 'BND',\n 'BOB',\n 'BRL',\n 'BSD',\n 'BWP',\n 'BYN',\n 'BZD',\n 'CAD',\n 'CHF',\n 'CLP',\n 'CNY',\n 'COP',\n 'CRC',\n 'CUP',\n 'CVE',\n 'CZK',\n 'DJF',\n 'DKK',\n 'DOP',\n 'DZD',\n 'EGP',\n 'ETB',\n 'EUR',\n 'FJD',\n 'FKP',\n 'GBP',\n 'GEL',\n 'GHS',\n 'GIP',\n 'GMD',\n 'GNF',\n 'GTQ',\n 'GYD',\n 'HKD',\n 'HNL',\n 'HRK',\n 'HTG',\n 'HUF',\n 'IDR',\n 'ILS',\n 'INR',\n 'IQD',\n 'JMD',\n 'JOD',\n 'JPY',\n 'KES',\n 'KGS',\n 'KHR',\n 'KMF',\n 'KRW',\n 'KWD',\n 'KYD',\n 'KZT',\n 'LAK',\n 'LBP',\n 'LKR',\n 'LRD',\n 'LSL',\n 'LYD',\n 'MAD',\n 'MDL',\n 'MGA',\n 'MKD',\n 'MMK',\n 'MNT',\n 'MOP',\n 'MRU',\n 'MUR',\n 'MVR',\n 'MWK',\n 'MXN',\n 'MYR',\n 'MZN',\n 'NAD',\n 'NGN',\n 'NIO',\n 'NOK',\n 'NPR',\n 'NZD',\n 'OMR',\n 'PAB',\n 'PEN',\n 'PGK',\n 'PHP',\n 'PKR',\n 'PLN',\n 'PYG',\n 'QAR',\n 'RON',\n 'RSD',\n 'RUB',\n 'RWF',\n 'SAR',\n 'SBD',\n 'SCR',\n 'SEK',\n 'SGD',\n 'SHP',\n 'SLE',\n 'SLL',\n 'SOS',\n 'SRD',\n 'SSP',\n 'STN',\n 'SVC',\n 'SZL',\n 'THB',\n 'TND',\n 'TOP',\n 'TRY',\n 'TTD',\n 'TWD',\n 'TZS',\n 'UAH',\n 'UGX',\n 'USD',\n 'UYU',\n 'UZS',\n 'VES',\n 'VND',\n 'VUV',\n 'WST',\n 'XAF',\n 'XCD',\n 'XOF',\n 'XPF',\n 'YER',\n 'ZAR',\n 'ZMW'\n ]\n }\n }\n}\n```",
22
+ inputSchema: {
23
+ type: 'object',
24
+ properties: {
25
+ customer_id: {
26
+ type: 'string',
27
+ },
28
+ amount: {
29
+ type: 'integer',
30
+ },
31
+ currency: {
32
+ $ref: '#/$defs/currency',
33
+ },
34
+ entry_type: {
35
+ type: 'string',
36
+ description: 'Type of ledger entry - credit or debit',
37
+ enum: ['credit', 'debit'],
38
+ },
39
+ idempotency_key: {
40
+ type: 'string',
41
+ description: 'Optional idempotency key to prevent duplicate entries',
42
+ },
43
+ reason: {
44
+ type: 'string',
45
+ },
46
+ jq_filter: {
47
+ type: 'string',
48
+ title: 'jq Filter',
49
+ description:
50
+ 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
51
+ },
52
+ },
53
+ required: ['customer_id', 'amount', 'currency', 'entry_type'],
54
+ $defs: {
55
+ currency: {
56
+ type: 'string',
57
+ enum: [
58
+ 'AED',
59
+ 'ALL',
60
+ 'AMD',
61
+ 'ANG',
62
+ 'AOA',
63
+ 'ARS',
64
+ 'AUD',
65
+ 'AWG',
66
+ 'AZN',
67
+ 'BAM',
68
+ 'BBD',
69
+ 'BDT',
70
+ 'BGN',
71
+ 'BHD',
72
+ 'BIF',
73
+ 'BMD',
74
+ 'BND',
75
+ 'BOB',
76
+ 'BRL',
77
+ 'BSD',
78
+ 'BWP',
79
+ 'BYN',
80
+ 'BZD',
81
+ 'CAD',
82
+ 'CHF',
83
+ 'CLP',
84
+ 'CNY',
85
+ 'COP',
86
+ 'CRC',
87
+ 'CUP',
88
+ 'CVE',
89
+ 'CZK',
90
+ 'DJF',
91
+ 'DKK',
92
+ 'DOP',
93
+ 'DZD',
94
+ 'EGP',
95
+ 'ETB',
96
+ 'EUR',
97
+ 'FJD',
98
+ 'FKP',
99
+ 'GBP',
100
+ 'GEL',
101
+ 'GHS',
102
+ 'GIP',
103
+ 'GMD',
104
+ 'GNF',
105
+ 'GTQ',
106
+ 'GYD',
107
+ 'HKD',
108
+ 'HNL',
109
+ 'HRK',
110
+ 'HTG',
111
+ 'HUF',
112
+ 'IDR',
113
+ 'ILS',
114
+ 'INR',
115
+ 'IQD',
116
+ 'JMD',
117
+ 'JOD',
118
+ 'JPY',
119
+ 'KES',
120
+ 'KGS',
121
+ 'KHR',
122
+ 'KMF',
123
+ 'KRW',
124
+ 'KWD',
125
+ 'KYD',
126
+ 'KZT',
127
+ 'LAK',
128
+ 'LBP',
129
+ 'LKR',
130
+ 'LRD',
131
+ 'LSL',
132
+ 'LYD',
133
+ 'MAD',
134
+ 'MDL',
135
+ 'MGA',
136
+ 'MKD',
137
+ 'MMK',
138
+ 'MNT',
139
+ 'MOP',
140
+ 'MRU',
141
+ 'MUR',
142
+ 'MVR',
143
+ 'MWK',
144
+ 'MXN',
145
+ 'MYR',
146
+ 'MZN',
147
+ 'NAD',
148
+ 'NGN',
149
+ 'NIO',
150
+ 'NOK',
151
+ 'NPR',
152
+ 'NZD',
153
+ 'OMR',
154
+ 'PAB',
155
+ 'PEN',
156
+ 'PGK',
157
+ 'PHP',
158
+ 'PKR',
159
+ 'PLN',
160
+ 'PYG',
161
+ 'QAR',
162
+ 'RON',
163
+ 'RSD',
164
+ 'RUB',
165
+ 'RWF',
166
+ 'SAR',
167
+ 'SBD',
168
+ 'SCR',
169
+ 'SEK',
170
+ 'SGD',
171
+ 'SHP',
172
+ 'SLE',
173
+ 'SLL',
174
+ 'SOS',
175
+ 'SRD',
176
+ 'SSP',
177
+ 'STN',
178
+ 'SVC',
179
+ 'SZL',
180
+ 'THB',
181
+ 'TND',
182
+ 'TOP',
183
+ 'TRY',
184
+ 'TTD',
185
+ 'TWD',
186
+ 'TZS',
187
+ 'UAH',
188
+ 'UGX',
189
+ 'USD',
190
+ 'UYU',
191
+ 'UZS',
192
+ 'VES',
193
+ 'VND',
194
+ 'VUV',
195
+ 'WST',
196
+ 'XAF',
197
+ 'XCD',
198
+ 'XOF',
199
+ 'XPF',
200
+ 'YER',
201
+ 'ZAR',
202
+ 'ZMW',
203
+ ],
204
+ },
205
+ },
206
+ },
207
+ annotations: {},
208
+ };
209
+
210
+ export const handler = async (client: DodoPayments, args: Record<string, unknown> | undefined) => {
211
+ const { customer_id, jq_filter, ...body } = args as any;
212
+ return asTextContentResult(
213
+ await maybeFilter(jq_filter, await client.customers.wallets.ledgerEntries.create(customer_id, body)),
214
+ );
215
+ };
216
+
217
+ export default { metadata, tool, handler };
@@ -0,0 +1,209 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { maybeFilter } from 'dodopayments-mcp/filtering';
4
+ import { Metadata, asTextContentResult } from 'dodopayments-mcp/tools/types';
5
+
6
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
+ import DodoPayments from 'dodopayments';
8
+
9
+ export const metadata: Metadata = {
10
+ resource: 'customers.wallets.ledger_entries',
11
+ operation: 'read',
12
+ tags: [],
13
+ httpMethod: 'get',
14
+ httpPath: '/customers/{customer_id}/wallets/ledger-entries',
15
+ operationId: 'get_customer_wallet_transactions',
16
+ };
17
+
18
+ export const tool: Tool = {
19
+ name: 'list_wallets_customers_ledger_entries',
20
+ description:
21
+ "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\n\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n items: {\n type: 'array',\n items: {\n $ref: '#/$defs/customer_wallet_transaction'\n }\n }\n },\n required: [ 'items'\n ],\n $defs: {\n customer_wallet_transaction: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n after_balance: {\n type: 'integer'\n },\n amount: {\n type: 'integer'\n },\n before_balance: {\n type: 'integer'\n },\n business_id: {\n type: 'string'\n },\n created_at: {\n type: 'string',\n format: 'date-time'\n },\n currency: {\n $ref: '#/$defs/currency'\n },\n customer_id: {\n type: 'string'\n },\n event_type: {\n type: 'string',\n enum: [ 'payment',\n 'payment_reversal',\n 'refund',\n 'refund_reversal',\n 'dispute',\n 'dispute_reversal',\n 'merchant_adjustment'\n ]\n },\n is_credit: {\n type: 'boolean'\n },\n reason: {\n type: 'string'\n },\n reference_object_id: {\n type: 'string'\n }\n },\n required: [ 'id',\n 'after_balance',\n 'amount',\n 'before_balance',\n 'business_id',\n 'created_at',\n 'currency',\n 'customer_id',\n 'event_type',\n 'is_credit'\n ]\n },\n currency: {\n type: 'string',\n enum: [ 'AED',\n 'ALL',\n 'AMD',\n 'ANG',\n 'AOA',\n 'ARS',\n 'AUD',\n 'AWG',\n 'AZN',\n 'BAM',\n 'BBD',\n 'BDT',\n 'BGN',\n 'BHD',\n 'BIF',\n 'BMD',\n 'BND',\n 'BOB',\n 'BRL',\n 'BSD',\n 'BWP',\n 'BYN',\n 'BZD',\n 'CAD',\n 'CHF',\n 'CLP',\n 'CNY',\n 'COP',\n 'CRC',\n 'CUP',\n 'CVE',\n 'CZK',\n 'DJF',\n 'DKK',\n 'DOP',\n 'DZD',\n 'EGP',\n 'ETB',\n 'EUR',\n 'FJD',\n 'FKP',\n 'GBP',\n 'GEL',\n 'GHS',\n 'GIP',\n 'GMD',\n 'GNF',\n 'GTQ',\n 'GYD',\n 'HKD',\n 'HNL',\n 'HRK',\n 'HTG',\n 'HUF',\n 'IDR',\n 'ILS',\n 'INR',\n 'IQD',\n 'JMD',\n 'JOD',\n 'JPY',\n 'KES',\n 'KGS',\n 'KHR',\n 'KMF',\n 'KRW',\n 'KWD',\n 'KYD',\n 'KZT',\n 'LAK',\n 'LBP',\n 'LKR',\n 'LRD',\n 'LSL',\n 'LYD',\n 'MAD',\n 'MDL',\n 'MGA',\n 'MKD',\n 'MMK',\n 'MNT',\n 'MOP',\n 'MRU',\n 'MUR',\n 'MVR',\n 'MWK',\n 'MXN',\n 'MYR',\n 'MZN',\n 'NAD',\n 'NGN',\n 'NIO',\n 'NOK',\n 'NPR',\n 'NZD',\n 'OMR',\n 'PAB',\n 'PEN',\n 'PGK',\n 'PHP',\n 'PKR',\n 'PLN',\n 'PYG',\n 'QAR',\n 'RON',\n 'RSD',\n 'RUB',\n 'RWF',\n 'SAR',\n 'SBD',\n 'SCR',\n 'SEK',\n 'SGD',\n 'SHP',\n 'SLE',\n 'SLL',\n 'SOS',\n 'SRD',\n 'SSP',\n 'STN',\n 'SVC',\n 'SZL',\n 'THB',\n 'TND',\n 'TOP',\n 'TRY',\n 'TTD',\n 'TWD',\n 'TZS',\n 'UAH',\n 'UGX',\n 'USD',\n 'UYU',\n 'UZS',\n 'VES',\n 'VND',\n 'VUV',\n 'WST',\n 'XAF',\n 'XCD',\n 'XOF',\n 'XPF',\n 'YER',\n 'ZAR',\n 'ZMW'\n ]\n }\n }\n}\n```",
22
+ inputSchema: {
23
+ type: 'object',
24
+ properties: {
25
+ customer_id: {
26
+ type: 'string',
27
+ },
28
+ currency: {
29
+ $ref: '#/$defs/currency',
30
+ },
31
+ page_number: {
32
+ type: 'integer',
33
+ },
34
+ page_size: {
35
+ type: 'integer',
36
+ },
37
+ jq_filter: {
38
+ type: 'string',
39
+ title: 'jq Filter',
40
+ description:
41
+ 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
42
+ },
43
+ },
44
+ required: ['customer_id'],
45
+ $defs: {
46
+ currency: {
47
+ type: 'string',
48
+ enum: [
49
+ 'AED',
50
+ 'ALL',
51
+ 'AMD',
52
+ 'ANG',
53
+ 'AOA',
54
+ 'ARS',
55
+ 'AUD',
56
+ 'AWG',
57
+ 'AZN',
58
+ 'BAM',
59
+ 'BBD',
60
+ 'BDT',
61
+ 'BGN',
62
+ 'BHD',
63
+ 'BIF',
64
+ 'BMD',
65
+ 'BND',
66
+ 'BOB',
67
+ 'BRL',
68
+ 'BSD',
69
+ 'BWP',
70
+ 'BYN',
71
+ 'BZD',
72
+ 'CAD',
73
+ 'CHF',
74
+ 'CLP',
75
+ 'CNY',
76
+ 'COP',
77
+ 'CRC',
78
+ 'CUP',
79
+ 'CVE',
80
+ 'CZK',
81
+ 'DJF',
82
+ 'DKK',
83
+ 'DOP',
84
+ 'DZD',
85
+ 'EGP',
86
+ 'ETB',
87
+ 'EUR',
88
+ 'FJD',
89
+ 'FKP',
90
+ 'GBP',
91
+ 'GEL',
92
+ 'GHS',
93
+ 'GIP',
94
+ 'GMD',
95
+ 'GNF',
96
+ 'GTQ',
97
+ 'GYD',
98
+ 'HKD',
99
+ 'HNL',
100
+ 'HRK',
101
+ 'HTG',
102
+ 'HUF',
103
+ 'IDR',
104
+ 'ILS',
105
+ 'INR',
106
+ 'IQD',
107
+ 'JMD',
108
+ 'JOD',
109
+ 'JPY',
110
+ 'KES',
111
+ 'KGS',
112
+ 'KHR',
113
+ 'KMF',
114
+ 'KRW',
115
+ 'KWD',
116
+ 'KYD',
117
+ 'KZT',
118
+ 'LAK',
119
+ 'LBP',
120
+ 'LKR',
121
+ 'LRD',
122
+ 'LSL',
123
+ 'LYD',
124
+ 'MAD',
125
+ 'MDL',
126
+ 'MGA',
127
+ 'MKD',
128
+ 'MMK',
129
+ 'MNT',
130
+ 'MOP',
131
+ 'MRU',
132
+ 'MUR',
133
+ 'MVR',
134
+ 'MWK',
135
+ 'MXN',
136
+ 'MYR',
137
+ 'MZN',
138
+ 'NAD',
139
+ 'NGN',
140
+ 'NIO',
141
+ 'NOK',
142
+ 'NPR',
143
+ 'NZD',
144
+ 'OMR',
145
+ 'PAB',
146
+ 'PEN',
147
+ 'PGK',
148
+ 'PHP',
149
+ 'PKR',
150
+ 'PLN',
151
+ 'PYG',
152
+ 'QAR',
153
+ 'RON',
154
+ 'RSD',
155
+ 'RUB',
156
+ 'RWF',
157
+ 'SAR',
158
+ 'SBD',
159
+ 'SCR',
160
+ 'SEK',
161
+ 'SGD',
162
+ 'SHP',
163
+ 'SLE',
164
+ 'SLL',
165
+ 'SOS',
166
+ 'SRD',
167
+ 'SSP',
168
+ 'STN',
169
+ 'SVC',
170
+ 'SZL',
171
+ 'THB',
172
+ 'TND',
173
+ 'TOP',
174
+ 'TRY',
175
+ 'TTD',
176
+ 'TWD',
177
+ 'TZS',
178
+ 'UAH',
179
+ 'UGX',
180
+ 'USD',
181
+ 'UYU',
182
+ 'UZS',
183
+ 'VES',
184
+ 'VND',
185
+ 'VUV',
186
+ 'WST',
187
+ 'XAF',
188
+ 'XCD',
189
+ 'XOF',
190
+ 'XPF',
191
+ 'YER',
192
+ 'ZAR',
193
+ 'ZMW',
194
+ ],
195
+ },
196
+ },
197
+ },
198
+ annotations: {
199
+ readOnlyHint: true,
200
+ },
201
+ };
202
+
203
+ export const handler = async (client: DodoPayments, args: Record<string, unknown> | undefined) => {
204
+ const { customer_id, jq_filter, ...body } = args as any;
205
+ const response = await client.customers.wallets.ledgerEntries.list(customer_id, body).asResponse();
206
+ return asTextContentResult(await maybeFilter(jq_filter, await response.json()));
207
+ };
208
+
209
+ export default { metadata, tool, handler };
@@ -0,0 +1,47 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { maybeFilter } from 'dodopayments-mcp/filtering';
4
+ import { Metadata, asTextContentResult } from 'dodopayments-mcp/tools/types';
5
+
6
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
+ import DodoPayments from 'dodopayments';
8
+
9
+ export const metadata: Metadata = {
10
+ resource: 'customers.wallets',
11
+ operation: 'read',
12
+ tags: [],
13
+ httpMethod: 'get',
14
+ httpPath: '/customers/{customer_id}/wallets',
15
+ operationId: 'get_customer_wallets',
16
+ };
17
+
18
+ export const tool: Tool = {
19
+ name: 'list_customers_wallets',
20
+ description:
21
+ "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\n\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n items: {\n type: 'array',\n items: {\n $ref: '#/$defs/customer_wallet'\n }\n },\n total_balance_usd: {\n type: 'integer',\n description: 'Sum of all wallet balances converted to USD (in smallest unit)'\n }\n },\n required: [ 'items',\n 'total_balance_usd'\n ],\n $defs: {\n customer_wallet: {\n type: 'object',\n properties: {\n balance: {\n type: 'integer'\n },\n created_at: {\n type: 'string',\n format: 'date-time'\n },\n currency: {\n $ref: '#/$defs/currency'\n },\n customer_id: {\n type: 'string'\n },\n updated_at: {\n type: 'string',\n format: 'date-time'\n }\n },\n required: [ 'balance',\n 'created_at',\n 'currency',\n 'customer_id',\n 'updated_at'\n ]\n },\n currency: {\n type: 'string',\n enum: [ 'AED',\n 'ALL',\n 'AMD',\n 'ANG',\n 'AOA',\n 'ARS',\n 'AUD',\n 'AWG',\n 'AZN',\n 'BAM',\n 'BBD',\n 'BDT',\n 'BGN',\n 'BHD',\n 'BIF',\n 'BMD',\n 'BND',\n 'BOB',\n 'BRL',\n 'BSD',\n 'BWP',\n 'BYN',\n 'BZD',\n 'CAD',\n 'CHF',\n 'CLP',\n 'CNY',\n 'COP',\n 'CRC',\n 'CUP',\n 'CVE',\n 'CZK',\n 'DJF',\n 'DKK',\n 'DOP',\n 'DZD',\n 'EGP',\n 'ETB',\n 'EUR',\n 'FJD',\n 'FKP',\n 'GBP',\n 'GEL',\n 'GHS',\n 'GIP',\n 'GMD',\n 'GNF',\n 'GTQ',\n 'GYD',\n 'HKD',\n 'HNL',\n 'HRK',\n 'HTG',\n 'HUF',\n 'IDR',\n 'ILS',\n 'INR',\n 'IQD',\n 'JMD',\n 'JOD',\n 'JPY',\n 'KES',\n 'KGS',\n 'KHR',\n 'KMF',\n 'KRW',\n 'KWD',\n 'KYD',\n 'KZT',\n 'LAK',\n 'LBP',\n 'LKR',\n 'LRD',\n 'LSL',\n 'LYD',\n 'MAD',\n 'MDL',\n 'MGA',\n 'MKD',\n 'MMK',\n 'MNT',\n 'MOP',\n 'MRU',\n 'MUR',\n 'MVR',\n 'MWK',\n 'MXN',\n 'MYR',\n 'MZN',\n 'NAD',\n 'NGN',\n 'NIO',\n 'NOK',\n 'NPR',\n 'NZD',\n 'OMR',\n 'PAB',\n 'PEN',\n 'PGK',\n 'PHP',\n 'PKR',\n 'PLN',\n 'PYG',\n 'QAR',\n 'RON',\n 'RSD',\n 'RUB',\n 'RWF',\n 'SAR',\n 'SBD',\n 'SCR',\n 'SEK',\n 'SGD',\n 'SHP',\n 'SLE',\n 'SLL',\n 'SOS',\n 'SRD',\n 'SSP',\n 'STN',\n 'SVC',\n 'SZL',\n 'THB',\n 'TND',\n 'TOP',\n 'TRY',\n 'TTD',\n 'TWD',\n 'TZS',\n 'UAH',\n 'UGX',\n 'USD',\n 'UYU',\n 'UZS',\n 'VES',\n 'VND',\n 'VUV',\n 'WST',\n 'XAF',\n 'XCD',\n 'XOF',\n 'XPF',\n 'YER',\n 'ZAR',\n 'ZMW'\n ]\n }\n }\n}\n```",
22
+ inputSchema: {
23
+ type: 'object',
24
+ properties: {
25
+ customer_id: {
26
+ type: 'string',
27
+ },
28
+ jq_filter: {
29
+ type: 'string',
30
+ title: 'jq Filter',
31
+ description:
32
+ 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
33
+ },
34
+ },
35
+ required: ['customer_id'],
36
+ },
37
+ annotations: {
38
+ readOnlyHint: true,
39
+ },
40
+ };
41
+
42
+ export const handler = async (client: DodoPayments, args: Record<string, unknown> | undefined) => {
43
+ const { customer_id, jq_filter, ...body } = args as any;
44
+ return asTextContentResult(await maybeFilter(jq_filter, await client.customers.wallets.list(customer_id)));
45
+ };
46
+
47
+ export default { metadata, tool, handler };
@@ -32,6 +32,9 @@ import retrieve_customers from './customers/retrieve-customers';
32
32
  import update_customers from './customers/update-customers';
33
33
  import list_customers from './customers/list-customers';
34
34
  import create_customers_customer_portal from './customers/customer-portal/create-customers-customer-portal';
35
+ import list_customers_wallets from './customers/wallets/list-customers-wallets';
36
+ import create_wallets_customers_ledger_entries from './customers/wallets/ledger-entries/create-wallets-customers-ledger-entries';
37
+ import list_wallets_customers_ledger_entries from './customers/wallets/ledger-entries/list-wallets-customers-ledger-entries';
35
38
  import create_refunds from './refunds/create-refunds';
36
39
  import retrieve_refunds from './refunds/retrieve-refunds';
37
40
  import list_refunds from './refunds/list-refunds';
@@ -113,6 +116,9 @@ addEndpoint(retrieve_customers);
113
116
  addEndpoint(update_customers);
114
117
  addEndpoint(list_customers);
115
118
  addEndpoint(create_customers_customer_portal);
119
+ addEndpoint(list_customers_wallets);
120
+ addEndpoint(create_wallets_customers_ledger_entries);
121
+ addEndpoint(list_wallets_customers_ledger_entries);
116
122
  addEndpoint(create_refunds);
117
123
  addEndpoint(retrieve_refunds);
118
124
  addEndpoint(list_refunds);
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
18
18
  export const tool: Tool = {
19
19
  name: 'activate_licenses',
20
20
  description:
21
- "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/license_key_instance',\n $defs: {\n license_key_instance: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n business_id: {\n type: 'string'\n },\n created_at: {\n type: 'string',\n format: 'date-time'\n },\n license_key_id: {\n type: 'string'\n },\n name: {\n type: 'string'\n }\n },\n required: [ 'id',\n 'business_id',\n 'created_at',\n 'license_key_id',\n 'name'\n ]\n }\n }\n}\n```",
21
+ "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\n\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description: 'License key instance ID'\n },\n business_id: {\n type: 'string',\n description: 'Business ID'\n },\n created_at: {\n type: 'string',\n description: 'Creation timestamp',\n format: 'date-time'\n },\n customer: {\n $ref: '#/$defs/customer_limited_details'\n },\n license_key_id: {\n type: 'string',\n description: 'Associated license key ID'\n },\n name: {\n type: 'string',\n description: 'Instance name'\n },\n product: {\n type: 'object',\n description: 'Related product info. Present if the license key is tied to a product.',\n properties: {\n product_id: {\n type: 'string',\n description: 'Unique identifier for the product.'\n },\n name: {\n type: 'string',\n description: 'Name of the product, if set by the merchant.'\n }\n },\n required: [ 'product_id'\n ]\n }\n },\n required: [ 'id',\n 'business_id',\n 'created_at',\n 'customer',\n 'license_key_id',\n 'name',\n 'product'\n ],\n $defs: {\n customer_limited_details: {\n type: 'object',\n properties: {\n customer_id: {\n type: 'string',\n description: 'Unique identifier for the customer'\n },\n email: {\n type: 'string',\n description: 'Email address of the customer'\n },\n name: {\n type: 'string',\n description: 'Full name of the customer'\n }\n },\n required: [ 'customer_id',\n 'email',\n 'name'\n ]\n }\n }\n}\n```",
22
22
  inputSchema: {
23
23
  type: 'object',
24
24
  properties: {
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
18
18
  export const tool: Tool = {
19
19
  name: 'create_refunds',
20
20
  description:
21
- "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/refund',\n $defs: {\n refund: {\n type: 'object',\n properties: {\n business_id: {\n type: 'string',\n description: 'The unique identifier of the business issuing the refund.'\n },\n created_at: {\n type: 'string',\n description: 'The timestamp of when the refund was created in UTC.',\n format: 'date-time'\n },\n is_partial: {\n type: 'boolean',\n description: 'If true the refund is a partial refund'\n },\n payment_id: {\n type: 'string',\n description: 'The unique identifier of the payment associated with the refund.'\n },\n refund_id: {\n type: 'string',\n description: 'The unique identifier of the refund.'\n },\n status: {\n $ref: '#/$defs/refund_status'\n },\n amount: {\n type: 'integer',\n description: 'The refunded amount.'\n },\n currency: {\n $ref: '#/$defs/currency'\n },\n reason: {\n type: 'string',\n description: 'The reason provided for the refund, if any. Optional.'\n }\n },\n required: [ 'business_id',\n 'created_at',\n 'is_partial',\n 'payment_id',\n 'refund_id',\n 'status'\n ]\n },\n refund_status: {\n type: 'string',\n enum: [ 'succeeded',\n 'failed',\n 'pending',\n 'review'\n ]\n },\n currency: {\n type: 'string',\n enum: [ 'AED',\n 'ALL',\n 'AMD',\n 'ANG',\n 'AOA',\n 'ARS',\n 'AUD',\n 'AWG',\n 'AZN',\n 'BAM',\n 'BBD',\n 'BDT',\n 'BGN',\n 'BHD',\n 'BIF',\n 'BMD',\n 'BND',\n 'BOB',\n 'BRL',\n 'BSD',\n 'BWP',\n 'BYN',\n 'BZD',\n 'CAD',\n 'CHF',\n 'CLP',\n 'CNY',\n 'COP',\n 'CRC',\n 'CUP',\n 'CVE',\n 'CZK',\n 'DJF',\n 'DKK',\n 'DOP',\n 'DZD',\n 'EGP',\n 'ETB',\n 'EUR',\n 'FJD',\n 'FKP',\n 'GBP',\n 'GEL',\n 'GHS',\n 'GIP',\n 'GMD',\n 'GNF',\n 'GTQ',\n 'GYD',\n 'HKD',\n 'HNL',\n 'HRK',\n 'HTG',\n 'HUF',\n 'IDR',\n 'ILS',\n 'INR',\n 'IQD',\n 'JMD',\n 'JOD',\n 'JPY',\n 'KES',\n 'KGS',\n 'KHR',\n 'KMF',\n 'KRW',\n 'KWD',\n 'KYD',\n 'KZT',\n 'LAK',\n 'LBP',\n 'LKR',\n 'LRD',\n 'LSL',\n 'LYD',\n 'MAD',\n 'MDL',\n 'MGA',\n 'MKD',\n 'MMK',\n 'MNT',\n 'MOP',\n 'MRU',\n 'MUR',\n 'MVR',\n 'MWK',\n 'MXN',\n 'MYR',\n 'MZN',\n 'NAD',\n 'NGN',\n 'NIO',\n 'NOK',\n 'NPR',\n 'NZD',\n 'OMR',\n 'PAB',\n 'PEN',\n 'PGK',\n 'PHP',\n 'PKR',\n 'PLN',\n 'PYG',\n 'QAR',\n 'RON',\n 'RSD',\n 'RUB',\n 'RWF',\n 'SAR',\n 'SBD',\n 'SCR',\n 'SEK',\n 'SGD',\n 'SHP',\n 'SLE',\n 'SLL',\n 'SOS',\n 'SRD',\n 'SSP',\n 'STN',\n 'SVC',\n 'SZL',\n 'THB',\n 'TND',\n 'TOP',\n 'TRY',\n 'TTD',\n 'TWD',\n 'TZS',\n 'UAH',\n 'UGX',\n 'USD',\n 'UYU',\n 'UZS',\n 'VES',\n 'VND',\n 'VUV',\n 'WST',\n 'XAF',\n 'XCD',\n 'XOF',\n 'XPF',\n 'YER',\n 'ZAR',\n 'ZMW'\n ]\n }\n }\n}\n```",
21
+ "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/refund',\n $defs: {\n refund: {\n type: 'object',\n properties: {\n business_id: {\n type: 'string',\n description: 'The unique identifier of the business issuing the refund.'\n },\n created_at: {\n type: 'string',\n description: 'The timestamp of when the refund was created in UTC.',\n format: 'date-time'\n },\n customer: {\n $ref: '#/$defs/customer_limited_details'\n },\n is_partial: {\n type: 'boolean',\n description: 'If true the refund is a partial refund'\n },\n payment_id: {\n type: 'string',\n description: 'The unique identifier of the payment associated with the refund.'\n },\n refund_id: {\n type: 'string',\n description: 'The unique identifier of the refund.'\n },\n status: {\n $ref: '#/$defs/refund_status'\n },\n amount: {\n type: 'integer',\n description: 'The refunded amount.'\n },\n currency: {\n $ref: '#/$defs/currency'\n },\n reason: {\n type: 'string',\n description: 'The reason provided for the refund, if any. Optional.'\n }\n },\n required: [ 'business_id',\n 'created_at',\n 'customer',\n 'is_partial',\n 'payment_id',\n 'refund_id',\n 'status'\n ]\n },\n customer_limited_details: {\n type: 'object',\n properties: {\n customer_id: {\n type: 'string',\n description: 'Unique identifier for the customer'\n },\n email: {\n type: 'string',\n description: 'Email address of the customer'\n },\n name: {\n type: 'string',\n description: 'Full name of the customer'\n }\n },\n required: [ 'customer_id',\n 'email',\n 'name'\n ]\n },\n refund_status: {\n type: 'string',\n enum: [ 'succeeded',\n 'failed',\n 'pending',\n 'review'\n ]\n },\n currency: {\n type: 'string',\n enum: [ 'AED',\n 'ALL',\n 'AMD',\n 'ANG',\n 'AOA',\n 'ARS',\n 'AUD',\n 'AWG',\n 'AZN',\n 'BAM',\n 'BBD',\n 'BDT',\n 'BGN',\n 'BHD',\n 'BIF',\n 'BMD',\n 'BND',\n 'BOB',\n 'BRL',\n 'BSD',\n 'BWP',\n 'BYN',\n 'BZD',\n 'CAD',\n 'CHF',\n 'CLP',\n 'CNY',\n 'COP',\n 'CRC',\n 'CUP',\n 'CVE',\n 'CZK',\n 'DJF',\n 'DKK',\n 'DOP',\n 'DZD',\n 'EGP',\n 'ETB',\n 'EUR',\n 'FJD',\n 'FKP',\n 'GBP',\n 'GEL',\n 'GHS',\n 'GIP',\n 'GMD',\n 'GNF',\n 'GTQ',\n 'GYD',\n 'HKD',\n 'HNL',\n 'HRK',\n 'HTG',\n 'HUF',\n 'IDR',\n 'ILS',\n 'INR',\n 'IQD',\n 'JMD',\n 'JOD',\n 'JPY',\n 'KES',\n 'KGS',\n 'KHR',\n 'KMF',\n 'KRW',\n 'KWD',\n 'KYD',\n 'KZT',\n 'LAK',\n 'LBP',\n 'LKR',\n 'LRD',\n 'LSL',\n 'LYD',\n 'MAD',\n 'MDL',\n 'MGA',\n 'MKD',\n 'MMK',\n 'MNT',\n 'MOP',\n 'MRU',\n 'MUR',\n 'MVR',\n 'MWK',\n 'MXN',\n 'MYR',\n 'MZN',\n 'NAD',\n 'NGN',\n 'NIO',\n 'NOK',\n 'NPR',\n 'NZD',\n 'OMR',\n 'PAB',\n 'PEN',\n 'PGK',\n 'PHP',\n 'PKR',\n 'PLN',\n 'PYG',\n 'QAR',\n 'RON',\n 'RSD',\n 'RUB',\n 'RWF',\n 'SAR',\n 'SBD',\n 'SCR',\n 'SEK',\n 'SGD',\n 'SHP',\n 'SLE',\n 'SLL',\n 'SOS',\n 'SRD',\n 'SSP',\n 'STN',\n 'SVC',\n 'SZL',\n 'THB',\n 'TND',\n 'TOP',\n 'TRY',\n 'TTD',\n 'TWD',\n 'TZS',\n 'UAH',\n 'UGX',\n 'USD',\n 'UYU',\n 'UZS',\n 'VES',\n 'VND',\n 'VUV',\n 'WST',\n 'XAF',\n 'XCD',\n 'XOF',\n 'XPF',\n 'YER',\n 'ZAR',\n 'ZMW'\n ]\n }\n }\n}\n```",
22
22
  inputSchema: {
23
23
  type: 'object',
24
24
  properties: {