mangopay4-nodejs-sdk 1.64.0
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/.github/workflows/node.js.yml +32 -0
- package/.github/workflows/npm-publish.yml +26 -0
- package/.jshintrc +16 -0
- package/CHANGELOG.md +946 -0
- package/LICENSE +21 -0
- package/README.md +179 -0
- package/docs/BankAccounts.md +35 -0
- package/docs/BankingAliases.md +108 -0
- package/docs/CardPreAuthorizations.md +55 -0
- package/docs/CardRegistrations.md +55 -0
- package/docs/Cards.md +82 -0
- package/docs/Clients.md +142 -0
- package/docs/DisputeDocuments.md +53 -0
- package/docs/Disputes.md +292 -0
- package/docs/Events.md +23 -0
- package/docs/Hooks.md +68 -0
- package/docs/Idempotency.md +11 -0
- package/docs/KycDocuments.md +52 -0
- package/docs/Mandates.md +125 -0
- package/docs/OptionsHelper.md +32 -0
- package/docs/PayIns.md +72 -0
- package/docs/PayOuts.md +55 -0
- package/docs/README.md +131 -0
- package/docs/Refunds.md +25 -0
- package/docs/Reports.md +63 -0
- package/docs/Repudiations.md +25 -0
- package/docs/Responses.md +33 -0
- package/docs/Transfers.md +72 -0
- package/docs/UboDeclarations.md +70 -0
- package/docs/Users.md +322 -0
- package/docs/Wallets.md +70 -0
- package/docs/templates/class.mustache +11 -0
- package/docs/templates/file.mustache +53 -0
- package/docs/templates/function.mustache +33 -0
- package/docs/templates/index.mustache +26 -0
- package/docs/templates/overview.mustache +1 -0
- package/examples/createUsers.js +112 -0
- package/examples/createWallet.js +28 -0
- package/examples/failedRequest.js +20 -0
- package/examples/getBankAccounts.js +29 -0
- package/examples/getUserEmoney.js +16 -0
- package/examples/getUsers.js +32 -0
- package/examples/readResponseHeaders.js +42 -0
- package/index.js +1 -0
- package/lib/Model.js +58 -0
- package/lib/api.js +467 -0
- package/lib/apiMethods.js +270 -0
- package/lib/config.js +57 -0
- package/lib/log.js +9 -0
- package/lib/mangopay.js +8 -0
- package/lib/models/Address.js +32 -0
- package/lib/models/BankAccount.js +45 -0
- package/lib/models/BankAccountDetails.js +7 -0
- package/lib/models/BankAccountDetailsCA.js +12 -0
- package/lib/models/BankAccountDetailsGB.js +10 -0
- package/lib/models/BankAccountDetailsIBAN.js +10 -0
- package/lib/models/BankAccountDetailsOTHER.js +16 -0
- package/lib/models/BankAccountDetailsUS.js +14 -0
- package/lib/models/BankAccountType.js +8 -0
- package/lib/models/BankingAlias.js +37 -0
- package/lib/models/BankingAliasIBAN.js +27 -0
- package/lib/models/Billing.js +14 -0
- package/lib/models/BinData.js +16 -0
- package/lib/models/Birthplace.js +10 -0
- package/lib/models/BrowserInfo.js +15 -0
- package/lib/models/Card.js +19 -0
- package/lib/models/CardInfo.js +32 -0
- package/lib/models/CardPreAuthorization.js +144 -0
- package/lib/models/CardRegistration.js +29 -0
- package/lib/models/CardValidation.js +19 -0
- package/lib/models/CategorizeUserLegal.js +15 -0
- package/lib/models/CategorizeUserNatural.js +18 -0
- package/lib/models/Check.js +13 -0
- package/lib/models/CheckData.js +8 -0
- package/lib/models/Client.js +62 -0
- package/lib/models/ClientWallet.js +28 -0
- package/lib/models/Conversion.js +19 -0
- package/lib/models/ConversionRate.js +10 -0
- package/lib/models/CountryAuthorization.js +12 -0
- package/lib/models/DebitedBankAccount.js +15 -0
- package/lib/models/DeclaredUbo.js +29 -0
- package/lib/models/DeclaredUboStatus.js +17 -0
- package/lib/models/Deposit.js +29 -0
- package/lib/models/Dispute.js +46 -0
- package/lib/models/DisputeDocument.js +10 -0
- package/lib/models/DisputeDocumentPage.js +12 -0
- package/lib/models/DisputeReason.js +11 -0
- package/lib/models/Document.js +12 -0
- package/lib/models/DocumentPageConsult.js +17 -0
- package/lib/models/EMoney.js +30 -0
- package/lib/models/EntityBase.js +70 -0
- package/lib/models/Hook.js +19 -0
- package/lib/models/IdempotencyResponse.js +11 -0
- package/lib/models/IdentityVerification.js +12 -0
- package/lib/models/KycDocument.js +11 -0
- package/lib/models/KycDocumentStatus.js +7 -0
- package/lib/models/KycDocumentType.js +7 -0
- package/lib/models/KycPage.js +12 -0
- package/lib/models/LegalPersonType.js +7 -0
- package/lib/models/LegalRepresentative.js +16 -0
- package/lib/models/Mandate.js +69 -0
- package/lib/models/MandateStatus.js +7 -0
- package/lib/models/Money.js +16 -0
- package/lib/models/PayByBankSupportedBank.js +7 -0
- package/lib/models/PayIn.js +36 -0
- package/lib/models/PayInExecutionDetails.js +7 -0
- package/lib/models/PayInExecutionDetailsBankingAlias.js +19 -0
- package/lib/models/PayInExecutionDetailsDirect.js +29 -0
- package/lib/models/PayInExecutionDetailsWeb.js +40 -0
- package/lib/models/PayInExecutionType.js +5 -0
- package/lib/models/PayInIntent.js +20 -0
- package/lib/models/PayInIntentSplit.js +14 -0
- package/lib/models/PayInIntentSplits.js +7 -0
- package/lib/models/PayInPaymentDetails.js +7 -0
- package/lib/models/PayInPaymentDetailsApplePay.js +19 -0
- package/lib/models/PayInPaymentDetailsBancontact.js +13 -0
- package/lib/models/PayInPaymentDetailsBankWire.js +23 -0
- package/lib/models/PayInPaymentDetailsBankingAlias.js +18 -0
- package/lib/models/PayInPaymentDetailsBizum.js +23 -0
- package/lib/models/PayInPaymentDetailsBlik.js +17 -0
- package/lib/models/PayInPaymentDetailsCard.js +10 -0
- package/lib/models/PayInPaymentDetailsCardDirect.js +14 -0
- package/lib/models/PayInPaymentDetailsCardWeb.js +28 -0
- package/lib/models/PayInPaymentDetailsDirectDebitDirect.js +22 -0
- package/lib/models/PayInPaymentDetailsDirectDebitWeb.js +13 -0
- package/lib/models/PayInPaymentDetailsGiropay.js +15 -0
- package/lib/models/PayInPaymentDetailsGooglePay.js +35 -0
- package/lib/models/PayInPaymentDetailsIdeal.js +25 -0
- package/lib/models/PayInPaymentDetailsKlarna.js +36 -0
- package/lib/models/PayInPaymentDetailsMbway.js +20 -0
- package/lib/models/PayInPaymentDetailsMultibanco.js +14 -0
- package/lib/models/PayInPaymentDetailsPayByBank.js +71 -0
- package/lib/models/PayInPaymentDetailsPayPal.js +63 -0
- package/lib/models/PayInPaymentDetailsPayconiq.js +23 -0
- package/lib/models/PayInPaymentDetailsPreAuthorized.js +10 -0
- package/lib/models/PayInPaymentDetailsSatispay.js +19 -0
- package/lib/models/PayInPaymentDetailsSwish.js +35 -0
- package/lib/models/PayInPaymentDetailsTwint.js +15 -0
- package/lib/models/PayInPaymentType.js +21 -0
- package/lib/models/PayInRecurringRegistration.js +64 -0
- package/lib/models/PayInTemplateURLOptions.js +10 -0
- package/lib/models/PayOut.js +24 -0
- package/lib/models/PayOutPaymentDetails.js +7 -0
- package/lib/models/PayOutPaymentDetailsBankWire.js +32 -0
- package/lib/models/PayOutPaymentType.js +3 -0
- package/lib/models/PaymentData.js +20 -0
- package/lib/models/PaymentMethodMetadata.js +38 -0
- package/lib/models/PayoutMethods.js +7 -0
- package/lib/models/PendingUserAction.js +16 -0
- package/lib/models/PersonType.js +5 -0
- package/lib/models/PlatformCategorization.js +16 -0
- package/lib/models/PlatformType.js +10 -0
- package/lib/models/Quote.js +11 -0
- package/lib/models/Recipient.js +20 -0
- package/lib/models/RecipientSchema.js +17 -0
- package/lib/models/RecurringPayIn.js +10 -0
- package/lib/models/RecurringPayInCIT.js +32 -0
- package/lib/models/RecurringPayInCurrentState.js +24 -0
- package/lib/models/RecurringPayInMIT.js +27 -0
- package/lib/models/RecurringPayInPut.js +24 -0
- package/lib/models/Refund.js +26 -0
- package/lib/models/RefundReasonDetails.js +10 -0
- package/lib/models/Report.js +54 -0
- package/lib/models/ReportFilter.js +52 -0
- package/lib/models/ReportFilterV2.js +11 -0
- package/lib/models/ReportV2.js +28 -0
- package/lib/models/Repudiation.js +51 -0
- package/lib/models/SecurityInfo.js +12 -0
- package/lib/models/Settlement.js +16 -0
- package/lib/models/SettlementTransfer.js +37 -0
- package/lib/models/Shipping.js +14 -0
- package/lib/models/ShippingAddress.js +25 -0
- package/lib/models/ShippingPreference.js +5 -0
- package/lib/models/Transaction.js +50 -0
- package/lib/models/Transfer.js +13 -0
- package/lib/models/Ubo.js +19 -0
- package/lib/models/UboDeclaration.js +42 -0
- package/lib/models/UboDeclarationRefusedReasonType.js +23 -0
- package/lib/models/UboDeclarationStatus.js +26 -0
- package/lib/models/UboRefusedReasonType.js +14 -0
- package/lib/models/User.js +66 -0
- package/lib/models/UserCategory.js +5 -0
- package/lib/models/UserConsent.js +7 -0
- package/lib/models/UserDataFormatValidation.js +7 -0
- package/lib/models/UserEnrollmentResult.js +7 -0
- package/lib/models/UserLegal.js +65 -0
- package/lib/models/UserLegalOwner.js +66 -0
- package/lib/models/UserLegalPayer.js +66 -0
- package/lib/models/UserLegalSca.js +57 -0
- package/lib/models/UserNatural.js +51 -0
- package/lib/models/UserNaturalCapacity.js +13 -0
- package/lib/models/UserNaturalOwner.js +55 -0
- package/lib/models/UserNaturalPayer.js +55 -0
- package/lib/models/UserNaturalPut.js +49 -0
- package/lib/models/UserNaturalSca.js +56 -0
- package/lib/models/VirtualAccount.js +22 -0
- package/lib/models/Wallet.js +32 -0
- package/lib/models/index.js +102 -0
- package/lib/service.js +14 -0
- package/lib/services/BankAccounts.js +31 -0
- package/lib/services/BankingAliases.js +137 -0
- package/lib/services/CardPreAuthorizations.js +75 -0
- package/lib/services/CardRegistrations.js +64 -0
- package/lib/services/Cards.js +168 -0
- package/lib/services/Clients.js +196 -0
- package/lib/services/Conversions.js +155 -0
- package/lib/services/Deposits.js +109 -0
- package/lib/services/DisputeDocuments.js +65 -0
- package/lib/services/Disputes.js +409 -0
- package/lib/services/Events.js +24 -0
- package/lib/services/Hooks.js +81 -0
- package/lib/services/Idempotency.js +17 -0
- package/lib/services/IdentityVerifications.js +48 -0
- package/lib/services/KycDocuments.js +66 -0
- package/lib/services/Mandates.js +161 -0
- package/lib/services/OptionsHelper.js +20 -0
- package/lib/services/PayIns.js +690 -0
- package/lib/services/PayOuts.js +110 -0
- package/lib/services/Recipients.js +117 -0
- package/lib/services/Refunds.js +29 -0
- package/lib/services/Regulatory.js +29 -0
- package/lib/services/Reports.js +61 -0
- package/lib/services/ReportsV2.js +55 -0
- package/lib/services/Repudiations.js +33 -0
- package/lib/services/Responses.js +23 -0
- package/lib/services/Settlements.js +74 -0
- package/lib/services/Transfers.js +87 -0
- package/lib/services/UboDeclarations.js +135 -0
- package/lib/services/Users.js +831 -0
- package/lib/services/VirtualAccounts.js +99 -0
- package/lib/services/Wallets.js +85 -0
- package/lib/services/index.js +34 -0
- package/lib/utils.js +36 -0
- package/package.json +40 -0
- package/test/TestKycPageFile.png +0 -0
- package/test/helpers.js +1431 -0
- package/test/main.js +10 -0
- package/test/mocha.opts +3 -0
- package/test/services/BankAccounts.js +46 -0
- package/test/services/BankingAliases.js +89 -0
- package/test/services/CardPreAuthorizations.js +70 -0
- package/test/services/CardRegistrations.js +239 -0
- package/test/services/Cards.js +54 -0
- package/test/services/Clients.js +235 -0
- package/test/services/Conversions.js +308 -0
- package/test/services/Deposits.js +148 -0
- package/test/services/Disputes.js +542 -0
- package/test/services/EMoney.js +54 -0
- package/test/services/Events.js +143 -0
- package/test/services/Hooks.js +109 -0
- package/test/services/Idempotency.js +46 -0
- package/test/services/IdentityVerifications.js +68 -0
- package/test/services/KycDocuments.js +73 -0
- package/test/services/Mandates.js +256 -0
- package/test/services/PayIns.js +2553 -0
- package/test/services/PayOuts.js +106 -0
- package/test/services/RateLimit.js +48 -0
- package/test/services/Recipients.js +234 -0
- package/test/services/Refunds.js +123 -0
- package/test/services/Regulatory.js +45 -0
- package/test/services/Reports.js +114 -0
- package/test/services/ReportsV2.js +306 -0
- package/test/services/Repudiations.js +22 -0
- package/test/services/Settlements.js +58 -0
- package/test/services/Tokens.js +55 -0
- package/test/services/Transfers.js +137 -0
- package/test/services/UboDeclarations.js +135 -0
- package/test/services/Users.js +1303 -0
- package/test/services/VirtualAccounts.js +105 -0
- package/test/services/Wallets.js +132 -0
- package/test/settlement_sample.csv +8 -0
- package/typings/base.d.ts +308 -0
- package/typings/enums.d.ts +204 -0
- package/typings/index.d.ts +885 -0
- package/typings/index.test-d.ts +1535 -0
- package/typings/models/address.d.ts +70 -0
- package/typings/models/bankAccount.d.ts +235 -0
- package/typings/models/bankingAlias.d.ts +97 -0
- package/typings/models/billing.d.ts +42 -0
- package/typings/models/birthplace.d.ts +9 -0
- package/typings/models/card.d.ts +119 -0
- package/typings/models/cardPreauthorization.d.ts +157 -0
- package/typings/models/cardRegistration.d.ts +83 -0
- package/typings/models/cardValidation.d.ts +125 -0
- package/typings/models/client.d.ts +208 -0
- package/typings/models/conversion.d.ts +225 -0
- package/typings/models/conversionRate.d.ts +29 -0
- package/typings/models/countryAuthorization.d.ts +16 -0
- package/typings/models/deposit.d.ts +104 -0
- package/typings/models/dispute.d.ts +116 -0
- package/typings/models/disputeDocument.d.ts +119 -0
- package/typings/models/entityBase.d.ts +9 -0
- package/typings/models/event.d.ts +142 -0
- package/typings/models/hook.d.ts +39 -0
- package/typings/models/idempotency.d.ts +36 -0
- package/typings/models/identityVerification.d.ts +98 -0
- package/typings/models/kycDocument.d.ts +114 -0
- package/typings/models/mandate.d.ts +93 -0
- package/typings/models/money.d.ts +45 -0
- package/typings/models/payIn.d.ts +3742 -0
- package/typings/models/payOut.d.ts +144 -0
- package/typings/models/recipient.d.ts +242 -0
- package/typings/models/refund.d.ts +92 -0
- package/typings/models/report.d.ts +234 -0
- package/typings/models/reportV2.d.ts +145 -0
- package/typings/models/repudiation.d.ts +26 -0
- package/typings/models/securityInfo.d.ts +12 -0
- package/typings/models/settlement.d.ts +50 -0
- package/typings/models/settlementTransfer.d.ts +37 -0
- package/typings/models/shipping.d.ts +37 -0
- package/typings/models/shippingAddress.d.ts +15 -0
- package/typings/models/transaction.d.ts +85 -0
- package/typings/models/transfer.d.ts +119 -0
- package/typings/models/uboDeclaration.d.ts +100 -0
- package/typings/models/user.d.ts +1001 -0
- package/typings/models/virtualAccount.d.ts +182 -0
- package/typings/models/wallet.d.ts +46 -0
- package/typings/models.d.ts +74 -0
- package/typings/services/BankAccounts.d.ts +12 -0
- package/typings/services/BankingAliases.d.ts +51 -0
- package/typings/services/CardPreauthorizations.d.ts +44 -0
- package/typings/services/CardRegistrations.d.ts +43 -0
- package/typings/services/Cards.d.ts +80 -0
- package/typings/services/Clients.d.ts +77 -0
- package/typings/services/Conversions.d.ts +23 -0
- package/typings/services/Deposits.d.ts +20 -0
- package/typings/services/DisputeDocuments.d.ts +27 -0
- package/typings/services/Disputes.d.ts +169 -0
- package/typings/services/Events.d.ts +11 -0
- package/typings/services/Hooks.d.ts +33 -0
- package/typings/services/Idempotency.d.ts +7 -0
- package/typings/services/IdentityVerifications.d.ts +29 -0
- package/typings/services/KycDocuments.d.ts +38 -0
- package/typings/services/Mandates.d.ts +59 -0
- package/typings/services/OptionsHelper.d.ts +11 -0
- package/typings/services/PayIns.d.ts +319 -0
- package/typings/services/PayOuts.d.ts +34 -0
- package/typings/services/Recipients.d.ts +55 -0
- package/typings/services/Refunds.d.ts +12 -0
- package/typings/services/Regulatory.d.ts +17 -0
- package/typings/services/Reports.d.ts +26 -0
- package/typings/services/ReportsV2.d.ts +26 -0
- package/typings/services/Repudiations.d.ts +12 -0
- package/typings/services/Responses.d.ts +10 -0
- package/typings/services/Settlements.d.ts +28 -0
- package/typings/services/Transfers.d.ts +38 -0
- package/typings/services/UboDeclarations.d.ts +81 -0
- package/typings/services/Users.d.ts +308 -0
- package/typings/services/VirtualAccounts.d.ts +42 -0
- package/typings/services/Wallets.d.ts +36 -0
- package/typings/tsconfig.json +20 -0
- package/typings/tslint.json +11 -0
- package/typings/types.d.ts +652 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { CountryISO, PickPartialRequired, SecureMode, Timestamp } from "../types";
|
|
2
|
+
import { entityBase } from "./entityBase";
|
|
3
|
+
import { billing } from "./billing";
|
|
4
|
+
import { base } from "../base";
|
|
5
|
+
import { money } from "./money";
|
|
6
|
+
import { securityInfo } from "./securityInfo";
|
|
7
|
+
import { shipping } from "./shipping";
|
|
8
|
+
import { card } from "./card";
|
|
9
|
+
|
|
10
|
+
export namespace cardPreAuthorization {
|
|
11
|
+
import BillingData = billing.BillingData;
|
|
12
|
+
import BrowserInfoData = base.BrowserInfoData;
|
|
13
|
+
import MoneyData = money.MoneyData;
|
|
14
|
+
import SecurityInfoData = securityInfo.SecurityInfoData;
|
|
15
|
+
import ShippingData = shipping.ShippingData;
|
|
16
|
+
import CardInfoData = card.CardInfoData;
|
|
17
|
+
|
|
18
|
+
type PreAuthorizationExecutionType = "DIRECT";
|
|
19
|
+
|
|
20
|
+
type PaymentStatus = "WAITING" | "CANCELED" | "EXPIRED" | "VALIDATED";
|
|
21
|
+
|
|
22
|
+
type PreAuthorizationStatus = "CREATED" | "SUCCEEDED" | "FAILED";
|
|
23
|
+
|
|
24
|
+
type CreateCardPreAuthorization = PickPartialRequired<CardPreAuthorizationData,
|
|
25
|
+
"Tag" | "Billing" | "SecureMode" | "Culture" | "StatementDescriptor" | "Shipping" | "PaymentCategory", "AuthorId" | "DebitedFunds" | "CardId" | "SecureModeReturnURL" | "IpAddress" | "BrowserInfo">;
|
|
26
|
+
|
|
27
|
+
type UpdateCardPreAuthorization = PickPartialRequired<CardPreAuthorizationData,
|
|
28
|
+
"Tag",
|
|
29
|
+
"PaymentStatus" | "Id">;
|
|
30
|
+
|
|
31
|
+
interface CardPreAuthorizationData extends entityBase.EntityBaseData {
|
|
32
|
+
/**
|
|
33
|
+
* A user's ID
|
|
34
|
+
*/
|
|
35
|
+
AuthorId: string;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Information about the funds that are being debited
|
|
39
|
+
*/
|
|
40
|
+
DebitedFunds: MoneyData;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Value of the funds remaining on a pre-authorization
|
|
44
|
+
*/
|
|
45
|
+
RemainingFunds: MoneyData;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Status of the PreAuthorization
|
|
49
|
+
*/
|
|
50
|
+
Status: PreAuthorizationStatus;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The status of the payment after the PreAuthorization. You can pass the PaymentStatus from "WAITING" to "CANCELED" should you need/want to
|
|
54
|
+
*/
|
|
55
|
+
PaymentStatus: PaymentStatus;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* The result code
|
|
59
|
+
*/
|
|
60
|
+
ResultCode: string;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* A verbal explanation of the ResultCode
|
|
64
|
+
*/
|
|
65
|
+
ResultMessage: string;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* How the PreAuthorization has been executed
|
|
69
|
+
*/
|
|
70
|
+
ExecutionType: PreAuthorizationExecutionType;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The SecureMode corresponds to '3D secure' for CB Visa and MasterCard. This field lets you activate it manually.
|
|
74
|
+
* The field lets you activate it automatically with "DEFAULT" (Secured Mode will be activated from €50 or when MANGOPAY detects there is a higher risk ),
|
|
75
|
+
* "FORCE" (if you wish to specifically force the secured mode).
|
|
76
|
+
*/
|
|
77
|
+
SecureMode: SecureMode;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The language to use for the payment page - needs to be the ISO code of the language
|
|
81
|
+
*/
|
|
82
|
+
Culture: CountryISO;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The ID of a card
|
|
86
|
+
*/
|
|
87
|
+
CardId: string;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* The value is 'true' if the SecureMode was used
|
|
91
|
+
*/
|
|
92
|
+
SecureModeNeeded: boolean;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* This is the URL where to redirect users to proceed to 3D secure validation
|
|
96
|
+
*/
|
|
97
|
+
SecureModeRedirectURL: string;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* This is the URL where users are automatically redirected after 3D secure validation (if activated)
|
|
101
|
+
*/
|
|
102
|
+
SecureModeReturnURL: string;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* A custom description to appear on the user's bank statement.
|
|
106
|
+
* It can be up to 10 characters long, and can only include alphanumeric characters or spaces.
|
|
107
|
+
* See here for important info. Note that each bank handles this information differently, some show less or no information.
|
|
108
|
+
*/
|
|
109
|
+
StatementDescriptor: string;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* The date when the payment is to be processed by
|
|
113
|
+
*/
|
|
114
|
+
ExpirationDate: Timestamp;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* The Id of the associated PayIn
|
|
118
|
+
*/
|
|
119
|
+
PayInId: string;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Contains useful information related to the user billing
|
|
123
|
+
*/
|
|
124
|
+
Billing: BillingData;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Contains useful information related to security and fraud
|
|
128
|
+
*/
|
|
129
|
+
SecurityInfo: SecurityInfoData;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* IP Address of the end user (format IPV4 or IPV6)
|
|
133
|
+
*/
|
|
134
|
+
IpAddress: string;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* This object describes the Browser being user by an end user
|
|
138
|
+
*/
|
|
139
|
+
BrowserInfo: BrowserInfoData;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Contains every useful information's related to the user shipping
|
|
143
|
+
*/
|
|
144
|
+
Shipping: ShippingData;
|
|
145
|
+
|
|
146
|
+
CardInfo: CardInfoData;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments:
|
|
150
|
+
*
|
|
151
|
+
* ECommerce – Payment received online.
|
|
152
|
+
*
|
|
153
|
+
* TelephoneOrder – Payment received via mail order or telephone order (MOTO).
|
|
154
|
+
*/
|
|
155
|
+
PaymentCategory: string;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { CurrencyISO, PickPartial, PickPartialRequired } from "../types";
|
|
2
|
+
import { card } from "./card";
|
|
3
|
+
import { entityBase } from "./entityBase";
|
|
4
|
+
|
|
5
|
+
export namespace cardRegistration {
|
|
6
|
+
type UpdateCardRegistration = {
|
|
7
|
+
/**
|
|
8
|
+
* The unique identifier of the Card Registration object.
|
|
9
|
+
*/
|
|
10
|
+
Id: string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The string returned by the tokenization server after the Tokenize the card call is made.
|
|
14
|
+
*/
|
|
15
|
+
RegistrationData: string;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The cardholder’s name shown on the payment card
|
|
19
|
+
*/
|
|
20
|
+
CardHolderName?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface CardRegistrationData extends entityBase.EntityBaseData {
|
|
24
|
+
/**
|
|
25
|
+
* The object owner's UserId
|
|
26
|
+
*/
|
|
27
|
+
UserId: string;
|
|
28
|
+
/**
|
|
29
|
+
* The currency - should be ISO_4217 format
|
|
30
|
+
*/
|
|
31
|
+
Currency: CurrencyISO;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* A special key to use when registering a card
|
|
35
|
+
*/
|
|
36
|
+
AccessKey: string;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* A specific value to pass to the CardRegistrationURL
|
|
40
|
+
*/
|
|
41
|
+
PreregistrationData: string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The URL to submit the card details form to
|
|
45
|
+
*/
|
|
46
|
+
CardRegistrationURL: string;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Having registered a card, this confirmation hash needs to be updated to the card item
|
|
50
|
+
*/
|
|
51
|
+
RegistrationData: string;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The type of card
|
|
55
|
+
*/
|
|
56
|
+
CardType: card.CardType;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The ID of a card
|
|
60
|
+
*/
|
|
61
|
+
CardId: string;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The result code
|
|
65
|
+
*/
|
|
66
|
+
ResultCode: string;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* A verbal explanation of the ResultCode
|
|
70
|
+
*/
|
|
71
|
+
ResultMessage: string;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Status of the card registration
|
|
75
|
+
*/
|
|
76
|
+
Status: card.CardStatus;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
interface CreateCardRegistration extends PickPartialRequired<CardRegistrationData,
|
|
80
|
+
"CardType" | "Tag",
|
|
81
|
+
"UserId" | "Currency"> {
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { card } from "./card";
|
|
2
|
+
import { entityBase } from "./entityBase";
|
|
3
|
+
import { transaction } from "./transaction";
|
|
4
|
+
import { base } from "../base";
|
|
5
|
+
import { payIn } from "./payIn";
|
|
6
|
+
import { SecureMode } from "../types";
|
|
7
|
+
|
|
8
|
+
export namespace cardValidation {
|
|
9
|
+
interface CardValidationData extends entityBase.EntityBaseData {
|
|
10
|
+
/**
|
|
11
|
+
* The unique identifier of the user at the source of the transaction.
|
|
12
|
+
*/
|
|
13
|
+
AuthorId: string;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The status of the transaction.
|
|
17
|
+
*/
|
|
18
|
+
Status: transaction.TransactionStatus;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the SecureModeNeeded parameter is set to true).
|
|
22
|
+
*/
|
|
23
|
+
SecureModeReturnURL: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The URL to which users are to be redirected to proceed to 3DS2 validation.
|
|
27
|
+
*/
|
|
28
|
+
SecureModeRedirectURL: string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Whether or not the SecureMode was used.
|
|
32
|
+
*/
|
|
33
|
+
SecureModeNeeded: boolean;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard
|
|
37
|
+
*/
|
|
38
|
+
SecureMode: SecureMode;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The IP address of the end user initiating the transaction, in IPV4 or IPV6 format.
|
|
42
|
+
*/
|
|
43
|
+
IpAddress: string;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Information about the browser used by the end user (author) to perform the payment.
|
|
47
|
+
*/
|
|
48
|
+
BrowserInfo: base.BrowserInfoData;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Whether the card is valid or not.
|
|
52
|
+
*/
|
|
53
|
+
Validity: card.CardValidity;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* The type of transaction. In the specific case of the Card Validation object, this value indicates a transaction made to perform a strong customer authentication without debiting the card.
|
|
57
|
+
*/
|
|
58
|
+
Type: transaction.TransactionType;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The 3DS protocol version applied to the transaction.
|
|
62
|
+
*/
|
|
63
|
+
Applied3DSVersion: payIn._3DSVersion;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes.
|
|
67
|
+
*/
|
|
68
|
+
ResultCode: string;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* The explanation of the result code.
|
|
72
|
+
*/
|
|
73
|
+
ResultMessage: string;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments:
|
|
77
|
+
*
|
|
78
|
+
* ECommerce – Payment received online.
|
|
79
|
+
*
|
|
80
|
+
* TelephoneOrder – Payment received via mail order or telephone order (MOTO).
|
|
81
|
+
*/
|
|
82
|
+
PaymentCategory: string;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
interface CreateCardValidation {
|
|
86
|
+
/**
|
|
87
|
+
* The unique identifier of the user at the source of the transaction.
|
|
88
|
+
*/
|
|
89
|
+
AuthorId: string;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the SecureModeNeeded parameter is set to true).
|
|
93
|
+
*/
|
|
94
|
+
SecureModeReturnURL: string;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard
|
|
98
|
+
*/
|
|
99
|
+
SecureMode?: SecureMode;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* The IP address of the end user initiating the transaction, in IPV4 or IPV6 format.
|
|
103
|
+
*/
|
|
104
|
+
IpAddress: string;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Information about the browser used by the end user (author) to perform the payment.
|
|
108
|
+
*/
|
|
109
|
+
BrowserInfo: base.BrowserInfoData;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Custom data that you can add to this object.
|
|
113
|
+
*/
|
|
114
|
+
Tag?: string;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments:
|
|
118
|
+
*
|
|
119
|
+
* ECommerce – Payment received online.
|
|
120
|
+
*
|
|
121
|
+
* TelephoneOrder – Payment received via mail order or telephone order (MOTO).
|
|
122
|
+
*/
|
|
123
|
+
PaymentCategory?: string;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { ValueOf } from "../types";
|
|
2
|
+
import { enums } from "../enums";
|
|
3
|
+
import { address } from "./address";
|
|
4
|
+
import { entityBase } from "./entityBase";
|
|
5
|
+
import { money } from "./money";
|
|
6
|
+
|
|
7
|
+
export namespace client {
|
|
8
|
+
import MoneyData = money.MoneyData;
|
|
9
|
+
|
|
10
|
+
type BusinessType = "MARKETPLACE" | "CROWDFUNDING" | "FRANCHISE" | "OTHER";
|
|
11
|
+
|
|
12
|
+
type Sector =
|
|
13
|
+
| "RENTALS"
|
|
14
|
+
| "STORES_FASHION_ACCESSORIES_OBJECTS"
|
|
15
|
+
| "BEAUTY_COSMETICS_HEALTH"
|
|
16
|
+
| "FOOD_WINE_RESTAURANTS"
|
|
17
|
+
| "HOSPITALITY_TRAVEL_CORIDING"
|
|
18
|
+
| "ART_MUSIC_ENTERTAINMENT"
|
|
19
|
+
| "FURNITURE_GARDEN"
|
|
20
|
+
| "SERVICES_JOBBING_EDUCATION"
|
|
21
|
+
| "SPORT_RECREATION_ACTIVITIES"
|
|
22
|
+
| "TICKETING"
|
|
23
|
+
| "LOAN"
|
|
24
|
+
| "EQUITY"
|
|
25
|
+
| "PROPERTY_EQUITY"
|
|
26
|
+
| "REWARDS_CHARITY"
|
|
27
|
+
| "POOL_GROUP_PAYMENT"
|
|
28
|
+
| "FRANCHISE_"
|
|
29
|
+
| "OTHER_";
|
|
30
|
+
|
|
31
|
+
type PlatformType = ValueOf<enums.IPlatformType>;
|
|
32
|
+
|
|
33
|
+
interface PlatformCategorization {
|
|
34
|
+
Sector: Sector;
|
|
35
|
+
|
|
36
|
+
BusinessType: BusinessType;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
interface ClientData extends entityBase.EntityBaseData {
|
|
40
|
+
/**
|
|
41
|
+
* The pretty name for the client
|
|
42
|
+
*/
|
|
43
|
+
Name: string;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The registered name of your company
|
|
47
|
+
*/
|
|
48
|
+
RegisteredName: string;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* An ID for the client (i.e. url friendly, lowercase etc - sort of namespace identifier)
|
|
52
|
+
*/
|
|
53
|
+
ClientId: string;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* The primary branding colour to use for your merchant
|
|
57
|
+
*/
|
|
58
|
+
PrimaryThemeColour: string;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The primary branding colour to use for buttons for your merchant
|
|
62
|
+
*/
|
|
63
|
+
PrimaryButtonColour: string;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* The URL of the logo of your client
|
|
67
|
+
*/
|
|
68
|
+
Logo: string;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* A list of email addresses to use when contacting you for technical issues/communications
|
|
72
|
+
*/
|
|
73
|
+
TechEmails: string[];
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* A list of email addresses to use when contacting you for admin/commercial issues/communications
|
|
77
|
+
*/
|
|
78
|
+
AdminEmails: string[];
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* A list of email addresses to use when contacting you for fraud/compliance issues/communications
|
|
82
|
+
*/
|
|
83
|
+
FraudEmails: string[];
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* A list of email addresses to use when contacting you for billing issues/communications
|
|
87
|
+
*/
|
|
88
|
+
BillingEmails: string[];
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The Categorization of your platform, in terms of Business Type and Sector
|
|
92
|
+
*/
|
|
93
|
+
PlatformCategorization: PlatformCategorization;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* A description of what your platform does
|
|
97
|
+
*/
|
|
98
|
+
PlatformDescription: string;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* The URL for your website
|
|
102
|
+
*/
|
|
103
|
+
PlatformURL: string;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* The address of the company’s headquarters
|
|
107
|
+
*/
|
|
108
|
+
HeadquartersAddress: address.AddressType;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* The phone number of the company's headquarters
|
|
112
|
+
*/
|
|
113
|
+
HeadquartersPhoneNumber: string;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The tax (or VAT) number for your company
|
|
117
|
+
*/
|
|
118
|
+
TaxNumber: string;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Your unique MANGOPAY reference which you should use when contacting us
|
|
122
|
+
*/
|
|
123
|
+
CompanyReference: string;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The licensor of the platform’s company account, indicating the Mangopay entity the platform contracted with
|
|
127
|
+
*/
|
|
128
|
+
Licensor: string;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
interface UpdateClient {
|
|
132
|
+
/**
|
|
133
|
+
* The primary branding colour to use for buttons for your merchant
|
|
134
|
+
*/
|
|
135
|
+
PrimaryButtonColour?: string;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* The primary branding colour to use for your merchant
|
|
139
|
+
*/
|
|
140
|
+
PrimaryThemeColour?: string;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* A list of email addresses to use when contacting you for admin/commercial issues/communications
|
|
144
|
+
*/
|
|
145
|
+
AdminEmails?: string[];
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* A list of email addresses to use when contacting you for technical issues/communications
|
|
149
|
+
*/
|
|
150
|
+
TechEmails?: string[];
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* A list of email addresses to use when contacting you for billing issues/communications
|
|
154
|
+
*/
|
|
155
|
+
BillingEmails?: string[];
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* A list of email addresses to use when contacting you for fraud/compliance issues/communications
|
|
159
|
+
*/
|
|
160
|
+
FraudEmails?: string[];
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* The address of the company’s headquarters
|
|
164
|
+
*/
|
|
165
|
+
HeadquartersAddress?: address.AddressType;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* The tax (or VAT) number for your company
|
|
169
|
+
*/
|
|
170
|
+
TaxNumber?: string;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* The type of platform
|
|
174
|
+
*/
|
|
175
|
+
PlatformType?: PlatformType;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* A description of what your platform does
|
|
179
|
+
*/
|
|
180
|
+
PlatformDescription?: string;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* The URL for your website
|
|
184
|
+
*/
|
|
185
|
+
PlatformURL?: string;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
interface UpdateClientLogo {
|
|
189
|
+
/**
|
|
190
|
+
* The base64 encoded file which needs to be uploaded
|
|
191
|
+
*/
|
|
192
|
+
File: string;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
interface CreateBankWireDirectPayIn {
|
|
196
|
+
/**
|
|
197
|
+
* The unique identifier of the credited wallet.
|
|
198
|
+
* In the case of the direct bank wire to the Repudiation Wallet,
|
|
199
|
+
* this value has the format CREDIT_CCY where CCY is the currency of the Client Wallet to be credited (e.g., CREDIT_EUR).
|
|
200
|
+
*/
|
|
201
|
+
CreditedWalletId: string;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Information about the declared funds to be wired by the platform to the returned bank account.
|
|
205
|
+
*/
|
|
206
|
+
DeclaredDebitedFunds: MoneyData;
|
|
207
|
+
}
|
|
208
|
+
}
|