@fiddupay/fiddupay-node 1.0.0 → 2.3.4
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.
- package/README.md +85 -63
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +7 -2
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +16 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +36 -6
- package/dist/index.js.map +1 -1
- package/dist/resources/analytics.js +3 -3
- package/dist/resources/analytics.js.map +1 -1
- package/dist/resources/balances.d.ts +23 -0
- package/dist/resources/balances.d.ts.map +1 -0
- package/dist/resources/balances.js +54 -0
- package/dist/resources/balances.js.map +1 -0
- package/dist/resources/contact.d.ts +20 -0
- package/dist/resources/contact.d.ts.map +1 -0
- package/dist/resources/contact.js +17 -0
- package/dist/resources/contact.js.map +1 -0
- package/dist/resources/merchants.d.ts +91 -5
- package/dist/resources/merchants.d.ts.map +1 -1
- package/dist/resources/merchants.js +67 -9
- package/dist/resources/merchants.js.map +1 -1
- package/dist/resources/payments.d.ts +24 -1
- package/dist/resources/payments.d.ts.map +1 -1
- package/dist/resources/payments.js +91 -12
- package/dist/resources/payments.js.map +1 -1
- package/dist/resources/refunds.d.ts +4 -0
- package/dist/resources/refunds.d.ts.map +1 -1
- package/dist/resources/refunds.js +11 -2
- package/dist/resources/refunds.js.map +1 -1
- package/dist/resources/sandbox.d.ts +17 -0
- package/dist/resources/sandbox.d.ts.map +1 -0
- package/dist/resources/sandbox.js +22 -0
- package/dist/resources/sandbox.js.map +1 -0
- package/dist/resources/security.d.ts +42 -0
- package/dist/resources/security.d.ts.map +1 -0
- package/dist/resources/security.js +58 -0
- package/dist/resources/security.js.map +1 -0
- package/dist/resources/wallets.d.ts +52 -0
- package/dist/resources/wallets.d.ts.map +1 -0
- package/dist/resources/wallets.js +64 -0
- package/dist/resources/wallets.js.map +1 -0
- package/dist/resources/withdrawals.d.ts +27 -0
- package/dist/resources/withdrawals.d.ts.map +1 -0
- package/dist/resources/withdrawals.js +50 -0
- package/dist/resources/withdrawals.js.map +1 -0
- package/dist/types/index.d.ts +216 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Contact = void 0;
|
|
4
|
+
class Contact {
|
|
5
|
+
constructor(client) {
|
|
6
|
+
this.client = client;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Submit contact form (public endpoint - no auth required)
|
|
10
|
+
*/
|
|
11
|
+
async submit(data, options) {
|
|
12
|
+
// Note: This is a public endpoint but included in SDK for convenience
|
|
13
|
+
return this.client.request('POST', '/api/v1/contact', data);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.Contact = Contact;
|
|
17
|
+
//# sourceMappingURL=contact.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact.js","sourceRoot":"","sources":["../../src/resources/contact.ts"],"names":[],"mappings":";;;AAGA,MAAa,OAAO;IAClB,YAAoB,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAE1C;;OAEG;IACH,KAAK,CAAC,MAAM,CAAC,IAKZ,EAAE,OAAwB;QAKzB,sEAAsE;QACtE,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,iBAAiB,EAAE,IAAI,CAAC,CAAC;IAC9D,CAAC;CACF;AAnBD,0BAmBC"}
|
|
@@ -3,18 +3,77 @@ import { Merchant, RequestOptions } from '../types';
|
|
|
3
3
|
export declare class Merchants {
|
|
4
4
|
private client;
|
|
5
5
|
constructor(client: HttpClient);
|
|
6
|
+
/**
|
|
7
|
+
* Register new merchant
|
|
8
|
+
*/
|
|
9
|
+
register(data: {
|
|
10
|
+
email: string;
|
|
11
|
+
business_name: string;
|
|
12
|
+
password: string;
|
|
13
|
+
}): Promise<{
|
|
14
|
+
user: any;
|
|
15
|
+
api_key: string;
|
|
16
|
+
}>;
|
|
6
17
|
/**
|
|
7
18
|
* Get current merchant profile
|
|
8
19
|
*/
|
|
9
20
|
retrieve(options?: RequestOptions): Promise<Merchant>;
|
|
10
21
|
/**
|
|
11
|
-
*
|
|
22
|
+
* Set wallet address for a cryptocurrency
|
|
12
23
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
24
|
+
setWallet(data: {
|
|
25
|
+
crypto_type: string;
|
|
26
|
+
address: string;
|
|
15
27
|
}, options?: RequestOptions): Promise<{
|
|
16
28
|
message: string;
|
|
29
|
+
}>;
|
|
30
|
+
/**
|
|
31
|
+
* Switch environment (sandbox/production)
|
|
32
|
+
*/
|
|
33
|
+
switchEnvironment(data: {
|
|
34
|
+
environment: 'sandbox' | 'production';
|
|
35
|
+
}, options?: RequestOptions): Promise<{
|
|
36
|
+
message: string;
|
|
37
|
+
environment: string;
|
|
38
|
+
}>;
|
|
39
|
+
/**
|
|
40
|
+
* Generate new API key
|
|
41
|
+
*/
|
|
42
|
+
generateApiKey(data?: {
|
|
43
|
+
environment?: 'sandbox' | 'production';
|
|
44
|
+
}, options?: RequestOptions): Promise<{
|
|
45
|
+
api_key: string;
|
|
46
|
+
environment: string;
|
|
47
|
+
}>;
|
|
48
|
+
/**
|
|
49
|
+
* Rotate existing API key
|
|
50
|
+
*/
|
|
51
|
+
rotateApiKey(data?: {
|
|
52
|
+
environment?: 'sandbox' | 'production';
|
|
53
|
+
}, options?: RequestOptions): Promise<{
|
|
54
|
+
api_key: string;
|
|
55
|
+
}>;
|
|
56
|
+
/**
|
|
57
|
+
* Set webhook URL
|
|
58
|
+
*/
|
|
59
|
+
setWebhook(data: {
|
|
17
60
|
webhook_url: string;
|
|
61
|
+
}, options?: RequestOptions): Promise<{
|
|
62
|
+
message: string;
|
|
63
|
+
}>;
|
|
64
|
+
/**
|
|
65
|
+
* Set IP whitelist
|
|
66
|
+
*/
|
|
67
|
+
setIpWhitelist(data: {
|
|
68
|
+
ip_addresses: string[];
|
|
69
|
+
}, options?: RequestOptions): Promise<{
|
|
70
|
+
message: string;
|
|
71
|
+
}>;
|
|
72
|
+
/**
|
|
73
|
+
* Get IP whitelist
|
|
74
|
+
*/
|
|
75
|
+
getIpWhitelist(options?: RequestOptions): Promise<{
|
|
76
|
+
ip_addresses: string[];
|
|
18
77
|
}>;
|
|
19
78
|
/**
|
|
20
79
|
* Get merchant balance
|
|
@@ -38,10 +97,37 @@ export declare class Merchants {
|
|
|
38
97
|
wallets: Record<string, string>;
|
|
39
98
|
}>;
|
|
40
99
|
/**
|
|
41
|
-
*
|
|
100
|
+
* Get balance history
|
|
101
|
+
*/
|
|
102
|
+
getBalanceHistory(options?: RequestOptions): Promise<{
|
|
103
|
+
history: Array<{
|
|
104
|
+
date: string;
|
|
105
|
+
balance_usd: string;
|
|
106
|
+
change_usd: string;
|
|
107
|
+
change_percentage: number;
|
|
108
|
+
}>;
|
|
109
|
+
}>;
|
|
110
|
+
/**
|
|
111
|
+
* Login merchant
|
|
42
112
|
*/
|
|
43
|
-
|
|
113
|
+
login(data: {
|
|
114
|
+
email: string;
|
|
115
|
+
password: string;
|
|
116
|
+
}): Promise<{
|
|
117
|
+
user: any;
|
|
44
118
|
api_key: string;
|
|
45
119
|
}>;
|
|
120
|
+
/**
|
|
121
|
+
* Get audit logs
|
|
122
|
+
*/
|
|
123
|
+
getAuditLogs(options?: RequestOptions): Promise<{
|
|
124
|
+
logs: Array<{
|
|
125
|
+
id: string;
|
|
126
|
+
action: string;
|
|
127
|
+
timestamp: string;
|
|
128
|
+
ip_address: string;
|
|
129
|
+
user_agent: string;
|
|
130
|
+
}>;
|
|
131
|
+
}>;
|
|
46
132
|
}
|
|
47
133
|
//# sourceMappingURL=merchants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merchants.d.ts","sourceRoot":"","sources":["../../src/resources/merchants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,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,EAAE,MAAM,CAAC;KAC3B,CAAC;IAIF;;OAEG;IACG,UAAU,CACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,CAAC;IAIhE;;OAEG;IACG,iBAAiB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC;QACzD,OAAO,EAAE,KAAK,CAAC;YACb,IAAI,EAAE,MAAM,CAAC;YACb,WAAW,EAAE,MAAM,CAAC;YACpB,UAAU,EAAE,MAAM,CAAC;YACnB,iBAAiB,EAAE,MAAM,CAAC;SAC3B,CAAC,CAAC;KACJ,CAAC;IAIF;;OAEG;IACG,KAAK,CAAC,IAAI,EAAE;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;KAClB,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,GAAG,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAI3C;;OAEG;IACG,YAAY,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC;QACpD,IAAI,EAAE,KAAK,CAAC;YACV,EAAE,EAAE,MAAM,CAAC;YACX,MAAM,EAAE,MAAM,CAAC;YACf,SAAS,EAAE,MAAM,CAAC;YAClB,UAAU,EAAE,MAAM,CAAC;YACnB,UAAU,EAAE,MAAM,CAAC;SACpB,CAAC,CAAC;KACJ,CAAC;CAGH"}
|
|
@@ -5,35 +5,93 @@ class Merchants {
|
|
|
5
5
|
constructor(client) {
|
|
6
6
|
this.client = client;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Register new merchant
|
|
10
|
+
*/
|
|
11
|
+
async register(data) {
|
|
12
|
+
return this.client.request('POST', '/api/v1/merchants/register', data);
|
|
13
|
+
}
|
|
8
14
|
/**
|
|
9
15
|
* Get current merchant profile
|
|
10
16
|
*/
|
|
11
17
|
async retrieve(options) {
|
|
12
|
-
return this.client.
|
|
18
|
+
return this.client.request('GET', '/api/v1/merchants/profile');
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Set wallet address for a cryptocurrency
|
|
22
|
+
*/
|
|
23
|
+
async setWallet(data, options) {
|
|
24
|
+
return this.client.request('PUT', '/api/v1/merchants/wallets', data);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Switch environment (sandbox/production)
|
|
28
|
+
*/
|
|
29
|
+
async switchEnvironment(data, options) {
|
|
30
|
+
const requestData = { to_live: data.environment === 'production' };
|
|
31
|
+
return this.client.request('POST', '/api/v1/merchants/environment/switch', requestData);
|
|
13
32
|
}
|
|
14
33
|
/**
|
|
15
|
-
*
|
|
34
|
+
* Generate new API key
|
|
16
35
|
*/
|
|
17
|
-
async
|
|
18
|
-
|
|
36
|
+
async generateApiKey(data, options) {
|
|
37
|
+
const requestData = data ? { is_live: data.environment === 'production' } : { is_live: false };
|
|
38
|
+
return this.client.request('POST', '/api/v1/merchants/api-keys/generate', requestData);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Rotate existing API key
|
|
42
|
+
*/
|
|
43
|
+
async rotateApiKey(data, options) {
|
|
44
|
+
const requestData = data ? { is_live: data.environment === 'production' } : { is_live: false };
|
|
45
|
+
return this.client.request('POST', '/api/v1/merchants/api-keys/rotate', requestData);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Set webhook URL
|
|
49
|
+
*/
|
|
50
|
+
async setWebhook(data, options) {
|
|
51
|
+
const requestData = { url: data.webhook_url };
|
|
52
|
+
return this.client.request('PUT', '/api/v1/merchants/webhook', requestData);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Set IP whitelist
|
|
56
|
+
*/
|
|
57
|
+
async setIpWhitelist(data, options) {
|
|
58
|
+
return this.client.request('PUT', '/api/v1/merchants/ip-whitelist', data);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Get IP whitelist
|
|
62
|
+
*/
|
|
63
|
+
async getIpWhitelist(options) {
|
|
64
|
+
return this.client.request('GET', '/api/v1/merchants/ip-whitelist');
|
|
19
65
|
}
|
|
20
66
|
/**
|
|
21
67
|
* Get merchant balance
|
|
22
68
|
*/
|
|
23
69
|
async getBalance(options) {
|
|
24
|
-
return this.client.
|
|
70
|
+
return this.client.request('GET', '/api/v1/merchants/balance');
|
|
25
71
|
}
|
|
26
72
|
/**
|
|
27
73
|
* Set wallet addresses for automatic forwarding
|
|
28
74
|
*/
|
|
29
75
|
async setWallets(wallets, options) {
|
|
30
|
-
return this.client.
|
|
76
|
+
return this.client.request('PUT', '/api/v1/merchants/wallets', { wallets });
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Get balance history
|
|
80
|
+
*/
|
|
81
|
+
async getBalanceHistory(options) {
|
|
82
|
+
return this.client.request('GET', '/api/v1/merchants/balance/history');
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Login merchant
|
|
86
|
+
*/
|
|
87
|
+
async login(data) {
|
|
88
|
+
return this.client.request('POST', '/api/v1/merchants/login', data);
|
|
31
89
|
}
|
|
32
90
|
/**
|
|
33
|
-
*
|
|
91
|
+
* Get audit logs
|
|
34
92
|
*/
|
|
35
|
-
async
|
|
36
|
-
return this.client.
|
|
93
|
+
async getAuditLogs(options) {
|
|
94
|
+
return this.client.request('GET', '/api/v1/audit-logs');
|
|
37
95
|
}
|
|
38
96
|
}
|
|
39
97
|
exports.Merchants = Merchants;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merchants.js","sourceRoot":"","sources":["../../src/resources/merchants.ts"],"names":[],"mappings":";;;AAGA,MAAa,SAAS;IACpB,YAAoB,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAE1C;;OAEG;IACH,KAAK,CAAC,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IACH,KAAK,CAAC,iBAAiB,CAAC,OAAwB;QAQ9C,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,mCAAmC,CAAC,CAAC;IACzE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,KAAK,CAAC,IAGX;QACC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,yBAAyB,EAAE,IAAI,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,YAAY,CAAC,OAAwB;QASzC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,oBAAoB,CAAC,CAAC;IAC1D,CAAC;CACF;AAxJD,8BAwJC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpClient } from '../client';
|
|
2
|
-
import { CreatePaymentRequest, Payment, ListPaymentsRequest, ListPaymentsResponse, RequestOptions } from '../types';
|
|
2
|
+
import { CreatePaymentRequest, CreateAddressOnlyPaymentRequest, Payment, AddressOnlyPayment, ListPaymentsRequest, ListPaymentsResponse, UpdateFeeSettingRequest, FeeSettingResponse, UpdateFeeSettingResponse, RequestOptions } from '../types';
|
|
3
3
|
export declare class Payments {
|
|
4
4
|
private client;
|
|
5
5
|
constructor(client: HttpClient);
|
|
@@ -11,6 +11,12 @@ export declare class Payments {
|
|
|
11
11
|
* Retrieve a payment by ID
|
|
12
12
|
*/
|
|
13
13
|
retrieve(paymentId: string, options?: RequestOptions): Promise<Payment>;
|
|
14
|
+
/**
|
|
15
|
+
* Verify a payment with transaction hash
|
|
16
|
+
*/
|
|
17
|
+
verify(paymentId: string, data: {
|
|
18
|
+
transaction_hash: string;
|
|
19
|
+
}, options?: RequestOptions): Promise<any>;
|
|
14
20
|
/**
|
|
15
21
|
* List payments with optional filters
|
|
16
22
|
*/
|
|
@@ -19,6 +25,23 @@ export declare class Payments {
|
|
|
19
25
|
* Cancel a pending payment
|
|
20
26
|
*/
|
|
21
27
|
cancel(paymentId: string, options?: RequestOptions): Promise<Payment>;
|
|
28
|
+
/**
|
|
29
|
+
* Create an address-only payment
|
|
30
|
+
*/
|
|
31
|
+
createAddressOnly(data: CreateAddressOnlyPaymentRequest, options?: RequestOptions): Promise<AddressOnlyPayment>;
|
|
32
|
+
/**
|
|
33
|
+
* Retrieve an address-only payment by ID
|
|
34
|
+
*/
|
|
35
|
+
retrieveAddressOnly(paymentId: string, options?: RequestOptions): Promise<AddressOnlyPayment>;
|
|
36
|
+
/**
|
|
37
|
+
* Update fee setting (customer pays fee vs merchant pays fee)
|
|
38
|
+
*/
|
|
39
|
+
updateFeeSetting(data: UpdateFeeSettingRequest, options?: RequestOptions): Promise<UpdateFeeSettingResponse>;
|
|
40
|
+
/**
|
|
41
|
+
* Get current fee setting
|
|
42
|
+
*/
|
|
43
|
+
getFeeSetting(options?: RequestOptions): Promise<FeeSettingResponse>;
|
|
22
44
|
private validateCreatePayment;
|
|
45
|
+
private validateCreateAddressOnlyPayment;
|
|
23
46
|
}
|
|
24
47
|
//# sourceMappingURL=payments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payments.d.ts","sourceRoot":"","sources":["../../src/resources/payments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EACL,oBAAoB,EACpB,OAAO,EACP,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACf,MAAM,UAAU,CAAC;AAGlB,qBAAa,QAAQ;IACP,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,UAAU;IAEtC;;OAEG;IACG,MAAM,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC;IAKpF;;OAEG;IACG,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC;IAO7E;;OAEG;IACG,IAAI,C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EG;IACG,iBAAiB,CAAC,IAAI,EAAE,+BAA+B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAKrH;;OAEG;IACG,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAOnG;;OAEG;IACG,gBAAgB,CAAC,IAAI,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAOlH;;OAEG;IACG,aAAa,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAI1E,OAAO,CAAC,qBAAqB;IAoD7B,OAAO,CAAC,gCAAgC;CAwDzC"}
|
|
@@ -11,7 +11,7 @@ class Payments {
|
|
|
11
11
|
*/
|
|
12
12
|
async create(data, options) {
|
|
13
13
|
this.validateCreatePayment(data);
|
|
14
|
-
return this.client.
|
|
14
|
+
return this.client.request('POST', '/api/v1/payments', data);
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* Retrieve a payment by ID
|
|
@@ -20,7 +20,16 @@ class Payments {
|
|
|
20
20
|
if (!paymentId) {
|
|
21
21
|
throw new errors_1.FidduPayValidationError('Payment ID is required', 'payment_id');
|
|
22
22
|
}
|
|
23
|
-
return this.client.get(`/payments/${paymentId}`, options);
|
|
23
|
+
return this.client.get(`/api/v1/payments/${paymentId}`, options);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Verify a payment with transaction hash
|
|
27
|
+
*/
|
|
28
|
+
async verify(paymentId, data, options) {
|
|
29
|
+
if (!paymentId) {
|
|
30
|
+
throw new errors_1.FidduPayValidationError('Payment ID is required', 'payment_id');
|
|
31
|
+
}
|
|
32
|
+
return this.client.request('POST', `/api/v1/payments/${paymentId}/verify`, data);
|
|
24
33
|
}
|
|
25
34
|
/**
|
|
26
35
|
* List payments with optional filters
|
|
@@ -36,8 +45,8 @@ class Payments {
|
|
|
36
45
|
if (params?.crypto_type)
|
|
37
46
|
queryParams.append('crypto_type', params.crypto_type);
|
|
38
47
|
const query = queryParams.toString();
|
|
39
|
-
const path = query ? `/payments?${query}` : '/payments';
|
|
40
|
-
return this.client.
|
|
48
|
+
const path = query ? `/api/v1/payments?${query}` : '/api/v1/payments';
|
|
49
|
+
return this.client.request('GET', path);
|
|
41
50
|
}
|
|
42
51
|
/**
|
|
43
52
|
* Cancel a pending payment
|
|
@@ -48,24 +57,90 @@ class Payments {
|
|
|
48
57
|
}
|
|
49
58
|
return this.client.post(`/payments/${paymentId}/cancel`, {}, options);
|
|
50
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Create an address-only payment
|
|
62
|
+
*/
|
|
63
|
+
async createAddressOnly(data, options) {
|
|
64
|
+
this.validateCreateAddressOnlyPayment(data);
|
|
65
|
+
return this.client.post('/address-only-payments', data, options);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Retrieve an address-only payment by ID
|
|
69
|
+
*/
|
|
70
|
+
async retrieveAddressOnly(paymentId, options) {
|
|
71
|
+
if (!paymentId) {
|
|
72
|
+
throw new errors_1.FidduPayValidationError('Payment ID is required', 'payment_id');
|
|
73
|
+
}
|
|
74
|
+
return this.client.get(`/address-only-payments/${paymentId}`, options);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Update fee setting (customer pays fee vs merchant pays fee)
|
|
78
|
+
*/
|
|
79
|
+
async updateFeeSetting(data, options) {
|
|
80
|
+
if (typeof data.customer_pays_fee !== 'boolean') {
|
|
81
|
+
throw new errors_1.FidduPayValidationError('customer_pays_fee must be a boolean', 'customer_pays_fee');
|
|
82
|
+
}
|
|
83
|
+
return this.client.post('/fee-setting', data, options);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Get current fee setting
|
|
87
|
+
*/
|
|
88
|
+
async getFeeSetting(options) {
|
|
89
|
+
return this.client.get('/fee-setting', options);
|
|
90
|
+
}
|
|
51
91
|
validateCreatePayment(data) {
|
|
52
|
-
|
|
53
|
-
|
|
92
|
+
// Validate that either amount or amount_usd is provided, but not both
|
|
93
|
+
if (data.amount && data.amount_usd) {
|
|
94
|
+
throw new errors_1.FidduPayValidationError('Provide either amount or amount_usd, not both', 'amount');
|
|
95
|
+
}
|
|
96
|
+
if (!data.amount && !data.amount_usd) {
|
|
97
|
+
throw new errors_1.FidduPayValidationError('Either amount or amount_usd must be provided', 'amount');
|
|
54
98
|
}
|
|
55
99
|
if (!data.crypto_type) {
|
|
56
100
|
throw new errors_1.FidduPayValidationError('Crypto type is required', 'crypto_type');
|
|
57
101
|
}
|
|
58
|
-
|
|
102
|
+
// Validate the provided amount (either amount or amount_usd)
|
|
103
|
+
const amountValue = data.amount || data.amount_usd;
|
|
104
|
+
const amount = parseFloat(amountValue);
|
|
59
105
|
if (isNaN(amount) || amount <= 0) {
|
|
60
|
-
throw new errors_1.FidduPayValidationError('Amount must be a positive number', 'amount_usd');
|
|
106
|
+
throw new errors_1.FidduPayValidationError('Amount must be a positive number', data.amount ? 'amount' : 'amount_usd');
|
|
61
107
|
}
|
|
62
108
|
if (amount < 0.01) {
|
|
63
|
-
throw new errors_1.FidduPayValidationError('Minimum amount is $0.01', 'amount_usd');
|
|
109
|
+
throw new errors_1.FidduPayValidationError('Minimum amount is $0.01', data.amount ? 'amount' : 'amount_usd');
|
|
110
|
+
}
|
|
111
|
+
// Note: No maximum amount limit - server enforces daily volume limits based on KYC status
|
|
112
|
+
const validCryptoTypes = ['SOL', 'ETH', 'BNB', 'MATIC', 'ARB', 'USDT_ETH', 'USDT_BSC', 'USDT_POLYGON', 'USDT_ARBITRUM', 'USDT_SPL'];
|
|
113
|
+
if (!validCryptoTypes.includes(data.crypto_type)) {
|
|
114
|
+
throw new errors_1.FidduPayValidationError(`Invalid crypto type. Must be one of: ${validCryptoTypes.join(', ')}`, 'crypto_type');
|
|
115
|
+
}
|
|
116
|
+
if (data.expiration_minutes !== undefined) {
|
|
117
|
+
if (data.expiration_minutes < 5 || data.expiration_minutes > 1440) {
|
|
118
|
+
throw new errors_1.FidduPayValidationError('Expiration must be between 5 and 1440 minutes', 'expiration_minutes');
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
if (data.description && data.description.length > 500) {
|
|
122
|
+
throw new errors_1.FidduPayValidationError('Description must be 500 characters or less', 'description');
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
validateCreateAddressOnlyPayment(data) {
|
|
126
|
+
if (!data.requested_amount) {
|
|
127
|
+
throw new errors_1.FidduPayValidationError('Requested amount is required', 'requested_amount');
|
|
128
|
+
}
|
|
129
|
+
if (!data.crypto_type) {
|
|
130
|
+
throw new errors_1.FidduPayValidationError('Crypto type is required', 'crypto_type');
|
|
64
131
|
}
|
|
65
|
-
if (
|
|
66
|
-
throw new errors_1.FidduPayValidationError('
|
|
132
|
+
if (!data.merchant_address) {
|
|
133
|
+
throw new errors_1.FidduPayValidationError('Merchant address is required', 'merchant_address');
|
|
67
134
|
}
|
|
68
|
-
const
|
|
135
|
+
const amount = parseFloat(data.requested_amount);
|
|
136
|
+
if (isNaN(amount) || amount <= 0) {
|
|
137
|
+
throw new errors_1.FidduPayValidationError('Requested amount must be a positive number', 'requested_amount');
|
|
138
|
+
}
|
|
139
|
+
if (amount < 0.01) {
|
|
140
|
+
throw new errors_1.FidduPayValidationError('Minimum amount is $0.01', 'requested_amount');
|
|
141
|
+
}
|
|
142
|
+
// Note: No maximum amount limit - server enforces daily volume limits based on KYC status
|
|
143
|
+
const validCryptoTypes = ['SOL', 'ETH', 'BNB', 'MATIC', 'ARB', 'USDT_ETH', 'USDT_BSC', 'USDT_POLYGON', 'USDT_ARBITRUM', 'USDT_SPL'];
|
|
69
144
|
if (!validCryptoTypes.includes(data.crypto_type)) {
|
|
70
145
|
throw new errors_1.FidduPayValidationError(`Invalid crypto type. Must be one of: ${validCryptoTypes.join(', ')}`, 'crypto_type');
|
|
71
146
|
}
|
|
@@ -77,6 +152,10 @@ class Payments {
|
|
|
77
152
|
if (data.description && data.description.length > 500) {
|
|
78
153
|
throw new errors_1.FidduPayValidationError('Description must be 500 characters or less', 'description');
|
|
79
154
|
}
|
|
155
|
+
// Basic address validation
|
|
156
|
+
if (data.merchant_address.length < 10) {
|
|
157
|
+
throw new errors_1.FidduPayValidationError('Invalid merchant address format', 'merchant_address');
|
|
158
|
+
}
|
|
80
159
|
}
|
|
81
160
|
}
|
|
82
161
|
exports.Payments = Payments;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payments.js","sourceRoot":"","sources":["../../src/resources/payments.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"payments.js","sourceRoot":"","sources":["../../src/resources/payments.ts"],"names":[],"mappings":";;;AAaA,sCAAoD;AAEpD,MAAa,QAAQ;IACnB,YAAoB,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAE1C;;OAEG;IACH,KAAK,CAAC,MAAM,CAAC,IAA0B,EAAE,OAAwB;QAC/D,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;QACjC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAU,MAAM,EAAE,kBAAkB,EAAE,IAAI,CAAC,CAAC;IACxE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,QAAQ,CAAC,SAAiB,EAAE,OAAwB;QACxD,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,gCAAuB,CAAC,wBAAwB,EAAE,YAAY,CAAC,CAAC;QAC5E,CAAC;QACD,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAU,oBAAoB,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CAAC,SAAiB,EAAE,IAE/B,EAAE,OAAwB;QACzB,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,gCAAuB,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AAE,UAAU,CAAC,CAAC;QACpI,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;YACjD,MAAM,IAAI,gCAAuB,CAC/B,wCAAwC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EACrE,aAAa,CACd,CAAC;QACJ,CAAC;QAED,IAAI,IAAI,CAAC,kBAAkB,KAAK,SAAS,EAAE,CAAC;YAC1C,IAAI,IAAI,CAAC,kBAAkB,GAAG,CAAC,IAAI,IAAI,CAAC,kBAAkB,GAAG,IAAI,EAAE,CAAC;gBAClE,MAAM,IAAI,gCAAuB,CAC/B,+CAA+C,EAC/C,oBAAoB,CACrB,CAAC;YACJ,CAAC;QACH,CAAC;QAED,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC;YACtD,MAAM,IAAI,gCAAuB,CAC/B,4CAA4C,EAC5C,aAAa,CACd,CAAC;QACJ,CAAC;QAED,2BAA2B;QAC3B,IAAI,IAAI,CAAC,gBAAgB,CAAC,MAAM,GAAG,EAAE,EAAE,CAAC;YACtC,MAAM,IAAI,gCAAuB,CAC/B,iCAAiC,EACjC,kBAAkB,CACnB,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AA3MD,4BA2MC"}
|
|
@@ -11,6 +11,10 @@ export declare class Refunds {
|
|
|
11
11
|
* Retrieve a refund by ID
|
|
12
12
|
*/
|
|
13
13
|
retrieve(refundId: string, options?: RequestOptions): Promise<Refund>;
|
|
14
|
+
/**
|
|
15
|
+
* Complete a refund
|
|
16
|
+
*/
|
|
17
|
+
complete(refundId: string, options?: RequestOptions): Promise<any>;
|
|
14
18
|
/**
|
|
15
19
|
* List refunds
|
|
16
20
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refunds.d.ts","sourceRoot":"","sources":["../../src/resources/refunds.ts"],"names":[],"mappings":"AAAA,OAAO,E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EG;IACG,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC;IAOxE;;OAEG;IACG,IAAI,CAAC,MAAM,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC;QAC1F,OAAO,EAAE,MAAM,EAAE,CAAC;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,OAAO,CAAC;KACnB,CAAC;IAYF,OAAO,CAAC,oBAAoB;CAmB7B"}
|
|
@@ -11,7 +11,7 @@ class Refunds {
|
|
|
11
11
|
*/
|
|
12
12
|
async create(data, options) {
|
|
13
13
|
this.validateCreateRefund(data);
|
|
14
|
-
return this.client.post('/refunds', data, options);
|
|
14
|
+
return this.client.post('/api/v1/refunds', data, options);
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* Retrieve a refund by ID
|
|
@@ -20,7 +20,16 @@ class Refunds {
|
|
|
20
20
|
if (!refundId) {
|
|
21
21
|
throw new errors_1.FidduPayValidationError('Refund ID is required', 'refund_id');
|
|
22
22
|
}
|
|
23
|
-
return this.client.get(`/refunds/${refundId}`, options);
|
|
23
|
+
return this.client.get(`/api/v1/refunds/${refundId}`, options);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Complete a refund
|
|
27
|
+
*/
|
|
28
|
+
async complete(refundId, options) {
|
|
29
|
+
if (!refundId) {
|
|
30
|
+
throw new errors_1.FidduPayValidationError('Refund ID is required', 'refund_id');
|
|
31
|
+
}
|
|
32
|
+
return this.client.request('POST', `/api/v1/refunds/${refundId}/complete`);
|
|
24
33
|
}
|
|
25
34
|
/**
|
|
26
35
|
* List refunds
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refunds.js","sourceRoot":"","sources":["../../src/resources/refunds.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F;AArED,0BAqEC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { HttpClient } from '../client';
|
|
2
|
+
import { SandboxPaymentSimulation, SimulatePaymentRequest } from '../types';
|
|
3
|
+
export declare class Sandbox {
|
|
4
|
+
private client;
|
|
5
|
+
constructor(client: HttpClient);
|
|
6
|
+
/**
|
|
7
|
+
* Enable sandbox mode
|
|
8
|
+
*/
|
|
9
|
+
enable(): Promise<{
|
|
10
|
+
success: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
/**
|
|
13
|
+
* Simulate payment status
|
|
14
|
+
*/
|
|
15
|
+
simulatePayment(paymentId: string, data: SimulatePaymentRequest): Promise<SandboxPaymentSimulation>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=sandbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../../src/resources/sandbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,UAAU,CAAC;AAElB,qBAAa,OAAO;IACN,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,UAAU;IAEtC;;OAEG;IACG,MAAM,IAAI,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IAI7C;;OAEG;IACG,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,wBAAwB,CAAC;CAG1G"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Sandbox = void 0;
|
|
4
|
+
class Sandbox {
|
|
5
|
+
constructor(client) {
|
|
6
|
+
this.client = client;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Enable sandbox mode
|
|
10
|
+
*/
|
|
11
|
+
async enable() {
|
|
12
|
+
return this.client.request('POST', '/api/v1/sandbox/enable');
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Simulate payment status
|
|
16
|
+
*/
|
|
17
|
+
async simulatePayment(paymentId, data) {
|
|
18
|
+
return this.client.request('POST', `/api/v1/sandbox/payments/${paymentId}/simulate`, data);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.Sandbox = Sandbox;
|
|
22
|
+
//# sourceMappingURL=sandbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandbox.js","sourceRoot":"","sources":["../../src/resources/sandbox.ts"],"names":[],"mappings":";;;AAMA,MAAa,OAAO;IAClB,YAAoB,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAE1C;;OAEG;IACH,KAAK,CAAC,MAAM;QACV,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAuB,MAAM,EAAE,wBAAwB,CAAC,CAAC;IACrF,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,eAAe,CAAC,SAAiB,EAAE,IAA4B;QACnE,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAA2B,MAAM,EAAE,4BAA4B,SAAS,WAAW,EAAE,IAAI,CAAC,CAAC;IACvH,CAAC;CACF;AAhBD,0BAgBC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { HttpClient } from '../client';
|
|
2
|
+
import { RequestOptions } from '../types';
|
|
3
|
+
export declare class Security {
|
|
4
|
+
private client;
|
|
5
|
+
constructor(client: HttpClient);
|
|
6
|
+
/**
|
|
7
|
+
* Get security events
|
|
8
|
+
*/
|
|
9
|
+
getEvents(options?: RequestOptions): Promise<any>;
|
|
10
|
+
/**
|
|
11
|
+
* Get security alerts
|
|
12
|
+
*/
|
|
13
|
+
getAlerts(options?: RequestOptions): Promise<any>;
|
|
14
|
+
/**
|
|
15
|
+
* Get security settings
|
|
16
|
+
*/
|
|
17
|
+
getSettings(options?: RequestOptions): Promise<any>;
|
|
18
|
+
/**
|
|
19
|
+
* Update security settings
|
|
20
|
+
*/
|
|
21
|
+
updateSettings(data: {
|
|
22
|
+
max_daily_withdrawal?: number;
|
|
23
|
+
require_2fa_for_withdrawals?: boolean;
|
|
24
|
+
}, options?: RequestOptions): Promise<any>;
|
|
25
|
+
/**
|
|
26
|
+
* Check gas balances
|
|
27
|
+
*/
|
|
28
|
+
checkGasBalances(options?: RequestOptions): Promise<any>;
|
|
29
|
+
/**
|
|
30
|
+
* Get balance alerts
|
|
31
|
+
*/
|
|
32
|
+
getBalanceAlerts(options?: RequestOptions): Promise<any>;
|
|
33
|
+
/**
|
|
34
|
+
* Acknowledge security alert
|
|
35
|
+
*/
|
|
36
|
+
acknowledgeAlert(alertId: string, options?: RequestOptions): Promise<any>;
|
|
37
|
+
/**
|
|
38
|
+
* Resolve balance alert
|
|
39
|
+
*/
|
|
40
|
+
resolveBalanceAlert(alertId: string, options?: RequestOptions): Promise<any>;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=security.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../src/resources/security.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,qBAAa,QAAQ;IACP,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,UAAU;IAEtC;;OAEG;IACG,SAAS,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC;IAIvD;;OAEG;IACG,SAAS,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC;IAIvD;;OAEG;IACG,WAAW,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC;IAIzD;;OAEG;IACG,cAAc,CAAC,IAAI,EAAE;QACzB,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAC9B,2BAA2B,CAAC,EAAE,OAAO,CAAC;KACvC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC;IAI1C;;OAEG;IACG,gBAAgB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC;IAI9D;;OAEG;IACG,gBAAgB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC;IAI9D;;OAEG;IACG,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC;IAI/E;;OAEG;IACG,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC;CAGnF"}
|