@alphawebai/hs-prism 0.1.0-rc.27

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 (39) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +493 -0
  3. package/dist/src/alphaweb/contracts.d.ts +6 -0
  4. package/dist/src/alphaweb/contracts.js +14 -0
  5. package/dist/src/alphaweb/error.d.ts +13 -0
  6. package/dist/src/alphaweb/error.js +100 -0
  7. package/dist/src/alphaweb/index.d.ts +3 -0
  8. package/dist/src/alphaweb/index.js +22 -0
  9. package/dist/src/alphaweb/manifest.d.ts +28 -0
  10. package/dist/src/alphaweb/manifest.js +55 -0
  11. package/dist/src/alphaweb/money.d.ts +19 -0
  12. package/dist/src/alphaweb/money.js +128 -0
  13. package/dist/src/alphaweb/stripe-connector.d.ts +58 -0
  14. package/dist/src/alphaweb/stripe-connector.js +1402 -0
  15. package/dist/src/alphaweb/types.d.ts +255 -0
  16. package/dist/src/alphaweb/types.js +3 -0
  17. package/dist/src/http_client.d.ts +58 -0
  18. package/dist/src/http_client.js +179 -0
  19. package/dist/src/index.d.ts +10 -0
  20. package/dist/src/index.js +41 -0
  21. package/dist/src/payments/_generated_connector_client_flows.d.ts +112 -0
  22. package/dist/src/payments/_generated_connector_client_flows.js +215 -0
  23. package/dist/src/payments/_generated_flows.js +141 -0
  24. package/dist/src/payments/_generated_grpc_client.d.ts +194 -0
  25. package/dist/src/payments/_generated_grpc_client.js +905 -0
  26. package/dist/src/payments/_generated_uniffi_client_flows.d.ts +169 -0
  27. package/dist/src/payments/_generated_uniffi_client_flows.js +342 -0
  28. package/dist/src/payments/connector_client.d.ts +51 -0
  29. package/dist/src/payments/connector_client.js +152 -0
  30. package/dist/src/payments/errors.d.ts +27 -0
  31. package/dist/src/payments/errors.js +39 -0
  32. package/dist/src/payments/generated/libconnector_service_ffi.so +0 -0
  33. package/dist/src/payments/generated/proto.d.ts +49087 -0
  34. package/dist/src/payments/generated/proto.js +154163 -0
  35. package/dist/src/payments/grpc_client.d.ts +1 -0
  36. package/dist/src/payments/grpc_client.js +20 -0
  37. package/dist/src/payments/uniffi_client.d.ts +40 -0
  38. package/dist/src/payments/uniffi_client.js +249 -0
  39. package/package.json +79 -0
@@ -0,0 +1,905 @@
1
+ "use strict";
2
+ // AUTO-GENERATED — do not edit by hand.
3
+ // Source: services.proto | Regenerate: make generate (or: python3 scripts/generators/code/generate.py --lang javascript)
4
+ var __importDefault = (this && this.__importDefault) || function (mod) {
5
+ return (mod && mod.__esModule) ? mod : { "default": mod };
6
+ };
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.GrpcClient = exports.GrpcSurchargeClient = exports.GrpcRefundClient = exports.GrpcRecurringPaymentClient = exports.GrpcPayoutClient = exports.GrpcPaymentClient = exports.GrpcPaymentMethodClient = exports.GrpcPaymentMethodAuthenticationClient = exports.GrpcMerchantAuthenticationClient = exports.GrpcFraudAndRiskManagementClient = exports.GrpcEventClient = exports.GrpcDisputeClient = exports.GrpcCustomerClient = void 0;
9
+ const koffi_1 = __importDefault(require("koffi"));
10
+ const path_1 = __importDefault(require("path"));
11
+ // @ts-ignore - generated CommonJS module
12
+ const proto_js_1 = require("./generated/proto.js");
13
+ const _dirname = __dirname;
14
+ function loadGrpcFfi(libPath) {
15
+ if (!libPath) {
16
+ const ext = process.platform === "darwin" ? "dylib" : "so";
17
+ libPath = path_1.default.join(_dirname, "generated", `libhyperswitch_grpc_ffi.${ext}`);
18
+ }
19
+ const lib = koffi_1.default.load(libPath);
20
+ const call = lib.func("hyperswitch_grpc_call", koffi_1.default.pointer("uint8"), [
21
+ "str",
22
+ koffi_1.default.pointer("uint8"),
23
+ "uint32",
24
+ koffi_1.default.pointer("uint8"),
25
+ "uint32",
26
+ koffi_1.default.out(koffi_1.default.pointer("uint32")),
27
+ ]);
28
+ const free = lib.func("hyperswitch_grpc_free", "void", [
29
+ koffi_1.default.pointer("uint8"),
30
+ "uint32",
31
+ ]);
32
+ return { call, free };
33
+ }
34
+ // ── SecretString field normalization ─────────────────────────────────────────
35
+ const _SECRET_STRING_FIELDS = {
36
+ TokenPaymentMethodType: ["token"],
37
+ CardDetailsWithNoCvc: ["cardNumber", "cardExpMonth", "cardExpYear", "cardHolderName"],
38
+ CardDetails: ["cardNumber", "cardExpMonth", "cardExpYear", "cardCvc", "cardHolderName"],
39
+ ProxyCardDetails: ["cardNumber", "cardExpMonth", "cardExpYear", "cardCvc", "cardHolderName"],
40
+ ApplePayDecryptedData: ["applicationPrimaryAccountNumber", "applicationExpirationMonth", "applicationExpirationYear"],
41
+ ApplePayCryptogramData: ["onlinePaymentCryptogram"],
42
+ GooglePayDecryptedData: ["cardExpMonth", "cardExpYear", "applicationPrimaryAccountNumber", "cryptogram"],
43
+ PaymentCredential: ["dpanLastFourDigits", "cardLastFourDigits"],
44
+ TokenData: ["data"],
45
+ QwikcilverDirectWallet: ["walletNumber"],
46
+ PazeWallet: ["completeResponse"],
47
+ PazeToken: ["paymentToken", "tokenExpirationMonth", "tokenExpirationYear", "paymentAccountReference"],
48
+ PazeDynamicData: ["dynamicDataValue"],
49
+ PazePhoneNumber: ["countryCode", "phoneNumber"],
50
+ PazeConsumer: ["firstName", "lastName", "fullName", "emailAddress"],
51
+ PazeAddress: ["name", "line1", "line2", "line3", "city", "state", "zip"],
52
+ PazeDecryptedData: ["clientId"],
53
+ MifinityRedirectWallet: ["dateOfBirth"],
54
+ PaypalRedirectWallet: ["email"],
55
+ ApplePayThirdPartySdkWallet: ["token"],
56
+ GooglePayThirdPartySdkWallet: ["token"],
57
+ PaypalSdkWallet: ["token"],
58
+ UpiCollect: ["vpaId"],
59
+ PixPayment: ["pixKey", "cpf", "cnpj"],
60
+ OnlineBankingFinland: ["email"],
61
+ Giropay: ["bankAccountBic", "bankAccountIban"],
62
+ Interac: ["email"],
63
+ BancontactCard: ["cardNumber", "cardExpMonth", "cardExpYear", "cardHolderName"],
64
+ Becs: ["accountNumber", "bsbNumber", "bankAccountHolderName"],
65
+ Ach: ["accountNumber", "routingNumber", "cardHolderName", "bankAccountHolderName"],
66
+ Eft: ["accountNumber", "branchCode", "bankAccountHolderName"],
67
+ Sepa: ["iban", "bankAccountHolderName"],
68
+ Bacs: ["accountNumber", "sortCode", "bankAccountHolderName"],
69
+ SepaGuaranteedDebit: ["iban", "bankAccountHolderName"],
70
+ Givex: ["number", "cvc"],
71
+ CardDetailsForNetworkTransactionId: ["cardNumber", "cardExpMonth", "cardExpYear", "nickName", "cardHolderName"],
72
+ DecryptedWalletTokenDetailsForNetworkTransactionId: ["decryptedToken", "tokenExpMonth", "tokenExpYear", "cardHolderName"],
73
+ NetworkTokenData: ["tokenNumber", "tokenExpMonth", "tokenExpYear", "tokenCryptogram", "nickName"],
74
+ Metadata: ["general"],
75
+ Customer: ["email", "phoneNumber"],
76
+ CustomerDocumentDetails: ["documentNumber"],
77
+ Address: ["firstName", "lastName", "line1", "line2", "line3", "city", "state", "zipCode", "email", "phoneNumber"],
78
+ AccessToken: ["token"],
79
+ BillingDescriptor: ["name", "city", "phone"],
80
+ MandateReferenceDetails: ["mandateMetadata"],
81
+ ConnectorMandateReferenceId: ["mandateMetadata"],
82
+ NetworkTokenWithNTI: ["tokenExpMonth", "tokenExpYear"],
83
+ TaxInfo: ["customerTaxRegistrationId", "merchantTaxRegistrationId"],
84
+ StudentDetails: ["studentEmail"],
85
+ AirlinePassenger: ["passportNumber", "ticketNumber"],
86
+ NmiData: ["publicKey"],
87
+ AdditionalCardInfo: ["cardExpMonth", "cardExpYear", "cardHolderName"],
88
+ CustomerInfo: ["customerName", "customerEmail", "customerPhoneNumber", "customerBankId", "customerBankName"],
89
+ AdyenClientAuthenticationResponse: ["sessionData"],
90
+ CheckoutClientAuthenticationResponse: ["paymentSessionToken", "paymentSessionSecret"],
91
+ CybersourceClientAuthenticationResponse: ["captureContext"],
92
+ NuveiClientAuthenticationResponse: ["sessionToken"],
93
+ MollieClientAuthenticationResponse: ["checkoutUrl"],
94
+ GlobalpayClientAuthenticationResponse: ["accessToken"],
95
+ BluesnapClientAuthenticationResponse: ["pfToken"],
96
+ Shift4ClientAuthenticationResponse: ["clientSecret"],
97
+ BankOfAmericaClientAuthenticationResponse: ["captureContext"],
98
+ WellsfargoClientAuthenticationResponse: ["captureContext"],
99
+ FiservClientAuthenticationResponse: ["sessionId"],
100
+ ElavonClientAuthenticationResponse: ["sessionToken"],
101
+ NoonClientAuthenticationResponse: ["checkoutUrl"],
102
+ PaysafeClientAuthenticationResponse: ["paymentHandleToken"],
103
+ BamboraapacClientAuthenticationResponse: ["token"],
104
+ DatatransClientAuthenticationResponse: ["transactionId"],
105
+ BamboraClientAuthenticationResponse: ["token"],
106
+ PayloadClientAuthenticationResponse: ["clientToken"],
107
+ MultisafepayClientAuthenticationResponse: ["apiToken"],
108
+ NexixpayClientAuthenticationResponse: ["securityToken"],
109
+ RevolutClientAuthenticationResponse: ["token"],
110
+ StripeClientAuthenticationResponse: ["clientSecret"],
111
+ GpayTokenParameters: ["publicKey"],
112
+ SecretInfoToInitiateSdk: ["display", "payment"],
113
+ PaymentServiceAuthorizeRequest: ["metadata", "connectorFeatureData"],
114
+ PaymentServiceAuthorizeResponse: ["rawConnectorResponse", "rawConnectorRequest", "connectorFeatureData"],
115
+ PaymentServiceGetRequest: ["metadata", "connectorFeatureData"],
116
+ PaymentServiceGetResponse: ["metadata", "rawConnectorResponse", "rawConnectorRequest", "connectorFeatureData"],
117
+ PaymentServiceVoidRequest: ["metadata", "connectorFeatureData"],
118
+ PaymentServiceVoidResponse: ["rawConnectorRequest", "connectorFeatureData", "rawConnectorResponse"],
119
+ PaymentServiceReverseRequest: ["metadata", "connectorFeatureData"],
120
+ PaymentServiceReverseResponse: ["rawConnectorRequest", "rawConnectorResponse"],
121
+ MerchantAuthenticationServiceCreateServerAuthenticationTokenRequest: ["metadata", "connectorFeatureData"],
122
+ MerchantAuthenticationServiceCreateServerAuthenticationTokenResponse: ["accessToken"],
123
+ MerchantAuthenticationServiceCreateServerSessionAuthenticationTokenRequest: ["connectorFeatureData"],
124
+ PaymentSessionContext: ["metadata"],
125
+ MerchantAuthenticationServiceCreateClientAuthenticationTokenRequest: ["connectorFeatureData"],
126
+ PaymentClientAuthenticationContext: ["metadata"],
127
+ MerchantAuthenticationServiceCreateClientAuthenticationTokenResponse: ["rawConnectorResponse", "rawConnectorRequest"],
128
+ PaymentServiceCaptureRequest: ["metadata", "connectorFeatureData"],
129
+ PaymentServiceCaptureResponse: ["rawConnectorRequest", "connectorFeatureData", "rawConnectorResponse"],
130
+ PaymentServiceCreateOrderRequest: ["metadata", "connectorFeatureData"],
131
+ PaymentServiceCreateOrderResponse: ["rawConnectorRequest", "rawConnectorResponse"],
132
+ PaymentServiceRefundRequest: ["metadata", "refundMetadata", "connectorFeatureData"],
133
+ RefundResponse: ["email", "metadata", "refundMetadata", "acquirerReferenceNumber", "rawConnectorResponse", "rawConnectorRequest", "stateMetadata"],
134
+ RefundServiceVoidPostRefundRequest: ["refundMetadata", "connectorFeatureData"],
135
+ DisputeResponse: ["rawConnectorRequest"],
136
+ PaymentServiceSetupRecurringRequest: ["metadata", "connectorFeatureData", "connectorTestingData"],
137
+ PaymentServiceSetupRecurringResponse: ["rawConnectorRequest", "connectorFeatureData", "rawConnectorResponse"],
138
+ RecurringPaymentServiceChargeRequest: ["metadata", "connectorFeatureData", "email", "merchantAccountId", "connectorTestingData"],
139
+ RecurringPaymentServiceChargeResponse: ["connectorFeatureData", "rawConnectorResponse", "rawConnectorRequest"],
140
+ RecurringPaymentServiceRevokeResponse: ["rawConnectorResponse", "rawConnectorRequest"],
141
+ PaymentMethodAuthenticationServicePreAuthenticateRequest: ["metadata", "connectorFeatureData"],
142
+ PaymentMethodAuthenticationServicePreAuthenticateResponse: ["connectorFeatureData", "rawConnectorResponse"],
143
+ PaymentMethodAuthenticationServiceAuthenticateRequest: ["metadata", "connectorFeatureData"],
144
+ PaymentMethodAuthenticationServiceAuthenticateResponse: ["connectorFeatureData", "rawConnectorResponse"],
145
+ PaymentMethodAuthenticationServicePostAuthenticateRequest: ["metadata", "connectorFeatureData"],
146
+ PaymentMethodAuthenticationServicePostAuthenticateResponse: ["connectorFeatureData", "rawConnectorResponse"],
147
+ PaymentServiceIncrementalAuthorizationRequest: ["connectorFeatureData"],
148
+ PaymentServiceIncrementalAuthorizationResponse: ["rawConnectorRequest", "rawConnectorResponse"],
149
+ PaymentServiceVerifyRedirectResponseResponse: ["rawConnectorResponse"],
150
+ RefundServiceGetRequest: ["refundMetadata", "connectorFeatureData"],
151
+ DisputeServiceSubmitEvidenceResponse: ["rawConnectorRequest"],
152
+ DisputeServiceDefendResponse: ["rawConnectorRequest"],
153
+ DisputeServiceAcceptResponse: ["rawConnectorRequest"],
154
+ PaymentMethodServiceTokenizeRequest: ["metadata", "connectorFeatureData"],
155
+ PaymentMethodServiceCreateRequest: ["metadata", "connectorFeatureData"],
156
+ PaymentMethodServiceCreateResponse: ["rawConnectorResponse", "rawConnectorRequest"],
157
+ PaymentMethodServiceGetRequest: ["connectorFeatureData", "metadata"],
158
+ PaymentMethodServiceGetResponse: ["rawConnectorResponse", "rawConnectorRequest"],
159
+ WalletDetails: ["walletPin"],
160
+ PaymentMethodServiceRechargeRequest: ["metadata", "connectorFeatureData"],
161
+ PaymentMethodServiceRechargeResponse: ["rawConnectorResponse", "rawConnectorRequest"],
162
+ CustomerServiceCreateRequest: ["email", "phoneNumber", "metadata", "connectorFeatureData"],
163
+ CustomerServiceGetRequest: ["email", "phoneNumber", "connectorFeatureData"],
164
+ CustomerServiceUpdateRequest: ["email", "phoneNumber", "metadata", "connectorFeatureData"],
165
+ StripeConfig: ["apiKey"],
166
+ AciConfig: ["apiKey", "entityId"],
167
+ BamboraConfig: ["merchantId", "apiKey"],
168
+ BamboraapacConfig: ["username", "password", "accountNumber"],
169
+ CalidaConfig: ["apiKey"],
170
+ CeleroConfig: ["apiKey"],
171
+ NexinetsConfig: ["merchantId", "apiKey"],
172
+ NexixpayConfig: ["apiKey"],
173
+ RevolutConfig: ["secretApiKey", "signingSecret"],
174
+ Revolv3Config: ["apiKey"],
175
+ Shift4Config: ["apiKey"],
176
+ StaxConfig: ["apiKey"],
177
+ XenditConfig: ["apiKey"],
178
+ HelcimConfig: ["apiKey"],
179
+ MifinityConfig: ["key", "brandId", "destinationAccountNumber"],
180
+ MultisafepayConfig: ["apiKey"],
181
+ ScreenstreamConfig: ["apiKey"],
182
+ AuthorizedotnetConfig: ["name", "transactionKey"],
183
+ BraintreeConfig: ["publicKey", "privateKey", "merchantAccountId"],
184
+ AirwallexConfig: ["apiKey", "clientId"],
185
+ AuthipayConfig: ["apiKey", "apiSecret"],
186
+ BillwerkConfig: ["apiKey", "publicApiKey"],
187
+ BluesnapConfig: ["username", "password"],
188
+ CashfreeConfig: ["appId", "secretKey"],
189
+ CheckoutConfig: ["apiKey", "apiSecret", "processingChannelId"],
190
+ CryptopayConfig: ["apiKey", "apiSecret"],
191
+ DatatransConfig: ["merchantId", "password"],
192
+ FiservemeaConfig: ["apiKey", "apiSecret"],
193
+ FinixConfig: ["finixUserName", "finixPassword", "merchantIdentityId", "merchantId"],
194
+ GlobalpayConfig: ["appId", "appKey"],
195
+ HipayConfig: ["apiKey", "apiSecret"],
196
+ JpmorganConfig: ["clientId", "clientSecret", "companyName", "productName", "merchantPurchaseDescription", "statementDescriptor"],
197
+ PaysafeCardAccountId: ["noThreeDs", "threeDs"],
198
+ PaysafeAchAccountId: ["accountId"],
199
+ PaysafeApplePayAccountId: ["encrypt", "decrypt"],
200
+ PaysafeInteracAccountId: ["threeDs"],
201
+ PaysafeRedirectAccountId: ["threeDs"],
202
+ LoonioConfig: ["merchantId", "merchantToken"],
203
+ PaysafeConfig: ["username", "password"],
204
+ PayuConfig: ["apiKey", "apiSecret"],
205
+ PowertranzConfig: ["powerTranzId", "powerTranzPassword"],
206
+ RapydConfig: ["accessKey", "secretKey"],
207
+ WorldpayConfig: ["username", "password", "entityId", "merchantName"],
208
+ AdyenConfig: ["apiKey", "merchantAccount", "reviewKey"],
209
+ BankOfAmericaConfig: ["apiKey", "merchantAccount", "apiSecret"],
210
+ BarclaycardConfig: ["apiKey", "merchantAccount", "apiSecret"],
211
+ CybersourceConfig: ["apiKey", "merchantAccount", "apiSecret"],
212
+ DlocalConfig: ["xLogin", "xTransKey", "secret"],
213
+ ElavonConfig: ["sslMerchantId", "sslUserId", "sslPin"],
214
+ FiservConfig: ["apiKey", "merchantAccount", "apiSecret", "terminalId"],
215
+ GetnetConfig: ["apiKey", "apiSecret", "sellerId"],
216
+ HyperpgConfig: ["username", "password", "merchantId"],
217
+ IatapayConfig: ["clientId", "merchantId", "clientSecret"],
218
+ NuveiConfig: ["merchantId", "merchantSiteId", "merchantSecret"],
219
+ NovalnetConfig: ["productActivationKey", "paymentAccessKey", "tariffId"],
220
+ NoonConfig: ["apiKey", "applicationIdentifier", "businessIdentifier"],
221
+ RedsysConfig: ["merchantId", "terminalId", "sha256Pwd"],
222
+ SilverflowConfig: ["apiKey", "apiSecret", "merchantAcceptorKey"],
223
+ TrustpayConfig: ["apiKey", "projectId", "secretKey"],
224
+ TrustpaymentsConfig: ["username", "password", "siteReference"],
225
+ TsysConfig: ["deviceId", "transactionKey", "developerId"],
226
+ WellsfargoConfig: ["apiKey", "merchantAccount", "apiSecret"],
227
+ WorldpayvantivConfig: ["user", "password", "merchantId"],
228
+ WorldpayxmlConfig: ["apiUsername", "apiPassword", "merchantCode"],
229
+ ZiftConfig: ["userName", "password", "accountId"],
230
+ FiservcommercehubConfig: ["apiKey", "secret", "merchantId", "terminalId"],
231
+ AbsaSanlamConfig: ["apiKey", "merchantId"],
232
+ ItaubankConfig: ["clientSecret", "clientId", "certificates", "privateKey"],
233
+ GigadatConfig: ["campaignId", "accessToken", "securityToken"],
234
+ PhonepeConfig: ["merchantId", "saltKey", "saltIndex"],
235
+ ForteConfig: ["apiAccessId", "organizationId", "locationId", "apiSecretKey"],
236
+ VoltConfig: ["username", "password", "clientId", "clientSecret"],
237
+ PayboxConfig: ["site", "rank", "key", "merchantId"],
238
+ PaytmConfig: ["merchantId", "merchantKey", "website", "clientId"],
239
+ CashtocodeCurrencyAuthData: ["passwordClassic", "passwordEvoucher", "usernameClassic", "usernameEvoucher", "merchantIdClassic", "merchantIdEvoucher"],
240
+ MollieConfig: ["apiKey", "profileToken"],
241
+ NmiConfig: ["apiKey", "publicKey"],
242
+ PaymeConfig: ["sellerPaymeId", "paymeClientKey"],
243
+ PayloadCurrencyAuthData: ["apiKey", "processingAccountId"],
244
+ PlacetopayConfig: ["login", "tranKey"],
245
+ EbanxConfig: ["apiKey"],
246
+ FiuuConfig: ["merchantId", "verifyKey", "secretKey"],
247
+ GlobepayConfig: ["apiKey"],
248
+ CoinbaseConfig: ["apiKey"],
249
+ CoingateConfig: ["apiKey"],
250
+ PeachpaymentsConfig: ["apiKey", "tenantId", "clientMerchantReferenceId", "merchantPaymentMethodRouteId"],
251
+ PproConfig: ["apiKey", "merchantId"],
252
+ PaypalConfig: ["clientId", "clientSecret", "payerId"],
253
+ TrustlyConfig: ["username", "password", "privateKey"],
254
+ EasebuzzConfig: ["apiKey", "apiSalt"],
255
+ TruelayerConfig: ["clientId", "clientSecret", "merchantAccountId", "accountHolderName", "privateKey", "kid"],
256
+ PinelabsOnlineConfig: ["clientId", "clientSecret"],
257
+ ImerchantsolutionsConfig: ["apiKey", "merchantId"],
258
+ AxisbankConfig: ["merchantKid", "juspayKid", "merchantPrivateKey", "juspayPublicKey"],
259
+ TsysTransitConfig: ["deviceId", "transactionKey", "developerId"],
260
+ FlywireConfig: ["apiKey", "sharedSecret"],
261
+ AffirmConfig: ["publicKey", "privateKey"],
262
+ TwocTwopPacoConfig: ["accessToken", "officeId", "pacoKid", "merchantSigningPrivateKey", "merchantEncryptionPrivateKey", "pacoSigningPublicKey", "pacoEncryptionPublicKey", "responseAudience"],
263
+ TamaraConfig: ["apiKey"],
264
+ InterpaymentsConfig: ["apiKey"],
265
+ JuspayConfig: ["apiKey", "merchantId"],
266
+ QwikcilverConfig: ["bootstrapBearerToken", "terminalId", "username", "password"],
267
+ PayconexConfig: ["apiKey", "accountId"],
268
+ KountConfig: ["apiKey"],
269
+ HyperswitchConfig: ["apiKey"],
270
+ GlomopayConfig: ["apiKey"],
271
+ PaymentServiceTokenAuthorizeRequest: ["connectorToken", "metadata", "connectorFeatureData"],
272
+ PaymentServiceTokenSetupRecurringRequest: ["connectorToken", "metadata", "connectorFeatureData"],
273
+ PaymentServiceProxyAuthorizeRequest: ["metadata", "connectorFeatureData"],
274
+ PaymentServiceProxySetupRecurringRequest: ["metadata"],
275
+ PaymentMethodServiceEligibilityRequest: ["metadata", "connectorFeatureData"],
276
+ PaymentMethodServiceEligibilityResponse: ["rawConnectorRequest", "rawConnectorResponse"],
277
+ FrmServicePreRiskCheckRequest: ["metadata", "connectorFeatureData"],
278
+ FrmServicePreRiskCheckResponse: ["rawConnectorRequest", "rawConnectorResponse"],
279
+ FrmServicePostRiskCheckRequest: ["metadata", "connectorFeatureData"],
280
+ FrmServicePostRiskCheckResponse: ["rawConnectorRequest", "rawConnectorResponse"],
281
+ CompositeFrmPreRiskCheckRequest: ["metadata", "connectorFeatureData"],
282
+ CompositeFrmPostRiskCheckRequest: ["metadata", "connectorFeatureData"],
283
+ CardPayout: ["cardNumber", "cardExpMonth", "cardExpYear", "cardHolderName"],
284
+ AchBankTransferPayout: ["bankAccountNumber", "bankRoutingNumber"],
285
+ BacsBankTransferPayout: ["bankAccountNumber", "bankSortCode"],
286
+ SepaBankTransferPayout: ["iban", "bic"],
287
+ PixBankTransferPayout: ["bankAccountNumber", "taxId", "ispb"],
288
+ PixKeyBankTransferPayout: ["pixKey"],
289
+ PixEmvBankTransferPayout: ["emv"],
290
+ ApplePayDecrypt: ["dpan", "expiryMonth", "expiryYear", "cardHolderName"],
291
+ Paypal: ["email", "telephoneNumber", "paypalId"],
292
+ Venmo: ["telephoneNumber"],
293
+ InteracPayout: ["email"],
294
+ OpenBankingUkPayout: ["accountHolderName", "iban"],
295
+ PayoutServiceCreateRequest: ["connectorFeatureData", "accessToken"],
296
+ PayoutServiceTransferRequest: ["accessToken"],
297
+ PayoutServiceStageRequest: ["accessToken"],
298
+ PayoutServiceGetRequest: ["accessToken"],
299
+ PayoutServiceVoidRequest: ["connectorFeatureData", "accessToken"],
300
+ PayoutServiceCreateLinkRequest: ["connectorFeatureData", "accessToken"],
301
+ PayoutServiceCreateRecipientRequest: ["accessToken"],
302
+ PayoutServiceEnrollDisburseAccountRequest: ["accessToken"],
303
+ PayoutMethodEligibilityRequest: ["connectorFeatureData", "accessToken"],
304
+ SurchargeServiceCalculateRequest: ["postalCode"],
305
+ };
306
+ const _MSG_FIELD_TYPES = {
307
+ PaymentMethod: { "card": "CardDetails", "cardRedirect": "CardRedirect", "cardWithNoCvc": "CardDetailsWithNoCvc", "cardProxy": "ProxyCardDetails", "token": "TokenPaymentMethodType", "applePaySdk": "AppleWallet", "googlePaySdk": "GoogleWallet", "paypalSdk": "PaypalSdkWallet", "pazeSdk": "PazeWallet", "samsungPaySdk": "SamsungWallet", "applePayThirdPartySdk": "ApplePayThirdPartySdkWallet", "googlePayThirdPartySdk": "GooglePayThirdPartySdkWallet", "amazonPayRedirect": "AmazonPayRedirectWallet", "paypalRedirect": "PaypalRedirectWallet", "aliPayRedirect": "AliPayRedirectWallet", "revolutPayRedirect": "RevolutPayRedirectWallet", "mifinityRedirect": "MifinityRedirectWallet", "bluecodeRedirect": "BluecodeRedirectWallet", "satispayRedirect": "SatispayRedirectWallet", "weroRedirect": "WeroRedirectWallet", "lazypayRedirect": "LazyPayRedirectWallet", "phonepeRedirect": "PhonePeRedirectWallet", "billdeskRedirect": "BillDeskRedirectWallet", "cashfreeRedirect": "CashfreeRedirectWallet", "payuRedirect": "PayURedirectWallet", "easebuzzRedirect": "EaseBuzzRedirectWallet", "kakaoPayRedirect": "KakaoPayRedirectWallet", "mbWayRedirect": "MbWayRedirectWallet", "momoRedirect": "MomoRedirectWallet", "touchNGoRedirect": "TouchNGoRedirectWallet", "twintRedirect": "TwintRedirectWallet", "vippsRedirect": "VippsRedirectWallet", "weChatPayRedirect": "WeChatPayRedirectWallet", "aliPayHkRedirect": "AliPayHKRedirectWallet", "danaRedirect": "DanaRedirectWallet", "gcashRedirect": "GcashRedirectWallet", "goPayRedirect": "GoPayRedirectWallet", "mobilePayRedirect": "MobilePayRedirectWallet", "venmoRedirect": "VenmoRedirectWallet", "skrillRedirect": "SkrillRedirectWallet", "payseraRedirect": "PayseraRedirectWallet", "qwikcilverWalletDirect": "QwikcilverDirectWallet", "revolutPay": "RevolutPayWallet", "mbWay": "MBWay", "satispay": "Satispay", "wero": "Wero", "cashappQr": "CashappQrWallet", "weChatPayQr": "WeChatPayQrWallet", "swishQr": "SwishQrWallet", "upiCollect": "UpiCollect", "upiIntent": "UpiIntent", "upiQr": "UpiQr", "onlineBankingThailand": "OnlineBankingThailand", "onlineBankingCzechRepublic": "OnlineBankingCzechRepublic", "onlineBankingFinland": "OnlineBankingFinland", "onlineBankingFpx": "OnlineBankingFPX", "onlineBankingPoland": "OnlineBankingPoland", "onlineBankingSlovakia": "OnlineBankingSlovakia", "openBankingUk": "OpenBankingUK", "openBankingPis": "OpenBankingPIS", "localBankRedirect": "LocalBankRedirect", "ideal": "Ideal", "sofort": "Sofort", "trustly": "Trustly", "giropay": "Giropay", "eps": "Eps", "przelewy24": "Przelewy24", "pse": "Pse", "bancontactCard": "BancontactCard", "blik": "Blik", "openBanking": "OpenBanking", "interac": "Interac", "bizum": "Bizum", "eftBankRedirect": "EftBankRedirect", "duitNow": "DuitNow", "crypto": "CryptoCurrency", "classicReward": "ClassicReward", "eVoucher": "EVoucher", "instantBankTransfer": "InstantBankTransfer", "achBankTransfer": "AchBankTransfer", "sepaBankTransfer": "SepaBankTransfer", "bacsBankTransfer": "BacsBankTransfer", "multibancoBankTransfer": "MultibancoBankTransfer", "instantBankTransferFinland": "InstantBankTransferFinland", "instantBankTransferPoland": "InstantBankTransferPoland", "pix": "PixPayment", "permataBankTransfer": "PermataBankTransfer", "bcaBankTransfer": "BCABankTransfer", "bniVaBankTransfer": "BNIVaBankTransfer", "briVaBankTransfer": "BRIVaBankTransfer", "cimbVaBankTransfer": "CIMBVaBankTransfer", "danamonVaBankTransfer": "DanamonVaBankTransfer", "mandiriVaBankTransfer": "MandiriVaBankTransfer", "localBankTransfer": "LocalBankTransfer", "indonesianBankTransfer": "IndonesianBankTransfer", "ach": "Ach", "sepa": "Sepa", "bacs": "Bacs", "becs": "Becs", "sepaGuaranteedDebit": "SepaGuaranteedDebit", "eft": "Eft", "affirm": "Affirm", "afterpayClearpay": "AfterpayClearpay", "klarna": "Klarna", "alma": "Alma", "tamaraRedirect": "TamaraRedirect", "cardDetailsForNetworkTransactionId": "CardDetailsForNetworkTransactionId", "networkToken": "NetworkTokenData", "decryptedWalletTokenDetailsForNetworkTransactionId": "DecryptedWalletTokenDetailsForNetworkTransactionId", "givex": "Givex", "paySafeCard": "PaySafeCard", "boleto": "Boleto", "efecty": "Efecty", "pagoEfectivo": "PagoEfectivo", "redCompra": "RedCompra", "redPagos": "RedPagos", "alfamart": "Alfamart", "indomaret": "Indomaret", "oxxo": "Oxxo", "sevenEleven": "SevenEleven", "lawson": "Lawson", "miniStop": "MiniStop", "familyMart": "FamilyMart", "seicomart": "Seicomart", "payEasy": "PayEasy", "netbanking": "NetbankingPayment" },
308
+ AppleWallet: { "paymentData": "PaymentData", "paymentMethod": "PaymentMethod" },
309
+ PaymentData: { "decryptedData": "ApplePayDecryptedData" },
310
+ ApplePayDecryptedData: { "paymentData": "ApplePayCryptogramData" },
311
+ GoogleWallet: { "info": "PaymentMethodInfo", "tokenizationData": "TokenizationData" },
312
+ PaymentMethodInfo: { "assuranceDetails": "AssuranceDetails" },
313
+ TokenizationData: { "decryptedData": "GooglePayDecryptedData", "encryptedData": "GooglePayEncryptedTokenizationData" },
314
+ SamsungWallet: { "paymentCredential": "PaymentCredential" },
315
+ PaymentCredential: { "tokenData": "TokenData" },
316
+ PazeWallet: { "decryptedData": "PazeDecryptedData" },
317
+ PazeConsumer: { "mobileNumber": "PazePhoneNumber" },
318
+ PazeDecryptedData: { "token": "PazeToken", "dynamicData": "PazeDynamicData", "billingAddress": "PazeAddress", "consumer": "PazeConsumer" },
319
+ ErrorInfo: { "unifiedDetails": "UnifiedErrorDetails", "issuerDetails": "IssuerErrorDetails", "connectorDetails": "ConnectorErrorDetails" },
320
+ IssuerErrorDetails: { "networkDetails": "NetworkErrorDetails" },
321
+ ConnectorErrorDetails: { "status": "FlowStatus" },
322
+ Identifier: { "noResponseIdMarker": "Empty" },
323
+ Customer: { "customerDocumentDetails": "CustomerDocumentDetails" },
324
+ ConnectorState: { "accessToken": "AccessToken" },
325
+ NetworkParams: { "cartesBancaires": "CartesBancairesParams" },
326
+ AuthenticationData: { "networkParams": "NetworkParams" },
327
+ CustomerAcceptance: { "onlineMandateDetails": "OnlineMandate" },
328
+ MandateAmountData: { "amountMoney": "Money", "initialBillingAmount": "Money" },
329
+ MandateType: { "singleUse": "MandateAmountData", "multiUse": "MandateAmountData" },
330
+ SetupMandateDetails: { "customerAcceptance": "CustomerAcceptance", "mandateType": "MandateType" },
331
+ MandateReference: { "connectorMandateId": "ConnectorMandateReferenceId", "networkMandateId": "NetworkMandateId", "networkTokenWithNti": "NetworkTokenWithNTI" },
332
+ PaymentAddress: { "shippingAddress": "Address", "billingAddress": "Address" },
333
+ OrderInfo: { "orderDetails": "OrderDetailsWithAmount" },
334
+ L2L3Data: { "orderInfo": "OrderInfo", "taxInfo": "TaxInfo" },
335
+ DomainData: { "airlineData": "AirlineData", "educationData": "EducationData" },
336
+ EducationData: { "studentDetails": "StudentDetails" },
337
+ AirlineData: { "ticketIssueAddress": "Address", "totalFare": "Money", "totalTaxes": "Money", "totalFee": "Money", "boardingFee": "Money", "flightSegments": "AirlineSegment", "passengers": "AirlinePassenger" },
338
+ AirlineSegment: { "departure": "AirlineLocation", "arrival": "AirlineLocation", "fareAmount": "Money", "feeAmount": "Money", "taxAmount": "Money" },
339
+ AirlinePassenger: { "customer": "Customer" },
340
+ RedirectionResponse: { "payload": "PayloadEntry" },
341
+ RedirectForm: { "form": "FormData", "html": "HtmlData", "uri": "UriData", "braintree": "BraintreeData", "mifinity": "MifinityData", "nmi": "NmiData", "hostedIframe": "HostedIframeData" },
342
+ FormData: { "formFields": "FormFieldsEntry" },
343
+ NmiData: { "amount": "Money" },
344
+ RequestDetails: { "headers": "HeadersEntry" },
345
+ EventServiceHandleResponse: { "eventContent": "EventContent", "eventAckResponse": "EventAckResponse" },
346
+ NotifyConnectorRequest: { "content": "NotifyConnectorContent", "state": "ConnectorState" },
347
+ NotifyConnectorContent: { "surchargeContent": "SurchargeContent", "frmNotification": "FrmNotificationContent" },
348
+ FrmNotificationContent: { "amount": "Money", "paymentDetails": "FrmPaymentDetails", "refund": "FrmRefundDetails", "chargeback": "FrmChargebackDetails", "merchantDetails": "MerchantDetails" },
349
+ NotifyConnectorResponse: { "error": "ErrorInfo" },
350
+ EventAckResponse: { "headers": "HeadersEntry" },
351
+ EventContent: { "paymentsResponse": "PaymentServiceGetResponse", "refundsResponse": "RefundResponse", "disputesResponse": "DisputeResponse" },
352
+ AdditionalPaymentData: { "card": "AdditionalCardInfo" },
353
+ InteracCustomerInfo: { "customerInfo": "CustomerInfo" },
354
+ BankRedirectConnectorResponse: { "interac": "InteracCustomerInfo" },
355
+ AdditionalPaymentMethodConnectorResponse: { "card": "CardConnectorResponse", "upi": "UpiConnectorResponse", "googlePay": "GooglePayConnectorResponse", "applePay": "ApplePayConnectorResponse", "bankRedirect": "BankRedirectConnectorResponse" },
356
+ ConnectorResponseData: { "additionalPaymentMethodData": "AdditionalPaymentMethodConnectorResponse", "extendedAuthorizationResponseData": "ExtendedAuthorizationResponseData" },
357
+ PaymentMethodUpdate: { "card": "CardDetailUpdate" },
358
+ ClientAuthenticationTokenData: { "googlePay": "GpayClientAuthenticationResponse", "paypal": "PaypalClientAuthenticationResponse", "applePay": "ApplepayClientAuthenticationResponse", "connectorSpecific": "ConnectorSpecificClientAuthenticationResponse" },
359
+ ConnectorSpecificClientAuthenticationResponse: { "stripe": "StripeClientAuthenticationResponse", "adyen": "AdyenClientAuthenticationResponse", "checkout": "CheckoutClientAuthenticationResponse", "cybersource": "CybersourceClientAuthenticationResponse", "nuvei": "NuveiClientAuthenticationResponse", "mollie": "MollieClientAuthenticationResponse", "globalpay": "GlobalpayClientAuthenticationResponse", "bluesnap": "BluesnapClientAuthenticationResponse", "rapyd": "RapydClientAuthenticationResponse", "shift4": "Shift4ClientAuthenticationResponse", "bankOfAmerica": "BankOfAmericaClientAuthenticationResponse", "wellsfargo": "WellsfargoClientAuthenticationResponse", "fiserv": "FiservClientAuthenticationResponse", "elavon": "ElavonClientAuthenticationResponse", "noon": "NoonClientAuthenticationResponse", "paysafe": "PaysafeClientAuthenticationResponse", "bamboraapac": "BamboraapacClientAuthenticationResponse", "jpmorgan": "JpmorganClientAuthenticationResponse", "billwerk": "BillwerkClientAuthenticationResponse", "datatrans": "DatatransClientAuthenticationResponse", "bambora": "BamboraClientAuthenticationResponse", "payload": "PayloadClientAuthenticationResponse", "multisafepay": "MultisafepayClientAuthenticationResponse", "nexinets": "NexinetsClientAuthenticationResponse", "nexixpay": "NexixpayClientAuthenticationResponse", "revolut": "RevolutClientAuthenticationResponse" },
360
+ GpayClientAuthenticationResponse: { "googlePaySession": "GooglePaySessionResponse" },
361
+ GooglePaySessionResponse: { "merchantInfo": "GpayMerchantInfo", "shippingAddressParameters": "GpayShippingAddressParameters", "allowedPaymentMethods": "GpayAllowedPaymentMethods", "transactionInfo": "GpayTransactionInfo", "secrets": "SecretInfoToInitiateSdk" },
362
+ GpayAllowedPaymentMethods: { "parameters": "GpayAllowedMethodsParameters", "tokenizationSpecification": "GpayTokenizationSpecification" },
363
+ GpayAllowedMethodsParameters: { "billingAddressParameters": "GpayBillingAddressParameters" },
364
+ GpayTokenizationSpecification: { "parameters": "GpayTokenParameters" },
365
+ ApplepayClientAuthenticationResponse: { "sessionResponse": "ApplePaySessionResponse", "paymentRequestData": "ApplePayPaymentRequest" },
366
+ ApplePaySessionResponse: { "thirdPartySdk": "ThirdPartySdkSessionResponse" },
367
+ ThirdPartySdkSessionResponse: { "secrets": "SecretInfoToInitiateSdk" },
368
+ ApplePayPaymentRequest: { "total": "AmountInfo" },
369
+ ApplePayRecurringPaymentRequest: { "regularBilling": "ApplePayRegularBillingRequest" },
370
+ PaypalClientAuthenticationResponse: { "transactionInfo": "PaypalTransactionInfo" },
371
+ PaymentServiceAuthorizeRequest: { "amount": "Money", "paymentMethod": "PaymentMethod", "customer": "Customer", "address": "PaymentAddress", "authenticationData": "AuthenticationData", "customerAcceptance": "CustomerAcceptance", "browserInfo": "BrowserInformation", "setupMandateDetails": "SetupMandateDetails", "billingDescriptor": "BillingDescriptor", "state": "ConnectorState", "orderDetails": "OrderDetailsWithAmount", "redirectionResponse": "RedirectionResponse", "l2L3Data": "L2L3Data", "domainData": "DomainData", "splitPayments": "SplitPaymentsDetails", "surchargeAmount": "Money", "partnerMerchantIdentifierDetails": "PartnerMerchantIdentifierDetails" },
372
+ PartnerMerchantIdentifierDetails: { "partnerDetails": "PartnerApplicationDetails", "merchantDetails": "MerchantApplicationDetails" },
373
+ PaymentServiceAuthorizeResponse: { "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry", "redirectionData": "RedirectForm", "state": "ConnectorState", "authorizedMoney": "Money", "mandateReference": "MandateReference", "connectorResponse": "ConnectorResponseData", "splits": "ConnectorSplitResponseData", "mandateReferenceDetails": "MandateReferenceDetails", "rawConnectorStatus": "RawConnectorStatus" },
374
+ PaymentServiceGetRequest: { "amount": "Money", "state": "ConnectorState", "splitPayments": "SplitPaymentsDetails", "mandateReference": "ConnectorMandateReferenceId" },
375
+ PaymentServiceGetResponse: { "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry", "mandateReference": "MandateReference", "amount": "Money", "connectorResponse": "ConnectorResponseData", "state": "ConnectorState", "redirectionData": "RedirectForm", "paymentMethodUpdate": "PaymentMethodUpdate", "splits": "ConnectorSplitResponseData", "mandateReferenceDetails": "MandateReferenceDetails", "rawConnectorStatus": "RawConnectorStatus" },
376
+ PaymentServiceVoidRequest: { "browserInfo": "BrowserInformation", "amount": "Money", "state": "ConnectorState", "splitPayments": "SplitPaymentsDetails" },
377
+ PaymentServiceVoidResponse: { "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry", "state": "ConnectorState", "mandateReference": "MandateReference", "splits": "ConnectorSplitResponseData", "mandateReferenceDetails": "MandateReferenceDetails", "rawConnectorStatus": "RawConnectorStatus" },
378
+ PaymentServiceReverseRequest: { "browserInfo": "BrowserInformation" },
379
+ PaymentServiceReverseResponse: { "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry" },
380
+ MerchantAuthenticationServiceCreateServerAuthenticationTokenResponse: { "error": "ErrorInfo" },
381
+ MerchantAuthenticationServiceCreateServerSessionAuthenticationTokenRequest: { "state": "ConnectorState", "payment": "PaymentSessionContext" },
382
+ PaymentSessionContext: { "amount": "Money", "browserInfo": "BrowserInformation", "customer": "Customer", "address": "PaymentAddress" },
383
+ MerchantAuthenticationServiceCreateServerSessionAuthenticationTokenResponse: { "error": "ErrorInfo" },
384
+ MerchantAuthenticationServiceCreateClientAuthenticationTokenRequest: { "payment": "PaymentClientAuthenticationContext", "permissions": "Permissions" },
385
+ PaymentClientAuthenticationContext: { "amount": "Money", "customer": "Customer" },
386
+ MerchantAuthenticationServiceCreateClientAuthenticationTokenResponse: { "sessionData": "ClientAuthenticationTokenData", "error": "ErrorInfo" },
387
+ PaymentServiceCaptureRequest: { "amountToCapture": "Money", "multipleCaptureData": "MultipleCaptureRequestData", "browserInfo": "BrowserInformation", "state": "ConnectorState", "orderTaxAmount": "Money", "splitPayments": "SplitPaymentsDetails" },
388
+ PaymentServiceCaptureResponse: { "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry", "state": "ConnectorState", "mandateReference": "MandateReference", "connectorResponse": "ConnectorResponseData", "splits": "ConnectorSplitResponseData", "mandateReferenceDetails": "MandateReferenceDetails", "rawConnectorStatus": "RawConnectorStatus" },
389
+ PaymentServiceCreateOrderRequest: { "amount": "Money", "state": "ConnectorState" },
390
+ PaymentServiceCreateOrderResponse: { "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry", "sessionData": "ClientAuthenticationTokenData" },
391
+ PaymentServiceRefundRequest: { "refundAmount": "Money", "browserInfo": "BrowserInformation", "state": "ConnectorState", "paymentMethod": "PaymentMethod", "splitRefunds": "SplitRefundsDetails" },
392
+ RefundResponse: { "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry", "refundAmount": "Money", "state": "ConnectorState", "rawConnectorStatus": "RawConnectorStatus" },
393
+ RefundServiceVoidPostRefundRequest: { "browserInfo": "BrowserInformation", "state": "ConnectorState" },
394
+ PaymentServiceDisputeRequest: { "state": "ConnectorState" },
395
+ DisputeResponse: { "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry", "disputeAmount": "Money", "evidenceDocuments": "EvidenceDocument" },
396
+ PaymentServiceSetupRecurringRequest: { "amount": "Money", "paymentMethod": "PaymentMethod", "customer": "Customer", "address": "PaymentAddress", "authenticationData": "AuthenticationData", "customerAcceptance": "CustomerAcceptance", "browserInfo": "BrowserInformation", "billingDescriptor": "BillingDescriptor", "state": "ConnectorState", "l2L3Data": "L2L3Data", "setupMandateDetails": "SetupMandateDetails", "partnerMerchantIdentifierDetails": "PartnerMerchantIdentifierDetails" },
397
+ PaymentServiceSetupRecurringResponse: { "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry", "mandateReference": "MandateReference", "redirectionData": "RedirectForm", "connectorResponse": "ConnectorResponseData", "state": "ConnectorState", "splits": "ConnectorSplitResponseData", "mandateReferenceDetails": "MandateReferenceDetails", "rawConnectorStatus": "RawConnectorStatus" },
398
+ RecurringPaymentServiceChargeRequest: { "connectorRecurringPaymentId": "MandateReference", "amount": "Money", "paymentMethod": "PaymentMethod", "address": "PaymentAddress", "browserInfo": "BrowserInformation", "state": "ConnectorState", "originalPaymentAuthorizedAmount": "Money", "billingDescriptor": "BillingDescriptor", "authenticationData": "AuthenticationData", "customer": "Customer", "l2L3Data": "L2L3Data", "customerDocumentDetails": "CustomerDocumentDetails", "additionalPaymentData": "AdditionalPaymentData", "splitPayments": "SplitPaymentsDetails", "partnerMerchantIdentifierDetails": "PartnerMerchantIdentifierDetails" },
399
+ RecurringPaymentServiceChargeResponse: { "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry", "mandateReference": "MandateReference", "state": "ConnectorState", "connectorResponse": "ConnectorResponseData", "splits": "ConnectorSplitResponseData", "mandateReferenceDetails": "MandateReferenceDetails", "redirectionData": "RedirectForm", "rawConnectorStatus": "RawConnectorStatus" },
400
+ RecurringPaymentServiceRevokeResponse: { "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry" },
401
+ PaymentMethodAuthenticationServicePreAuthenticateRequest: { "amount": "Money", "paymentMethod": "PaymentMethod", "customer": "Customer", "address": "PaymentAddress", "browserInfo": "BrowserInformation", "state": "ConnectorState" },
402
+ PaymentMethodAuthenticationServicePreAuthenticateResponse: { "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry", "redirectionData": "RedirectForm", "state": "ConnectorState", "authenticationData": "AuthenticationData" },
403
+ PaymentMethodAuthenticationServiceAuthenticateRequest: { "amount": "Money", "paymentMethod": "PaymentMethod", "customer": "Customer", "address": "PaymentAddress", "authenticationData": "AuthenticationData", "browserInfo": "BrowserInformation", "state": "ConnectorState", "redirectionResponse": "RedirectionResponse", "domainData": "DomainData" },
404
+ PaymentMethodAuthenticationServiceAuthenticateResponse: { "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry", "redirectionData": "RedirectForm", "authenticationData": "AuthenticationData", "state": "ConnectorState" },
405
+ PaymentMethodAuthenticationServicePostAuthenticateRequest: { "amount": "Money", "paymentMethod": "PaymentMethod", "customer": "Customer", "address": "PaymentAddress", "authenticationData": "AuthenticationData", "browserInfo": "BrowserInformation", "state": "ConnectorState", "redirectionResponse": "RedirectionResponse" },
406
+ PaymentMethodAuthenticationServicePostAuthenticateResponse: { "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry", "redirectionData": "RedirectForm", "authenticationData": "AuthenticationData", "state": "ConnectorState" },
407
+ PaymentServiceIncrementalAuthorizationRequest: { "amount": "Money", "state": "ConnectorState" },
408
+ PaymentServiceIncrementalAuthorizationResponse: { "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry", "state": "ConnectorState" },
409
+ EventReference: { "payment": "PaymentEventReference", "refund": "RefundEventReference", "dispute": "DisputeEventReference", "mandate": "MandateEventReference", "payout": "PayoutEventReference" },
410
+ EventServiceParseRequest: { "requestDetails": "RequestDetails" },
411
+ EventServiceParseResponse: { "reference": "EventReference" },
412
+ EventContext: { "payment": "PaymentEventContext", "refund": "RefundEventContext", "dispute": "DisputeEventContext", "mandate": "MandateEventContext", "payout": "PayoutEventContext" },
413
+ EventServiceHandleRequest: { "requestDetails": "RequestDetails", "webhookSecrets": "WebhookSecrets", "accessToken": "AccessToken", "eventContext": "EventContext" },
414
+ PaymentServiceVerifyRedirectResponseRequest: { "requestDetails": "RequestDetails", "redirectResponseSecrets": "RedirectResponseSecrets" },
415
+ PaymentServiceVerifyRedirectResponseResponse: { "responseAmount": "Money", "error": "ErrorInfo" },
416
+ RefundServiceGetRequest: { "browserInfo": "BrowserInformation", "state": "ConnectorState", "refundAmount": "Money", "splitRefunds": "SplitRefundsDetails" },
417
+ DisputeServiceSubmitEvidenceRequest: { "evidenceDocuments": "EvidenceDocument" },
418
+ DisputeServiceSubmitEvidenceResponse: { "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry" },
419
+ DisputeServiceDefendResponse: { "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry" },
420
+ DisputeServiceAcceptResponse: { "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry" },
421
+ PaymentMethodServiceTokenizeRequest: { "amount": "Money", "paymentMethod": "PaymentMethod", "customer": "Customer", "address": "PaymentAddress", "state": "ConnectorState", "splitPayments": "SplitPaymentsDetails" },
422
+ PaymentMethodServiceTokenizeResponse: { "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry", "state": "ConnectorState" },
423
+ PaymentMethodServiceCreateRequest: { "customer": "Customer", "state": "ConnectorState" },
424
+ PaymentMethodServiceCreateResponse: { "paymentMethodDetails": "PaymentMethodDetails", "customer": "Customer", "address": "Address", "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry" },
425
+ PaymentMethodServiceGetRequest: { "customer": "Customer", "state": "ConnectorState" },
426
+ PaymentMethodServiceGetResponse: { "paymentMethodDetails": "PaymentMethodDetails", "customer": "Customer", "address": "Address", "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry" },
427
+ PaymentMethodDetails: { "wallet": "WalletDetails" },
428
+ WalletDetails: { "items": "WalletItem" },
429
+ WalletItem: { "availableBalance": "Money" },
430
+ PaymentMethodServiceRechargeRequest: { "amount": "Money", "state": "ConnectorState" },
431
+ PaymentMethodServiceRechargeResponse: { "paymentMethodDetails": "PaymentMethodDetails", "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry" },
432
+ CustomerServiceCreateRequest: { "address": "PaymentAddress", "splitPayments": "SplitPaymentsDetails" },
433
+ CustomerServiceCreateResponse: { "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry" },
434
+ CustomerServiceGetResponse: { "customer": "Customer", "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry" },
435
+ CustomerServiceUpdateRequest: { "address": "PaymentAddress" },
436
+ CustomerServiceUpdateResponse: { "customer": "Customer", "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry" },
437
+ CustomerServiceDeleteResponse: { "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry" },
438
+ PaysafePaymentMethodDetails: { "card": "CardEntry", "ach": "AchEntry", "applePay": "ApplePayEntry", "interac": "InteracEntry", "skrill": "SkrillEntry", "paySafeCard": "PaySafeCardEntry" },
439
+ CardEntry: { "value": "PaysafeCardAccountId" },
440
+ AchEntry: { "value": "PaysafeAchAccountId" },
441
+ ApplePayEntry: { "value": "PaysafeApplePayAccountId" },
442
+ InteracEntry: { "value": "PaysafeInteracAccountId" },
443
+ SkrillEntry: { "value": "PaysafeRedirectAccountId" },
444
+ PaySafeCardEntry: { "value": "PaysafeRedirectAccountId" },
445
+ PaysafeConfig: { "accountId": "PaysafePaymentMethodDetails" },
446
+ CashtocodeConfig: { "authKeyMap": "AuthKeyMapEntry" },
447
+ AuthKeyMapEntry: { "value": "PayloadCurrencyAuthData" },
448
+ PayloadConfig: { "authKeyMap": "AuthKeyMapEntry" },
449
+ ConnectorSpecificConfig: { "adyen": "AdyenConfig", "airwallex": "AirwallexConfig", "bambora": "BamboraConfig", "bankofamerica": "BankOfAmericaConfig", "billwerk": "BillwerkConfig", "bluesnap": "BluesnapConfig", "braintree": "BraintreeConfig", "cashtocode": "CashtocodeConfig", "cryptopay": "CryptopayConfig", "cybersource": "CybersourceConfig", "datatrans": "DatatransConfig", "dlocal": "DlocalConfig", "elavon": "ElavonConfig", "fiserv": "FiservConfig", "fiservemea": "FiservemeaConfig", "forte": "ForteConfig", "getnet": "GetnetConfig", "globalpay": "GlobalpayConfig", "hipay": "HipayConfig", "helcim": "HelcimConfig", "iatapay": "IatapayConfig", "jpmorgan": "JpmorganConfig", "mifinity": "MifinityConfig", "mollie": "MollieConfig", "multisafepay": "MultisafepayConfig", "nexinets": "NexinetsConfig", "nexixpay": "NexixpayConfig", "nmi": "NmiConfig", "noon": "NoonConfig", "novalnet": "NovalnetConfig", "nuvei": "NuveiConfig", "paybox": "PayboxConfig", "payme": "PaymeConfig", "payu": "PayuConfig", "powertranz": "PowertranzConfig", "rapyd": "RapydConfig", "redsys": "RedsysConfig", "shift4": "Shift4Config", "stax": "StaxConfig", "stripe": "StripeConfig", "trustpay": "TrustpayConfig", "tsys": "TsysConfig", "volt": "VoltConfig", "wellsfargo": "WellsfargoConfig", "worldpay": "WorldpayConfig", "worldpayvantiv": "WorldpayvantivConfig", "xendit": "XenditConfig", "phonepe": "PhonepeConfig", "cashfree": "CashfreeConfig", "paytm": "PaytmConfig", "calida": "CalidaConfig", "payload": "PayloadConfig", "authipay": "AuthipayConfig", "silverflow": "SilverflowConfig", "celero": "CeleroConfig", "trustpayments": "TrustpaymentsConfig", "paysafe": "PaysafeConfig", "barclaycard": "BarclaycardConfig", "worldpayxml": "WorldpayxmlConfig", "revolut": "RevolutConfig", "loonio": "LoonioConfig", "gigadat": "GigadatConfig", "hyperpg": "HyperpgConfig", "zift": "ZiftConfig", "screenstream": "ScreenstreamConfig", "ebanx": "EbanxConfig", "fiuu": "FiuuConfig", "globepay": "GlobepayConfig", "coinbase": "CoinbaseConfig", "coingate": "CoingateConfig", "revolv3": "Revolv3Config", "authorizedotnet": "AuthorizedotnetConfig", "peachpayments": "PeachpaymentsConfig", "paypal": "PaypalConfig", "truelayer": "TruelayerConfig", "fiservcommercehub": "FiservcommercehubConfig", "itaubank": "ItaubankConfig", "ppro": "PproConfig", "trustly": "TrustlyConfig", "absaSanlam": "AbsaSanlamConfig", "pinelabsOnline": "PinelabsOnlineConfig", "imerchantsolutions": "ImerchantsolutionsConfig", "axisbank": "AxisbankConfig", "easebuzz": "EasebuzzConfig", "twocTwopPaco": "TwocTwopPacoConfig", "bamboraapac": "BamboraapacConfig", "placetopay": "PlacetopayConfig", "finix": "FinixConfig", "aci": "AciConfig", "interpayments": "InterpaymentsConfig", "juspay": "JuspayConfig", "tamara": "TamaraConfig", "payconex": "PayconexConfig", "qwikcilver": "QwikcilverConfig", "checkout": "CheckoutConfig", "hyperswitch": "HyperswitchConfig", "tsysTransit": "TsysTransitConfig", "kount": "KountConfig", "affirm": "AffirmConfig", "flywire": "FlywireConfig", "glomopay": "GlomopayConfig" },
450
+ PaymentServiceTokenAuthorizeRequest: { "amount": "Money", "customer": "Customer", "address": "PaymentAddress", "browserInfo": "BrowserInformation", "state": "ConnectorState", "billingDescriptor": "BillingDescriptor", "l2L3Data": "L2L3Data", "customerAcceptance": "CustomerAcceptance" },
451
+ PaymentServiceTokenSetupRecurringRequest: { "amount": "Money", "customer": "Customer", "address": "PaymentAddress", "state": "ConnectorState", "customerAcceptance": "CustomerAcceptance", "setupMandateDetails": "SetupMandateDetails", "billingDescriptor": "BillingDescriptor" },
452
+ PaymentServiceProxyAuthorizeRequest: { "amount": "Money", "cardProxy": "ProxyCardDetails", "customer": "Customer", "address": "PaymentAddress", "authenticationData": "AuthenticationData", "browserInfo": "BrowserInformation", "state": "ConnectorState", "setupMandateDetails": "SetupMandateDetails", "billingDescriptor": "BillingDescriptor", "redirectionResponse": "RedirectionResponse", "l2L3Data": "L2L3Data", "customerAcceptance": "CustomerAcceptance", "domainData": "DomainData" },
453
+ PaymentServiceProxySetupRecurringRequest: { "amount": "Money", "cardProxy": "ProxyCardDetails", "customer": "Customer", "address": "PaymentAddress", "state": "ConnectorState", "setupMandateDetails": "SetupMandateDetails", "customerAcceptance": "CustomerAcceptance", "authenticationData": "AuthenticationData", "browserInfo": "BrowserInformation" },
454
+ SplitRefundsDetails: { "stripeSplitRefund": "StripeSplitRefundData", "adyenSplitRefund": "AdyenSplitData" },
455
+ StripeSplitRefundData: { "options": "ChargeRefundsOptions" },
456
+ ChargeRefundsOptions: { "destination": "DestinationChargeRefund", "direct": "DirectChargeRefund" },
457
+ AdyenSplitData: { "splitItems": "AdyenSplitItem" },
458
+ SplitPaymentsDetails: { "stripeSplitPayment": "StripeSplitPaymentData", "adyenSplitPayment": "AdyenSplitData" },
459
+ PaymentMethodServiceEligibilityRequest: { "amount": "Money", "customer": "Customer", "address": "PaymentAddress", "orderDetails": "OrderDetailsWithAmount" },
460
+ PaymentMethodServiceEligibilityResponse: { "errorInfo": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry" },
461
+ ConnectorSplitResponseData: { "stripeSplitResponse": "StripeSplitResponseData", "adyenSplitResponse": "AdyenSplitData" },
462
+ FrmServicePreRiskCheckRequest: { "amount": "Money", "customerInfo": "Customer", "paymentMethod": "PaymentMethod", "browserInfo": "BrowserInformation", "orderDetails": "OrderDetailsWithAmount", "address": "Address", "state": "ConnectorState", "mandateDetails": "MandateAmountData", "merchantDetails": "MerchantDetails" },
463
+ FrmServicePreRiskCheckResponse: { "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry" },
464
+ FrmServicePostRiskCheckRequest: { "amount": "Money", "customerInfo": "Customer", "paymentMethod": "PaymentMethod", "orderDetails": "OrderDetailsWithAmount", "state": "ConnectorState" },
465
+ FrmServicePostRiskCheckResponse: { "error": "ErrorInfo", "responseHeaders": "ResponseHeadersEntry" },
466
+ CompositeFrmPreRiskCheckRequest: { "amount": "Money", "customerInfo": "Customer", "paymentMethod": "PaymentMethod", "browserInfo": "BrowserInformation", "orderDetails": "OrderDetailsWithAmount", "address": "Address", "state": "ConnectorState", "mandateDetails": "MandateAmountData", "merchantDetails": "MerchantDetails" },
467
+ CompositeFrmPostRiskCheckRequest: { "amount": "Money", "customerInfo": "Customer", "paymentMethod": "PaymentMethod", "orderDetails": "OrderDetailsWithAmount", "state": "ConnectorState" },
468
+ CompositeFrmPreRiskCheckResponse: { "preRiskCheckResponse": "FrmServicePreRiskCheckResponse", "accessTokenResponse": "MerchantAuthenticationServiceCreateServerAuthenticationTokenResponse" },
469
+ CompositeFrmPostRiskCheckResponse: { "postRiskCheckResponse": "FrmServicePostRiskCheckResponse", "accessTokenResponse": "MerchantAuthenticationServiceCreateServerAuthenticationTokenResponse" },
470
+ PayoutAddress: { "shippingAddress": "Address", "billingAddress": "Address" },
471
+ PayoutMethod: { "card": "CardPayout", "ach": "AchBankTransferPayout", "bacs": "BacsBankTransferPayout", "sepa": "SepaBankTransferPayout", "pix": "PixBankTransferPayout", "applePayDecrypt": "ApplePayDecrypt", "paypal": "Paypal", "venmo": "Venmo", "interac": "InteracPayout", "openBankingUk": "OpenBankingUkPayout", "passthrough": "Passthrough", "pixKey": "PixKeyBankTransferPayout", "pixEmv": "PixEmvBankTransferPayout" },
472
+ SourceBankData: { "ach": "AchBankTransferPayout", "bacs": "BacsBankTransferPayout", "sepa": "SepaBankTransferPayout", "pix": "PixBankTransferPayout", "pixKey": "PixKeyBankTransferPayout", "pixEmv": "PixEmvBankTransferPayout" },
473
+ PayoutServiceCreateRequest: { "address": "PayoutAddress", "payoutMethodData": "PayoutMethod", "amount": "Money", "customer": "Customer", "browserInfo": "BrowserInformation", "sourceBankData": "SourceBankData" },
474
+ PayoutServiceCreateResponse: { "error": "ErrorInfo" },
475
+ PayoutServiceTransferRequest: { "address": "PayoutAddress", "payoutMethodData": "PayoutMethod", "amount": "Money", "customer": "Customer", "browserInfo": "BrowserInformation", "sourceBankData": "SourceBankData" },
476
+ PayoutServiceTransferResponse: { "error": "ErrorInfo" },
477
+ PayoutServiceStageRequest: { "address": "PayoutAddress", "amount": "Money", "customer": "Customer", "browserInfo": "BrowserInformation" },
478
+ PayoutServiceStageResponse: { "error": "ErrorInfo" },
479
+ PayoutServiceGetResponse: { "error": "ErrorInfo" },
480
+ PayoutServiceVoidRequest: { "address": "PayoutAddress" },
481
+ PayoutServiceVoidResponse: { "error": "ErrorInfo" },
482
+ PayoutServiceCreateLinkRequest: { "address": "PayoutAddress", "payoutMethodData": "PayoutMethod", "amount": "Money", "customer": "Customer", "browserInfo": "BrowserInformation", "sourceBankData": "SourceBankData" },
483
+ PayoutServiceCreateLinkResponse: { "error": "ErrorInfo" },
484
+ PayoutServiceCreateRecipientRequest: { "address": "PayoutAddress", "payoutMethodData": "PayoutMethod", "amount": "Money", "customer": "Customer" },
485
+ PayoutServiceCreateRecipientResponse: { "error": "ErrorInfo" },
486
+ PayoutServiceEnrollDisburseAccountRequest: { "address": "PayoutAddress", "payoutMethodData": "PayoutMethod", "amount": "Money", "customer": "Customer" },
487
+ PayoutServiceEnrollDisburseAccountResponse: { "error": "ErrorInfo" },
488
+ PayoutMethodEligibilityRequest: { "payoutMethodData": "PayoutMethod", "amount": "Money" },
489
+ PayoutMethodEligibilityResponse: { "error": "ErrorInfo" },
490
+ ConnectorConfig: { "connectorConfig": "ConnectorSpecificConfig", "options": "SdkOptions" },
491
+ RequestConfig: { "http": "HttpConfig", "vault": "VaultOptions" },
492
+ HttpConfig: { "proxy": "ProxyOptions", "caCert": "CaCert" },
493
+ FfiOptions: { "connectorConfig": "ConnectorSpecificConfig" },
494
+ FfiConnectorHttpRequest: { "headers": "HeadersEntry" },
495
+ FfiConnectorHttpResponse: { "headers": "HeadersEntry" },
496
+ ConnectorError: { "errorInfo": "ErrorInfo" },
497
+ FfiResult: { "httpRequest": "FfiConnectorHttpRequest", "httpResponse": "FfiConnectorHttpResponse", "integrationError": "IntegrationError", "connectorError": "ConnectorError" },
498
+ SurchargeServiceCalculateRequest: { "amount": "Money" },
499
+ SurchargeServiceCalculateResponse: { "surchargeAmount": "Money", "error": "ErrorInfo" },
500
+ };
501
+ function _wrapSecretStrings(obj, msgName) {
502
+ if (typeof obj !== "object" || obj === null)
503
+ return obj;
504
+ if (Array.isArray(obj))
505
+ return obj.map(item => _wrapSecretStrings(item, msgName));
506
+ const secretSet = new Set(_SECRET_STRING_FIELDS[msgName] ?? []);
507
+ const fieldTypes = _MSG_FIELD_TYPES[msgName] ?? {};
508
+ const result = {};
509
+ for (const [k, v] of Object.entries(obj)) {
510
+ if (secretSet.has(k) && typeof v === "string") {
511
+ result[k] = { value: v };
512
+ }
513
+ else if (typeof v === "string") {
514
+ const nestedType = fieldTypes[k];
515
+ if (nestedType) {
516
+ const nestedSecrets = _SECRET_STRING_FIELDS[nestedType];
517
+ if (nestedSecrets && nestedSecrets.length === 1) {
518
+ result[k] = { [nestedSecrets[0]]: { value: v } };
519
+ }
520
+ else {
521
+ result[k] = v;
522
+ }
523
+ }
524
+ else {
525
+ result[k] = v;
526
+ }
527
+ }
528
+ else if (typeof v === "object" && v !== null && !Array.isArray(v)) {
529
+ const nestedType = fieldTypes[k];
530
+ result[k] = nestedType ? _wrapSecretStrings(v, nestedType) : v;
531
+ }
532
+ else {
533
+ result[k] = v;
534
+ }
535
+ }
536
+ return result;
537
+ }
538
+ // ── Dispatch helper ───────────────────────────────────────────────────────────
539
+ function callGrpc(ffi, config, method, req, ReqType, ResType) {
540
+ const configBuf = Buffer.from(JSON.stringify(config));
541
+ const normalized = _wrapSecretStrings(req, ReqType.name);
542
+ const reqBuf = Buffer.from(ReqType.encode(ReqType.create(normalized)).finish());
543
+ const outLen = [0];
544
+ const ptr = ffi.call(method, configBuf, configBuf.length, reqBuf, reqBuf.length, outLen);
545
+ const len = outLen[0];
546
+ const rawBytes = Buffer.from(koffi_1.default.decode(ptr, "uint8", len));
547
+ ffi.free(ptr, len);
548
+ if (rawBytes[0] === 1) {
549
+ throw new Error(`gRPC error (${method}): ${rawBytes.slice(1).toString("utf-8")}`);
550
+ }
551
+ return ResType.decode(rawBytes.slice(1));
552
+ }
553
+ // ── Sub-clients (one per proto service) ──────────────────────────────────────
554
+ // CustomerService
555
+ class GrpcCustomerClient {
556
+ ffi;
557
+ config;
558
+ constructor(ffi, config) {
559
+ this.ffi = ffi;
560
+ this.config = config;
561
+ }
562
+ /** CustomerService.Create — Create customer record in the payment processor system. Stores customer details for future payment operations without re-sending personal information. */
563
+ async customerCreate(req) {
564
+ return callGrpc(this.ffi, this.config, "customer/customer_create", req, proto_js_1.types.CustomerServiceCreateRequest, proto_js_1.types.CustomerServiceCreateResponse);
565
+ }
566
+ /** CustomerService.Get — Retrieves customer details from the payment processor. Callers typically use this before Create to implement get-or-create semantics for connectors that reject duplicates (e.g. Glomopay). */
567
+ async customerGet(req) {
568
+ return callGrpc(this.ffi, this.config, "customer/customer_get", req, proto_js_1.types.CustomerServiceGetRequest, proto_js_1.types.CustomerServiceGetResponse);
569
+ }
570
+ }
571
+ exports.GrpcCustomerClient = GrpcCustomerClient;
572
+ // DisputeService
573
+ class GrpcDisputeClient {
574
+ ffi;
575
+ config;
576
+ constructor(ffi, config) {
577
+ this.ffi = ffi;
578
+ this.config = config;
579
+ }
580
+ /** DisputeService.SubmitEvidence — Upload evidence to dispute customer chargeback. Provides documentation like receipts and delivery proof to contest fraudulent transaction claims. */
581
+ async submitEvidence(req) {
582
+ return callGrpc(this.ffi, this.config, "dispute/submit_evidence", req, proto_js_1.types.DisputeServiceSubmitEvidenceRequest, proto_js_1.types.DisputeServiceSubmitEvidenceResponse);
583
+ }
584
+ /** DisputeService.Get — Retrieve dispute status and evidence submission state. Tracks dispute progress through bank review process for informed decision-making. */
585
+ async disputeGet(req) {
586
+ return callGrpc(this.ffi, this.config, "dispute/dispute_get", req, proto_js_1.types.DisputeServiceGetRequest, proto_js_1.types.DisputeResponse);
587
+ }
588
+ /** DisputeService.Defend — Submit defense with reason code for dispute. Presents formal argument against customer's chargeback claim with supporting documentation. */
589
+ async defend(req) {
590
+ return callGrpc(this.ffi, this.config, "dispute/defend", req, proto_js_1.types.DisputeServiceDefendRequest, proto_js_1.types.DisputeServiceDefendResponse);
591
+ }
592
+ /** DisputeService.Accept — Concede dispute and accepts chargeback loss. Acknowledges liability and stops dispute defense process when evidence is insufficient. */
593
+ async accept(req) {
594
+ return callGrpc(this.ffi, this.config, "dispute/accept", req, proto_js_1.types.DisputeServiceAcceptRequest, proto_js_1.types.DisputeServiceAcceptResponse);
595
+ }
596
+ }
597
+ exports.GrpcDisputeClient = GrpcDisputeClient;
598
+ // EventService
599
+ class GrpcEventClient {
600
+ ffi;
601
+ config;
602
+ constructor(ffi, config) {
603
+ this.ffi = ffi;
604
+ this.config = config;
605
+ }
606
+ /** EventService.ParseEvent — Parse a raw webhook payload without credentials. Returns resource reference and event type — sufficient to resolve secrets or early-exit. */
607
+ async parseEvent(req) {
608
+ return callGrpc(this.ffi, this.config, "event/parse_event", req, proto_js_1.types.EventServiceParseRequest, proto_js_1.types.EventServiceParseResponse);
609
+ }
610
+ /** EventService.HandleEvent — Verify webhook source and return a unified typed response. Response mirrors PaymentService.Get / RefundService.Get / DisputeService.Get. */
611
+ async handleEvent(req) {
612
+ return callGrpc(this.ffi, this.config, "event/handle_event", req, proto_js_1.types.EventServiceHandleRequest, proto_js_1.types.EventServiceHandleResponse);
613
+ }
614
+ /** EventService.NotifyConnector — Notify connectors about events (payment succeeded, refund succeeded, refund failed). */
615
+ async notifyConnector(req) {
616
+ return callGrpc(this.ffi, this.config, "event/notify_connector", req, proto_js_1.types.NotifyConnectorRequest, proto_js_1.types.NotifyConnectorResponse);
617
+ }
618
+ }
619
+ exports.GrpcEventClient = GrpcEventClient;
620
+ // FraudAndRiskManagementService
621
+ class GrpcFraudAndRiskManagementClient {
622
+ ffi;
623
+ config;
624
+ constructor(ffi, config) {
625
+ this.ffi = ffi;
626
+ this.config = config;
627
+ }
628
+ /** FraudAndRiskManagementService.PreRiskCheck — Evaluate fraud risk before payment processing. Analyzes transaction details, customer behavior, and device fingerprints to determine if the payment should proceed, be rejected, or flagged for manual review. */
629
+ async preRiskCheck(req) {
630
+ return callGrpc(this.ffi, this.config, "fraud_and_risk_management/pre_risk_check", req, proto_js_1.types.FrmServicePreRiskCheckRequest, proto_js_1.types.FrmServicePreRiskCheckResponse);
631
+ }
632
+ /** FraudAndRiskManagementService.PostRiskCheck — Evaluate fraud risk after payment processing. Analyzes payment outcomes and post-transaction signals to refine risk models and detect chargeback fraud. */
633
+ async postRiskCheck(req) {
634
+ return callGrpc(this.ffi, this.config, "fraud_and_risk_management/post_risk_check", req, proto_js_1.types.FrmServicePostRiskCheckRequest, proto_js_1.types.FrmServicePostRiskCheckResponse);
635
+ }
636
+ }
637
+ exports.GrpcFraudAndRiskManagementClient = GrpcFraudAndRiskManagementClient;
638
+ // MerchantAuthenticationService
639
+ class GrpcMerchantAuthenticationClient {
640
+ ffi;
641
+ config;
642
+ constructor(ffi, config) {
643
+ this.ffi = ffi;
644
+ this.config = config;
645
+ }
646
+ /** MerchantAuthenticationService.CreateServerAuthenticationToken — Generate short-lived connector authentication token. Provides secure credentials for connector API access without storing secrets client-side. */
647
+ async createServerAuthenticationToken(req) {
648
+ return callGrpc(this.ffi, this.config, "merchant_authentication/create_server_authentication_token", req, proto_js_1.types.MerchantAuthenticationServiceCreateServerAuthenticationTokenRequest, proto_js_1.types.MerchantAuthenticationServiceCreateServerAuthenticationTokenResponse);
649
+ }
650
+ /** MerchantAuthenticationService.CreateServerSessionAuthenticationToken — Create a server-side session with the connector. Establishes session state for multi-step operations like 3DS verification or wallet authorization. */
651
+ async createServerSessionAuthenticationToken(req) {
652
+ return callGrpc(this.ffi, this.config, "merchant_authentication/create_server_session_authentication_token", req, proto_js_1.types.MerchantAuthenticationServiceCreateServerSessionAuthenticationTokenRequest, proto_js_1.types.MerchantAuthenticationServiceCreateServerSessionAuthenticationTokenResponse);
653
+ }
654
+ /** MerchantAuthenticationService.CreateClientAuthenticationToken — Initialize client-facing SDK sessions for wallets, device fingerprinting, etc. Returns structured data the client SDK needs to render payment/verification UI. */
655
+ async createClientAuthenticationToken(req) {
656
+ return callGrpc(this.ffi, this.config, "merchant_authentication/create_client_authentication_token", req, proto_js_1.types.MerchantAuthenticationServiceCreateClientAuthenticationTokenRequest, proto_js_1.types.MerchantAuthenticationServiceCreateClientAuthenticationTokenResponse);
657
+ }
658
+ }
659
+ exports.GrpcMerchantAuthenticationClient = GrpcMerchantAuthenticationClient;
660
+ // PaymentMethodAuthenticationService
661
+ class GrpcPaymentMethodAuthenticationClient {
662
+ ffi;
663
+ config;
664
+ constructor(ffi, config) {
665
+ this.ffi = ffi;
666
+ this.config = config;
667
+ }
668
+ /** PaymentMethodAuthenticationService.PreAuthenticate — Initiate 3DS flow before payment authorization. Collects device data and prepares authentication context for frictionless or challenge-based verification. */
669
+ async preAuthenticate(req) {
670
+ return callGrpc(this.ffi, this.config, "payment_method_authentication/pre_authenticate", req, proto_js_1.types.PaymentMethodAuthenticationServicePreAuthenticateRequest, proto_js_1.types.PaymentMethodAuthenticationServicePreAuthenticateResponse);
671
+ }
672
+ /** PaymentMethodAuthenticationService.Authenticate — Execute 3DS challenge or frictionless verification. Authenticates customer via bank challenge or behind-the-scenes verification for fraud prevention. */
673
+ async authenticate(req) {
674
+ return callGrpc(this.ffi, this.config, "payment_method_authentication/authenticate", req, proto_js_1.types.PaymentMethodAuthenticationServiceAuthenticateRequest, proto_js_1.types.PaymentMethodAuthenticationServiceAuthenticateResponse);
675
+ }
676
+ /** PaymentMethodAuthenticationService.PostAuthenticate — Validate authentication results with the issuing bank. Processes bank's authentication decision to determine if payment can proceed. */
677
+ async postAuthenticate(req) {
678
+ return callGrpc(this.ffi, this.config, "payment_method_authentication/post_authenticate", req, proto_js_1.types.PaymentMethodAuthenticationServicePostAuthenticateRequest, proto_js_1.types.PaymentMethodAuthenticationServicePostAuthenticateResponse);
679
+ }
680
+ }
681
+ exports.GrpcPaymentMethodAuthenticationClient = GrpcPaymentMethodAuthenticationClient;
682
+ // PaymentMethodService
683
+ class GrpcPaymentMethodClient {
684
+ ffi;
685
+ config;
686
+ constructor(ffi, config) {
687
+ this.ffi = ffi;
688
+ this.config = config;
689
+ }
690
+ /** PaymentMethodService.Tokenize — Tokenize payment method for secure storage. Replaces raw card details with secure token for one-click payments and recurring billing. */
691
+ async tokenize(req) {
692
+ return callGrpc(this.ffi, this.config, "payment_method/tokenize", req, proto_js_1.types.PaymentMethodServiceTokenizeRequest, proto_js_1.types.PaymentMethodServiceTokenizeResponse);
693
+ }
694
+ /** PaymentMethodService.Create — Create payment method at connector. Establishes a new payment method and returns connector-specific details. */
695
+ async create(req) {
696
+ return callGrpc(this.ffi, this.config, "payment_method/create", req, proto_js_1.types.PaymentMethodServiceCreateRequest, proto_js_1.types.PaymentMethodServiceCreateResponse);
697
+ }
698
+ /** PaymentMethodService.Get — Retrieve payment method details from the payment processor. */
699
+ async paymentMethodGet(req) {
700
+ return callGrpc(this.ffi, this.config, "payment_method/payment_method_get", req, proto_js_1.types.PaymentMethodServiceGetRequest, proto_js_1.types.PaymentMethodServiceGetResponse);
701
+ }
702
+ /** PaymentMethodService.Recharge — Recharge a payment method (wallet, gift card, prepaid card) with funds. */
703
+ async recharge(req) {
704
+ return callGrpc(this.ffi, this.config, "payment_method/recharge", req, proto_js_1.types.PaymentMethodServiceRechargeRequest, proto_js_1.types.PaymentMethodServiceRechargeResponse);
705
+ }
706
+ /** PaymentMethodService.Eligibility — Check if the payment method is eligible for the transaction (e.g. BNPL pre-checkout check) */
707
+ async eligibility(req) {
708
+ return callGrpc(this.ffi, this.config, "payment_method/eligibility", req, proto_js_1.types.PaymentMethodServiceEligibilityRequest, proto_js_1.types.PaymentMethodServiceEligibilityResponse);
709
+ }
710
+ }
711
+ exports.GrpcPaymentMethodClient = GrpcPaymentMethodClient;
712
+ // PaymentService
713
+ class GrpcPaymentClient {
714
+ ffi;
715
+ config;
716
+ constructor(ffi, config) {
717
+ this.ffi = ffi;
718
+ this.config = config;
719
+ }
720
+ /** PaymentService.Authorize — Authorize a payment amount on a payment method. This reserves funds without capturing them, essential for verifying availability before finalizing. */
721
+ async authorize(req) {
722
+ return callGrpc(this.ffi, this.config, "payment/authorize", req, proto_js_1.types.PaymentServiceAuthorizeRequest, proto_js_1.types.PaymentServiceAuthorizeResponse);
723
+ }
724
+ /** PaymentService.Get — Retrieve current payment status from the payment processor. Enables synchronization between your system and payment processors for accurate state tracking. */
725
+ async get(req) {
726
+ return callGrpc(this.ffi, this.config, "payment/get", req, proto_js_1.types.PaymentServiceGetRequest, proto_js_1.types.PaymentServiceGetResponse);
727
+ }
728
+ /** PaymentService.Void — Cancel an authorized payment that has not been captured. Releases held funds back to the customer's payment method when a transaction cannot be completed. */
729
+ async void(req) {
730
+ return callGrpc(this.ffi, this.config, "payment/void", req, proto_js_1.types.PaymentServiceVoidRequest, proto_js_1.types.PaymentServiceVoidResponse);
731
+ }
732
+ /** PaymentService.Reverse — Reverse a captured payment in full. Initiates a complete refund when you need to cancel a settled transaction rather than just an authorization. */
733
+ async reverse(req) {
734
+ return callGrpc(this.ffi, this.config, "payment/reverse", req, proto_js_1.types.PaymentServiceReverseRequest, proto_js_1.types.PaymentServiceReverseResponse);
735
+ }
736
+ /** PaymentService.Capture — Finalize an authorized payment by transferring funds. Captures the authorized amount to complete the transaction and move funds to your merchant account. */
737
+ async capture(req) {
738
+ return callGrpc(this.ffi, this.config, "payment/capture", req, proto_js_1.types.PaymentServiceCaptureRequest, proto_js_1.types.PaymentServiceCaptureResponse);
739
+ }
740
+ /** PaymentService.CreateOrder — Create a payment order for later processing. Establishes a transaction context that can be authorized or captured in subsequent API calls. */
741
+ async createOrder(req) {
742
+ return callGrpc(this.ffi, this.config, "payment/create_order", req, proto_js_1.types.PaymentServiceCreateOrderRequest, proto_js_1.types.PaymentServiceCreateOrderResponse);
743
+ }
744
+ /** PaymentService.Refund — Process a partial or full refund for a captured payment. Returns funds to the customer when goods are returned or services are cancelled. */
745
+ async refund(req) {
746
+ return callGrpc(this.ffi, this.config, "payment/refund", req, proto_js_1.types.PaymentServiceRefundRequest, proto_js_1.types.RefundResponse);
747
+ }
748
+ /** PaymentService.IncrementalAuthorization — Increase the authorized amount for an existing payment. Enables you to capture additional funds when the transaction amount changes after initial authorization. */
749
+ async incrementalAuthorization(req) {
750
+ return callGrpc(this.ffi, this.config, "payment/incremental_authorization", req, proto_js_1.types.PaymentServiceIncrementalAuthorizationRequest, proto_js_1.types.PaymentServiceIncrementalAuthorizationResponse);
751
+ }
752
+ /** PaymentService.VerifyRedirectResponse — Verify and process redirect responses from 3D Secure or other external flows. Validates authentication results and updates payment state accordingly. */
753
+ async verifyRedirectResponse(req) {
754
+ return callGrpc(this.ffi, this.config, "payment/verify_redirect_response", req, proto_js_1.types.PaymentServiceVerifyRedirectResponseRequest, proto_js_1.types.PaymentServiceVerifyRedirectResponseResponse);
755
+ }
756
+ /** PaymentService.SetupRecurring — Configure a payment method for recurring billing. Sets up the mandate and payment details needed for future automated charges. */
757
+ async setupRecurring(req) {
758
+ return callGrpc(this.ffi, this.config, "payment/setup_recurring", req, proto_js_1.types.PaymentServiceSetupRecurringRequest, proto_js_1.types.PaymentServiceSetupRecurringResponse);
759
+ }
760
+ /** PaymentService.TokenAuthorize — Authorize using a connector-issued payment method token. */
761
+ async tokenAuthorize(req) {
762
+ return callGrpc(this.ffi, this.config, "payment/token_authorize", req, proto_js_1.types.PaymentServiceTokenAuthorizeRequest, proto_js_1.types.PaymentServiceAuthorizeResponse);
763
+ }
764
+ /** PaymentService.TokenSetupRecurring — Setup a recurring mandate using a connector token. */
765
+ async tokenSetupRecurring(req) {
766
+ return callGrpc(this.ffi, this.config, "payment/token_setup_recurring", req, proto_js_1.types.PaymentServiceTokenSetupRecurringRequest, proto_js_1.types.PaymentServiceSetupRecurringResponse);
767
+ }
768
+ /** PaymentService.ProxyAuthorize — Authorize using vault-aliased card data. Proxy substitutes before connector. */
769
+ async proxyAuthorize(req) {
770
+ return callGrpc(this.ffi, this.config, "payment/proxy_authorize", req, proto_js_1.types.PaymentServiceProxyAuthorizeRequest, proto_js_1.types.PaymentServiceAuthorizeResponse);
771
+ }
772
+ /** PaymentService.ProxySetupRecurring — Setup recurring mandate using vault-aliased card data. */
773
+ async proxySetupRecurring(req) {
774
+ return callGrpc(this.ffi, this.config, "payment/proxy_setup_recurring", req, proto_js_1.types.PaymentServiceProxySetupRecurringRequest, proto_js_1.types.PaymentServiceSetupRecurringResponse);
775
+ }
776
+ }
777
+ exports.GrpcPaymentClient = GrpcPaymentClient;
778
+ // PayoutService
779
+ class GrpcPayoutClient {
780
+ ffi;
781
+ config;
782
+ constructor(ffi, config) {
783
+ this.ffi = ffi;
784
+ this.config = config;
785
+ }
786
+ /** PayoutService.Create — Creates a payout. */
787
+ async payoutCreate(req) {
788
+ return callGrpc(this.ffi, this.config, "payout/payout_create", req, proto_js_1.types.PayoutServiceCreateRequest, proto_js_1.types.PayoutServiceCreateResponse);
789
+ }
790
+ /** PayoutService.Transfer — Creates a payout fund transfer. */
791
+ async transfer(req) {
792
+ return callGrpc(this.ffi, this.config, "payout/transfer", req, proto_js_1.types.PayoutServiceTransferRequest, proto_js_1.types.PayoutServiceTransferResponse);
793
+ }
794
+ /** PayoutService.Get — Retrieve payout details. */
795
+ async payoutGet(req) {
796
+ return callGrpc(this.ffi, this.config, "payout/payout_get", req, proto_js_1.types.PayoutServiceGetRequest, proto_js_1.types.PayoutServiceGetResponse);
797
+ }
798
+ /** PayoutService.Void — Void a payout. */
799
+ async payoutVoid(req) {
800
+ return callGrpc(this.ffi, this.config, "payout/payout_void", req, proto_js_1.types.PayoutServiceVoidRequest, proto_js_1.types.PayoutServiceVoidResponse);
801
+ }
802
+ /** PayoutService.Stage — Stage the payout. */
803
+ async stage(req) {
804
+ return callGrpc(this.ffi, this.config, "payout/stage", req, proto_js_1.types.PayoutServiceStageRequest, proto_js_1.types.PayoutServiceStageResponse);
805
+ }
806
+ /** PayoutService.CreateLink — Creates a link between the recipient and the payout. */
807
+ async createLink(req) {
808
+ return callGrpc(this.ffi, this.config, "payout/create_link", req, proto_js_1.types.PayoutServiceCreateLinkRequest, proto_js_1.types.PayoutServiceCreateLinkResponse);
809
+ }
810
+ /** PayoutService.CreateRecipient — Create payout recipient. */
811
+ async createRecipient(req) {
812
+ return callGrpc(this.ffi, this.config, "payout/create_recipient", req, proto_js_1.types.PayoutServiceCreateRecipientRequest, proto_js_1.types.PayoutServiceCreateRecipientResponse);
813
+ }
814
+ /** PayoutService.EnrollDisburseAccount — Enroll disburse account. */
815
+ async enrollDisburseAccount(req) {
816
+ return callGrpc(this.ffi, this.config, "payout/enroll_disburse_account", req, proto_js_1.types.PayoutServiceEnrollDisburseAccountRequest, proto_js_1.types.PayoutServiceEnrollDisburseAccountResponse);
817
+ }
818
+ /** PayoutService.Eligibility — Check if the payout method is eligible for the transaction */
819
+ async payoutEligibility(req) {
820
+ return callGrpc(this.ffi, this.config, "payout/payout_eligibility", req, proto_js_1.types.PayoutMethodEligibilityRequest, proto_js_1.types.PayoutMethodEligibilityResponse);
821
+ }
822
+ }
823
+ exports.GrpcPayoutClient = GrpcPayoutClient;
824
+ // RecurringPaymentService
825
+ class GrpcRecurringPaymentClient {
826
+ ffi;
827
+ config;
828
+ constructor(ffi, config) {
829
+ this.ffi = ffi;
830
+ this.config = config;
831
+ }
832
+ /** RecurringPaymentService.Charge — Charge using an existing stored recurring payment instruction. Processes repeat payments for subscriptions or recurring billing without collecting payment details. */
833
+ async charge(req) {
834
+ return callGrpc(this.ffi, this.config, "recurring_payment/charge", req, proto_js_1.types.RecurringPaymentServiceChargeRequest, proto_js_1.types.RecurringPaymentServiceChargeResponse);
835
+ }
836
+ /** RecurringPaymentService.Revoke — Cancel an existing recurring payment mandate. Stops future automatic charges on customer's stored consent for subscription cancellations. */
837
+ async revoke(req) {
838
+ return callGrpc(this.ffi, this.config, "recurring_payment/revoke", req, proto_js_1.types.RecurringPaymentServiceRevokeRequest, proto_js_1.types.RecurringPaymentServiceRevokeResponse);
839
+ }
840
+ }
841
+ exports.GrpcRecurringPaymentClient = GrpcRecurringPaymentClient;
842
+ // RefundService
843
+ class GrpcRefundClient {
844
+ ffi;
845
+ config;
846
+ constructor(ffi, config) {
847
+ this.ffi = ffi;
848
+ this.config = config;
849
+ }
850
+ /** RefundService.Get — Retrieve refund status from the payment processor. Tracks refund progress through processor settlement for accurate customer communication. */
851
+ async refundGet(req) {
852
+ return callGrpc(this.ffi, this.config, "refund/refund_get", req, proto_js_1.types.RefundServiceGetRequest, proto_js_1.types.RefundResponse);
853
+ }
854
+ /** RefundService.VoidPostRefund — Void/reverse a refund before processor settlement. */
855
+ async voidPostRefund(req) {
856
+ return callGrpc(this.ffi, this.config, "refund/void_post_refund", req, proto_js_1.types.RefundServiceVoidPostRefundRequest, proto_js_1.types.RefundResponse);
857
+ }
858
+ }
859
+ exports.GrpcRefundClient = GrpcRefundClient;
860
+ // SurchargeService
861
+ class GrpcSurchargeClient {
862
+ ffi;
863
+ config;
864
+ constructor(ffi, config) {
865
+ this.ffi = ffi;
866
+ this.config = config;
867
+ }
868
+ /** SurchargeService.Calculate — Calculate surcharge fees for a payment amount before processing. */
869
+ async calculate(req) {
870
+ return callGrpc(this.ffi, this.config, "surcharge/calculate", req, proto_js_1.types.SurchargeServiceCalculateRequest, proto_js_1.types.SurchargeServiceCalculateResponse);
871
+ }
872
+ }
873
+ exports.GrpcSurchargeClient = GrpcSurchargeClient;
874
+ // ── Top-level GrpcClient ──────────────────────────────────────────────────────
875
+ class GrpcClient {
876
+ customer;
877
+ dispute;
878
+ event;
879
+ fraudAndRiskManagement;
880
+ merchantAuthentication;
881
+ paymentMethodAuthentication;
882
+ paymentMethod;
883
+ payment;
884
+ payout;
885
+ recurringPayment;
886
+ refund;
887
+ surcharge;
888
+ constructor(config, libPath) {
889
+ const ffi = loadGrpcFfi(libPath);
890
+ this.customer = new GrpcCustomerClient(ffi, config);
891
+ this.dispute = new GrpcDisputeClient(ffi, config);
892
+ this.event = new GrpcEventClient(ffi, config);
893
+ this.fraudAndRiskManagement = new GrpcFraudAndRiskManagementClient(ffi, config);
894
+ this.merchantAuthentication = new GrpcMerchantAuthenticationClient(ffi, config);
895
+ this.paymentMethodAuthentication = new GrpcPaymentMethodAuthenticationClient(ffi, config);
896
+ this.paymentMethod = new GrpcPaymentMethodClient(ffi, config);
897
+ this.payment = new GrpcPaymentClient(ffi, config);
898
+ this.payout = new GrpcPayoutClient(ffi, config);
899
+ this.recurringPayment = new GrpcRecurringPaymentClient(ffi, config);
900
+ this.refund = new GrpcRefundClient(ffi, config);
901
+ this.surcharge = new GrpcSurchargeClient(ffi, config);
902
+ }
903
+ }
904
+ exports.GrpcClient = GrpcClient;
905
+ //# sourceMappingURL=_generated_grpc_client.js.map