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,1001 @@
|
|
|
1
|
+
import {CountryISO, MakeKeysRequired, PickPartial, Timestamp} from "../types";
|
|
2
|
+
import { address } from "./address";
|
|
3
|
+
import { entityBase } from "./entityBase";
|
|
4
|
+
|
|
5
|
+
export namespace user {
|
|
6
|
+
/**
|
|
7
|
+
* Should be only one of these values:
|
|
8
|
+
* 1 - for incomes <18K€),
|
|
9
|
+
* 2 - for incomes between 18 and 30K€,
|
|
10
|
+
* 3 - for incomes between 30 and 50K€,
|
|
11
|
+
* 4 - for incomes between 50 and 80K€,
|
|
12
|
+
* 5 - for incomes between 80 and 120K€,
|
|
13
|
+
* 6 - for incomes >120K€
|
|
14
|
+
*/
|
|
15
|
+
type IncomeRange = 1 | 2 | 3 | 4 | 5 | 6;
|
|
16
|
+
|
|
17
|
+
type PersonType = "NATURAL" | "LEGAL";
|
|
18
|
+
|
|
19
|
+
type KYCLevel = "LIGHT" | "REGULAR";
|
|
20
|
+
|
|
21
|
+
type LegalPersonType = "BUSINESS" | "ORGANIZATION" | "SOLETRADER" | "PARTNERSHIP";
|
|
22
|
+
|
|
23
|
+
type StaticKeys =
|
|
24
|
+
| "KYCLevel"
|
|
25
|
+
| "PersonType"
|
|
26
|
+
| "Id"
|
|
27
|
+
| "CreationDate"
|
|
28
|
+
| "ProofOfIdentity"
|
|
29
|
+
| "ProofOfAddress"
|
|
30
|
+
| "ProofOfRegistration"
|
|
31
|
+
| "LegalRepresentativeProofOfIdentity"
|
|
32
|
+
| "ShareholderDeclaration"
|
|
33
|
+
| "Statute";
|
|
34
|
+
|
|
35
|
+
type RequiredUserLegalData =
|
|
36
|
+
| "LegalPersonType"
|
|
37
|
+
| "Name"
|
|
38
|
+
| "LegalRepresentativeBirthday"
|
|
39
|
+
| "LegalRepresentativeCountryOfResidence"
|
|
40
|
+
| "LegalRepresentativeNationality"
|
|
41
|
+
| "LegalRepresentativeFirstName"
|
|
42
|
+
| "LegalRepresentativeLastName"
|
|
43
|
+
| "Email";
|
|
44
|
+
|
|
45
|
+
type RequiredUserNaturalData =
|
|
46
|
+
| "FirstName"
|
|
47
|
+
| "LastName"
|
|
48
|
+
| "Birthday"
|
|
49
|
+
| "Nationality"
|
|
50
|
+
| "CountryOfResidence"
|
|
51
|
+
| "Email";
|
|
52
|
+
|
|
53
|
+
type RequiredUserNaturalPayerData =
|
|
54
|
+
| "FirstName"
|
|
55
|
+
| "LastName"
|
|
56
|
+
| "Email";
|
|
57
|
+
|
|
58
|
+
type RequiredUserNaturalScaData =
|
|
59
|
+
| "FirstName"
|
|
60
|
+
| "LastName"
|
|
61
|
+
| "Email"
|
|
62
|
+
| "TermsAndConditionsAccepted"
|
|
63
|
+
| "UserCategory"
|
|
64
|
+
|
|
65
|
+
type RequiredUserLegalScaData =
|
|
66
|
+
| "Name"
|
|
67
|
+
| "LegalPersonType"
|
|
68
|
+
| "LegalRepresentative"
|
|
69
|
+
| "Email"
|
|
70
|
+
| "TermsAndConditionsAccepted"
|
|
71
|
+
| "UserCategory"
|
|
72
|
+
|
|
73
|
+
type RequiredUserNaturalOwnerData =
|
|
74
|
+
| "FirstName"
|
|
75
|
+
| "LastName"
|
|
76
|
+
| "Email"
|
|
77
|
+
| "Birthday"
|
|
78
|
+
| "Nationality"
|
|
79
|
+
| "CountryOfResidence"
|
|
80
|
+
| "TermsAndConditionsAccepted";
|
|
81
|
+
|
|
82
|
+
type RequiredUserLegalPayerData =
|
|
83
|
+
| "LegalPersonType"
|
|
84
|
+
| "Name"
|
|
85
|
+
| "LegalRepresentativeFirstName"
|
|
86
|
+
| "LegalRepresentativeLastName"
|
|
87
|
+
| "Email";
|
|
88
|
+
|
|
89
|
+
type RequiredUserLegalOwnerData =
|
|
90
|
+
| "HeadquartersAddress"
|
|
91
|
+
| "LegalPersonType"
|
|
92
|
+
| "Name"
|
|
93
|
+
| "LegalRepresentativeBirthday"
|
|
94
|
+
| "LegalRepresentativeCountryOfResidence"
|
|
95
|
+
| "LegalRepresentativeNationality"
|
|
96
|
+
| "LegalRepresentativeFirstName"
|
|
97
|
+
| "LegalRepresentativeLastName"
|
|
98
|
+
| "Email"
|
|
99
|
+
| "CompanyNumber"
|
|
100
|
+
| "TermsAndConditionsAccepted";
|
|
101
|
+
|
|
102
|
+
type UserCategory = "PAYER" | "OWNER" | "PLATFORM";
|
|
103
|
+
|
|
104
|
+
interface UserData extends entityBase.EntityBaseData {
|
|
105
|
+
/**
|
|
106
|
+
* Type of user
|
|
107
|
+
*/
|
|
108
|
+
PersonType: PersonType;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* The person's email address (not more than 12 consecutive numbers) - must be a valid email
|
|
112
|
+
*/
|
|
113
|
+
Email: string;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* KYC Level (LIGHT or REGULAR)
|
|
117
|
+
*/
|
|
118
|
+
KYCLevel: KYCLevel;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Whether or not the user has accepted the MANGOPAY Terms and Conditions.
|
|
122
|
+
*/
|
|
123
|
+
TermsAndConditionsAccepted?: boolean;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The date when the user has accepted the MANGOPAY Terms and Conditions.
|
|
127
|
+
*/
|
|
128
|
+
TermsAndConditionsAcceptedDate?: number;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Category of the user. May take one of the following values:
|
|
132
|
+
* PAYER - Users who only use MANGOPAY to give money to other users
|
|
133
|
+
* OWNER - Users who use MANGOPAY to receive funds. Please note that a user needs to be KYC validated to perform payouts
|
|
134
|
+
*/
|
|
135
|
+
UserCategory?: UserCategory;
|
|
136
|
+
|
|
137
|
+
UserStatus?: string;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
interface UserLegalData extends UserData {
|
|
141
|
+
PersonType: "LEGAL";
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* The name of the legal user
|
|
145
|
+
*/
|
|
146
|
+
Name: string;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Type for legal user.
|
|
150
|
+
*/
|
|
151
|
+
LegalPersonType: LegalPersonType;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* The address of the company’s headquarters
|
|
155
|
+
*/
|
|
156
|
+
HeadquartersAddress: address.AddressType;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* The first name of the company’s Legal representative person
|
|
160
|
+
*/
|
|
161
|
+
LegalRepresentativeFirstName: string;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* The last name of the company’s Legal representative person
|
|
165
|
+
*/
|
|
166
|
+
LegalRepresentativeLastName: string;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* The address of the company’s Legal representative person
|
|
170
|
+
*/
|
|
171
|
+
LegalRepresentativeAddress: address.AddressType;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* The email of the company’s Legal representative person - must be valid
|
|
175
|
+
*/
|
|
176
|
+
LegalRepresentativeEmail: string;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* The date of birth of the company’s Legal representative person - be careful to set the right timezone (should be UTC) to avoid 00h becoming 23h (and hence interpreted as the day before)
|
|
180
|
+
*/
|
|
181
|
+
LegalRepresentativeBirthday: Timestamp;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* The nationality of the company’s Legal representative person
|
|
185
|
+
*/
|
|
186
|
+
LegalRepresentativeNationality: CountryISO;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* The country of residence of the company’s Legal representative person
|
|
190
|
+
*/
|
|
191
|
+
LegalRepresentativeCountryOfResidence: CountryISO;
|
|
192
|
+
|
|
193
|
+
ProofOfIdentity: string | null;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* The business statute of the company
|
|
197
|
+
*/
|
|
198
|
+
Statute: string | null;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* A MANGOPAY reference to the validated document of the proof of registration of the company
|
|
202
|
+
*/
|
|
203
|
+
ProofOfRegistration: string | null;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* The shareholder declaration of the company
|
|
207
|
+
*/
|
|
208
|
+
ShareholderDeclaration: string | null;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* The official registered number of the business
|
|
212
|
+
*/
|
|
213
|
+
CompanyNumber: string;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
interface UserNaturalData extends UserData {
|
|
217
|
+
PersonType: "NATURAL";
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* The name of the user
|
|
221
|
+
*/
|
|
222
|
+
FirstName: string;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* The last name of the user
|
|
226
|
+
*/
|
|
227
|
+
LastName: string;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* The user address
|
|
231
|
+
*/
|
|
232
|
+
Address: string | address.AddressData;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* The date of birth of the user - be careful to set the right timezone (should be UTC) to avoid 00h becoming 23h (and hence interpreted as the day before)
|
|
236
|
+
*/
|
|
237
|
+
Birthday: Timestamp;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* The user’s nationality. ISO 3166-1 alpha-2 format is expected
|
|
241
|
+
*/
|
|
242
|
+
Nationality: CountryISO;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* The user’s country of residence. ISO 3166-1 alpha-2 format is expected
|
|
246
|
+
*/
|
|
247
|
+
CountryOfResidence: CountryISO;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* User’s occupation, ie. Work
|
|
251
|
+
*/
|
|
252
|
+
Occupation: string;
|
|
253
|
+
|
|
254
|
+
IncomeRange: IncomeRange;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Maximum length is 255 characters
|
|
258
|
+
*/
|
|
259
|
+
ProofOfIdentity: string | null;
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Maximum length is 255 characters
|
|
263
|
+
*/
|
|
264
|
+
ProofOfAddress: string | null;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* The capacity of this user - for use with UBO declarations
|
|
268
|
+
*/
|
|
269
|
+
Capacity: "NORMAL" | "DECLARATIVE";
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
interface UserNaturalScaData extends UserData {
|
|
273
|
+
PersonType: "NATURAL";
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* The name of the user
|
|
277
|
+
*/
|
|
278
|
+
FirstName: string;
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* The last name of the user
|
|
282
|
+
*/
|
|
283
|
+
LastName: string;
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* The user address
|
|
287
|
+
*/
|
|
288
|
+
Address: string | address.AddressData;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* The date of birth of the user - be careful to set the right timezone (should be UTC)
|
|
292
|
+
* to avoid 00h becoming 23h (and hence interpreted as the day before)
|
|
293
|
+
*/
|
|
294
|
+
Birthday: Timestamp;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* The user’s nationality. ISO 3166-1 alpha-2 format is expected
|
|
298
|
+
*/
|
|
299
|
+
Nationality: CountryISO;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* The user’s country of residence. ISO 3166-1 alpha-2 format is expected
|
|
303
|
+
*/
|
|
304
|
+
CountryOfResidence: CountryISO;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* User’s occupation, ie. Work
|
|
308
|
+
*/
|
|
309
|
+
Occupation: string;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Income range
|
|
313
|
+
*/
|
|
314
|
+
IncomeRange: IncomeRange;
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Maximum length is 255 characters
|
|
318
|
+
*/
|
|
319
|
+
ProofOfIdentity: string | null;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Maximum length is 255 characters
|
|
323
|
+
*/
|
|
324
|
+
ProofOfAddress: string | null;
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Format: International telephone numbering plan E.164 (+ then country code then the number) or local format
|
|
328
|
+
*
|
|
329
|
+
* Required if UserCategory is OWNER.
|
|
330
|
+
*
|
|
331
|
+
* The individual’s phone number.
|
|
332
|
+
*
|
|
333
|
+
* If the international format is sent, the PhoneNumberCountry value is not taken into account.
|
|
334
|
+
*
|
|
335
|
+
* We recommend that you use the PhoneNumberCountry parameter to ensure the correct rendering
|
|
336
|
+
* in line with the E.164 standard.
|
|
337
|
+
*
|
|
338
|
+
* Caution: If UserCategory is OWNER, modifying this value means the user will be required to re-enroll
|
|
339
|
+
* the new value in SCA via the PendingUserAction.RedirectUrl.
|
|
340
|
+
* For more details see the <a href="https://docs.mangopay.com/guides/users/sca/enrollment">SCA</a> guides.
|
|
341
|
+
*/
|
|
342
|
+
PhoneNumber: string;
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Allowed values: Two-letter country code (ISO 3166-1 alpha-2 format).
|
|
346
|
+
*
|
|
347
|
+
* Required if the PhoneNumber is provided in local format.
|
|
348
|
+
*
|
|
349
|
+
* The country code of the PhoneNumber, used to render the value in the E.164 standard.
|
|
350
|
+
*
|
|
351
|
+
* Caution: If UserCategory is OWNER, modifying this value means the user will be required to re-enroll
|
|
352
|
+
* the new value in SCA via the PendingUserAction.RedirectUrl.
|
|
353
|
+
* For more details see the <a href="https://docs.mangopay.com/guides/users/sca/enrollment">SCA</a> guides.
|
|
354
|
+
*/
|
|
355
|
+
PhoneNumberCountry: CountryISO;
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Information about the action required from the user if UserStatus is PENDING_USER_ACTION (otherwise returned null).
|
|
359
|
+
*/
|
|
360
|
+
PendingUserAction: PendingUserActionData;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
interface PendingUserActionData {
|
|
364
|
+
/**
|
|
365
|
+
* The URL to which to redirect the user to perform strong customer authentication (SCA)
|
|
366
|
+
* via a Mangopay-hosted webpage. This value is a variable and should not be hardcoded.
|
|
367
|
+
*
|
|
368
|
+
* Caution: Before redirecting the user on this URL, you must add the query parameter ReturnUrl with
|
|
369
|
+
* the percent-encoded URL to which you want the SCA session to return the user
|
|
370
|
+
* after authentication (whether successful or not).
|
|
371
|
+
*
|
|
372
|
+
* For more details, see <a href="https://docs.mangopay.com/guides/users/sca#how-to-redirect-a-user-for-an-sca-session">How to redirect a user for an SCA session</a>
|
|
373
|
+
*/
|
|
374
|
+
RedirectUrl: string;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
interface UserLegalScaData extends UserData {
|
|
378
|
+
PersonType: "LEGAL";
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* The registered legal name of the entity.
|
|
382
|
+
* The Name value should be the one registered with the relevant national authority.
|
|
383
|
+
*/
|
|
384
|
+
Name: string;
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* The type of legal user
|
|
388
|
+
*/
|
|
389
|
+
LegalPersonType: LegalPersonType;
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* Information about the legal representative declared for the user.
|
|
393
|
+
*/
|
|
394
|
+
LegalRepresentative: LegalRepresentativeData;
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* The Id of the KYC Document whose Type is REGISTRATION_PROOF if validated for the user.
|
|
398
|
+
* If no registration proof is validated, then this value is null.
|
|
399
|
+
*/
|
|
400
|
+
ProofOfRegistration: string;
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* The Id of the KYC Document whose Type is SHAREHOLDERS_DECLARATION if validated for the user.
|
|
404
|
+
* If no Shareholder Declaration is validated, then this value is null.
|
|
405
|
+
*/
|
|
406
|
+
ShareholderDeclaration: string;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* The Id of the KYC Document whose Type is ARTICLES_OF_ASSOCIATION if validated for the user.
|
|
410
|
+
* If no articles of association document is validated, then this value is null.
|
|
411
|
+
*/
|
|
412
|
+
Statute: string;
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* The registration number of the entity, assigned by the relevant national authority
|
|
416
|
+
*/
|
|
417
|
+
CompanyNumber: string;
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Object containing the link needed for SCA redirection if triggered by the API call (otherwise returned null).
|
|
421
|
+
*/
|
|
422
|
+
PendingUserAction: PendingUserActionData;
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* The legally registered address of the entity’s administrative center.
|
|
426
|
+
* This object’s sub-parameters are null if the UserCategory is PAYER.
|
|
427
|
+
*/
|
|
428
|
+
HeadquartersAddress: address.AddressData;
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* The address of the entity’s legal representative.
|
|
432
|
+
*/
|
|
433
|
+
LegalRepresentativeAddress: address.AddressData;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
interface LegalRepresentativeData {
|
|
437
|
+
/**
|
|
438
|
+
* The first name of the individual.
|
|
439
|
+
*/
|
|
440
|
+
FirstName: string;
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* The last name of the individual.
|
|
444
|
+
*/
|
|
445
|
+
LastName: string;
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* The date of birth of the individual.
|
|
449
|
+
*/
|
|
450
|
+
Birthday: Timestamp;
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* The nationality of the individual.
|
|
454
|
+
*/
|
|
455
|
+
Nationality: CountryISO;
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* The country of residence of the individual.
|
|
459
|
+
*/
|
|
460
|
+
CountryOfResidence: CountryISO;
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* The individual’s email address.
|
|
464
|
+
*/
|
|
465
|
+
Email: string;
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* Format: International E.164 standard (prefixed by plus sign and country code) or local format
|
|
469
|
+
*
|
|
470
|
+
* The individual’s phone number. The local format (recommended) requires
|
|
471
|
+
* PhoneNumberCountry to ensure correct formatting.
|
|
472
|
+
*
|
|
473
|
+
* If present, the phone number forms part of card transaction data that is
|
|
474
|
+
* passed to issuers to improve authentication rates.
|
|
475
|
+
*
|
|
476
|
+
* For users with UserCategory OWNER , the phone number is used to pre-populate the SCA
|
|
477
|
+
* session for them to confirm and receive an SMS OTP. If the individual modifies the phone number
|
|
478
|
+
* during the session, this data is not updated in the API.
|
|
479
|
+
*/
|
|
480
|
+
PhoneNumber: string;
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Format: Two-letter country code (ISO 3166-1 alpha-2 format)
|
|
484
|
+
*
|
|
485
|
+
* Required if the PhoneNumber is provided in local format (recommended), to render the value in the E.164 standard.
|
|
486
|
+
*/
|
|
487
|
+
PhoneNumberCountry: CountryISO;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
interface BaseUserLegalData extends PickPartial<UserLegalData,
|
|
491
|
+
| RequiredUserLegalData
|
|
492
|
+
| "CompanyNumber"
|
|
493
|
+
| "LegalRepresentativeEmail"
|
|
494
|
+
| "LegalRepresentativeAddress"
|
|
495
|
+
| "HeadquartersAddress"
|
|
496
|
+
| "Tag"
|
|
497
|
+
| "TermsAndConditionsAccepted"
|
|
498
|
+
| "UserCategory"> {
|
|
499
|
+
PersonType: "LEGAL";
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
interface UpdateUserLegalData extends BaseUserLegalData {
|
|
503
|
+
Id: string;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
interface CreateUserLegalData extends MakeKeysRequired<BaseUserLegalData,
|
|
507
|
+
RequiredUserLegalData | "PersonType"> {
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
interface BaseUserNaturalData extends PickPartial<UserNaturalData,
|
|
511
|
+
| RequiredUserNaturalData
|
|
512
|
+
| "Address"
|
|
513
|
+
| "Occupation"
|
|
514
|
+
| "IncomeRange"
|
|
515
|
+
| "Tag"
|
|
516
|
+
| "TermsAndConditionsAccepted"
|
|
517
|
+
| "UserCategory"> {
|
|
518
|
+
PersonType: "NATURAL";
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
interface UpdateUserNaturalData extends BaseUserNaturalData {
|
|
522
|
+
Id: string;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
interface CreateUserNaturalData extends MakeKeysRequired<BaseUserNaturalData,
|
|
526
|
+
RequiredUserNaturalData | "PersonType"> {
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
interface CreateUserNaturalPayerData extends MakeKeysRequired<BaseUserNaturalData, RequiredUserNaturalPayerData | "PersonType">,
|
|
530
|
+
PickPartial<UserNaturalData, "Address" | "Tag" | "TermsAndConditionsAccepted" | "UserCategory"> {
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
interface CreateUserNaturalOwnerData extends MakeKeysRequired<BaseUserNaturalData, RequiredUserNaturalOwnerData | "PersonType">,
|
|
534
|
+
PickPartial<UserNaturalData, "Address" | "Tag" | "Occupation" | "IncomeRange" | "UserCategory"> {
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
interface CreateUserLegalPayerData extends MakeKeysRequired<BaseUserLegalData, RequiredUserLegalPayerData | "PersonType">,
|
|
538
|
+
PickPartial<UserLegalData, "Tag" | "TermsAndConditionsAccepted" | "UserCategory"> {
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
interface CreateUserLegalOwnerData extends MakeKeysRequired<BaseUserLegalData, RequiredUserLegalOwnerData | "PersonType">,
|
|
542
|
+
PickPartial<UserLegalData, "Tag" | "LegalRepresentativeEmail" | "UserCategory"> {
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
interface CreateUserNaturalScaData {
|
|
546
|
+
/**
|
|
547
|
+
* Needed for calling the correct API url (it will not be sent to the API)
|
|
548
|
+
*/
|
|
549
|
+
NaturalSca: true;
|
|
550
|
+
|
|
551
|
+
PersonType: "NATURAL";
|
|
552
|
+
|
|
553
|
+
UserCategory: "PAYER" | "OWNER";
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* The name of the user
|
|
557
|
+
*/
|
|
558
|
+
FirstName: string;
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* The last name of the user
|
|
562
|
+
*/
|
|
563
|
+
LastName: string;
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* The date of birth of the user - be careful to set the right timezone (should be UTC)
|
|
567
|
+
* to avoid 00h becoming 23h (and hence interpreted as the day before)
|
|
568
|
+
* Required if UserCategory is OWNER
|
|
569
|
+
*/
|
|
570
|
+
Birthday?: Timestamp;
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* The user’s nationality. ISO 3166-1 alpha-2 format is expected
|
|
574
|
+
* Required if UserCategory is OWNER
|
|
575
|
+
*/
|
|
576
|
+
Nationality?: CountryISO;
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* The user’s country of residence. ISO 3166-1 alpha-2 format is expected
|
|
580
|
+
* Required if UserCategory is OWNER
|
|
581
|
+
*/
|
|
582
|
+
CountryOfResidence?: CountryISO;
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* User’s occupation, ie. Work
|
|
586
|
+
*/
|
|
587
|
+
Occupation?: string;
|
|
588
|
+
|
|
589
|
+
/**
|
|
590
|
+
* Income range
|
|
591
|
+
*/
|
|
592
|
+
IncomeRange?: IncomeRange;
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* The person's email address (not more than 12 consecutive numbers) - must be a valid email
|
|
596
|
+
*/
|
|
597
|
+
Email: string;
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* Format: International telephone numbering plan E.164 (+ then country code then the number) or local format
|
|
601
|
+
*
|
|
602
|
+
* Required if UserCategory is OWNER.
|
|
603
|
+
*
|
|
604
|
+
* The individual’s phone number.
|
|
605
|
+
*
|
|
606
|
+
* If the international format is sent, the PhoneNumberCountry value is not taken into account.
|
|
607
|
+
*
|
|
608
|
+
* We recommend that you use the PhoneNumberCountry parameter to ensure the correct rendering
|
|
609
|
+
* in line with the E.164 standard.
|
|
610
|
+
*
|
|
611
|
+
* Caution: If UserCategory is OWNER, modifying this value means the user will be required to re-enroll
|
|
612
|
+
* the new value in SCA via the PendingUserAction.RedirectUrl.
|
|
613
|
+
* For more details see the <a href="https://docs.mangopay.com/guides/users/sca/enrollment">SCA</a> guides.
|
|
614
|
+
*/
|
|
615
|
+
PhoneNumber?: string;
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* Allowed values: Two-letter country code (ISO 3166-1 alpha-2 format).
|
|
619
|
+
*
|
|
620
|
+
* Required if the PhoneNumber is provided in local format.
|
|
621
|
+
*
|
|
622
|
+
* The country code of the PhoneNumber, used to render the value in the E.164 standard.
|
|
623
|
+
*
|
|
624
|
+
* Caution: If UserCategory is OWNER, modifying this value means the user will be required to re-enroll
|
|
625
|
+
* the new value in SCA via the PendingUserAction.RedirectUrl.
|
|
626
|
+
* For more details see the <a href="https://docs.mangopay.com/guides/users/sca/enrollment">SCA</a> guides.
|
|
627
|
+
*/
|
|
628
|
+
PhoneNumberCountry?: CountryISO;
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* The user address
|
|
632
|
+
*/
|
|
633
|
+
Address?: address.CreateAddress;
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* Whether the user has accepted Mangopay’s terms and conditions. Must be true if UserCategory is OWNER
|
|
637
|
+
*/
|
|
638
|
+
TermsAndConditionsAccepted: boolean;
|
|
639
|
+
|
|
640
|
+
/**
|
|
641
|
+
* Custom data that you can add to this object.
|
|
642
|
+
*/
|
|
643
|
+
Tag?: string;
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* If provided, possible values: USER_PRESENT, USER_NOT_PRESENT
|
|
647
|
+
*/
|
|
648
|
+
ScaContext?: string;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
interface CreateUserLegalScaData {
|
|
652
|
+
/**
|
|
653
|
+
* Needed for calling the correct API url (it will not be sent to the API)
|
|
654
|
+
*/
|
|
655
|
+
LegalSca: true;
|
|
656
|
+
|
|
657
|
+
PersonType: "LEGAL";
|
|
658
|
+
|
|
659
|
+
UserCategory: "PAYER" | "OWNER";
|
|
660
|
+
|
|
661
|
+
/**
|
|
662
|
+
* The registered legal name of the entity.
|
|
663
|
+
* The Name value should be the one registered with the relevant national authority.
|
|
664
|
+
*/
|
|
665
|
+
Name: string;
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* The type of legal user
|
|
669
|
+
*/
|
|
670
|
+
LegalPersonType: LegalPersonType;
|
|
671
|
+
|
|
672
|
+
/**
|
|
673
|
+
* Information about the legal representative declared for the user.
|
|
674
|
+
*/
|
|
675
|
+
LegalRepresentative: CreateLegalRepresentativeData;
|
|
676
|
+
|
|
677
|
+
/**
|
|
678
|
+
* The registration number of the entity, assigned by the relevant national authority
|
|
679
|
+
* Required if UserCategory is OWNER and LegalPersonType is BUSINESS. Returned null if UserCategory is PAYER.
|
|
680
|
+
*/
|
|
681
|
+
CompanyNumber?: string;
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* The legally registered address of the entity’s administrative center.
|
|
685
|
+
* This object’s sub-parameters are null if the UserCategory is PAYER.
|
|
686
|
+
* Required if UserCategory is OWNER. Child parameters returned null if UserCategory is PAYER.
|
|
687
|
+
*/
|
|
688
|
+
HeadquartersAddress?: address.CreateAddress;
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* The address of the entity’s legal representative.
|
|
692
|
+
*/
|
|
693
|
+
LegalRepresentativeAddress?: address.CreateAddress;
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* Custom data that you can add to this object.
|
|
697
|
+
*/
|
|
698
|
+
Tag?: string;
|
|
699
|
+
|
|
700
|
+
/**
|
|
701
|
+
* The email address for the entity.
|
|
702
|
+
*/
|
|
703
|
+
Email: string;
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* Whether the user has accepted Mangopay’s terms and conditions (as defined by your contract, see the T&Cs guide for details).
|
|
707
|
+
*
|
|
708
|
+
* Must be true if UserCategory is OWNER.
|
|
709
|
+
*/
|
|
710
|
+
TermsAndConditionsAccepted: boolean;
|
|
711
|
+
|
|
712
|
+
/**
|
|
713
|
+
* If provided, possible values: USER_PRESENT, USER_NOT_PRESENT
|
|
714
|
+
*/
|
|
715
|
+
ScaContext?: string;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
interface CreateLegalRepresentativeData {
|
|
719
|
+
/**
|
|
720
|
+
* The first name of the individual.
|
|
721
|
+
*/
|
|
722
|
+
FirstName: string;
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* The last name of the individual.
|
|
726
|
+
*/
|
|
727
|
+
LastName: string;
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* The date of birth of the individual.
|
|
731
|
+
* Required if UserCategory is OWNER. Returned null if UserCategory is PAYER.
|
|
732
|
+
*/
|
|
733
|
+
Birthday?: Timestamp;
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* The nationality of the individual.
|
|
737
|
+
* Required if UserCategory is OWNER. Returned null if UserCategory is PAYER.
|
|
738
|
+
*/
|
|
739
|
+
Nationality?: CountryISO;
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* The country of residence of the individual.
|
|
743
|
+
* Required if UserCategory is OWNER. Returned null if UserCategory is PAYER.
|
|
744
|
+
*/
|
|
745
|
+
CountryOfResidence?: CountryISO;
|
|
746
|
+
|
|
747
|
+
/**
|
|
748
|
+
* The individual’s email address.
|
|
749
|
+
*/
|
|
750
|
+
Email: string;
|
|
751
|
+
|
|
752
|
+
/**
|
|
753
|
+
* Format: International E.164 standard (prefixed by plus sign and country code) or local format
|
|
754
|
+
*
|
|
755
|
+
* The individual’s phone number. The local format (recommended) requires
|
|
756
|
+
* PhoneNumberCountry to ensure correct formatting.
|
|
757
|
+
*
|
|
758
|
+
* If present, the phone number forms part of card transaction data that is
|
|
759
|
+
* passed to issuers to improve authentication rates.
|
|
760
|
+
*
|
|
761
|
+
* For users with UserCategory OWNER , the phone number is used to pre-populate the SCA
|
|
762
|
+
* session for them to confirm and receive an SMS OTP. If the individual modifies the phone number
|
|
763
|
+
* during the session, this data is not updated in the API.
|
|
764
|
+
*/
|
|
765
|
+
PhoneNumber?: string;
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* Format: Two-letter country code (ISO 3166-1 alpha-2 format)
|
|
769
|
+
*
|
|
770
|
+
* Required if the PhoneNumber is provided in local format (recommended), to render the value in the E.164 standard.
|
|
771
|
+
*/
|
|
772
|
+
PhoneNumberCountry?: CountryISO;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
interface UpdateLegalRepresentativeData {
|
|
776
|
+
FirstName?: string;
|
|
777
|
+
LastName?: string;
|
|
778
|
+
Birthday?: Timestamp;
|
|
779
|
+
Nationality?: CountryISO;
|
|
780
|
+
CountryOfResidence?: CountryISO;
|
|
781
|
+
Email?: string;
|
|
782
|
+
PhoneNumber?: string;
|
|
783
|
+
PhoneNumberCountry?: CountryISO;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
interface UpdateUserLegalScaData {
|
|
787
|
+
/**
|
|
788
|
+
* Needed for calling the correct API url (it will not be sent to the API)
|
|
789
|
+
*/
|
|
790
|
+
LegalSca: true;
|
|
791
|
+
Id: string;
|
|
792
|
+
Tag?: string;
|
|
793
|
+
TermsAndConditionsAccepted: boolean;
|
|
794
|
+
Name?: string;
|
|
795
|
+
LegalPersonType?: LegalPersonType;
|
|
796
|
+
LegalRepresentative?: UpdateLegalRepresentativeData
|
|
797
|
+
CompanyNumber?: string;
|
|
798
|
+
HeadquartersAddress?: address.CreateAddress;
|
|
799
|
+
LegalRepresentativeAddress?: address.CreateAddress;
|
|
800
|
+
Email?: string;
|
|
801
|
+
ScaContext?: string;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
interface UpdateUserNaturalScaData {
|
|
805
|
+
/**
|
|
806
|
+
* Needed for calling the correct API url (it will not be sent to the API)
|
|
807
|
+
*/
|
|
808
|
+
NaturalSca: true;
|
|
809
|
+
Id: string;
|
|
810
|
+
TermsAndConditionsAccepted: boolean;
|
|
811
|
+
FirstName?: string;
|
|
812
|
+
LastName?: string;
|
|
813
|
+
Birthday?: Timestamp;
|
|
814
|
+
Nationality?: CountryISO;
|
|
815
|
+
CountryOfResidence?: CountryISO;
|
|
816
|
+
Occupation?: string;
|
|
817
|
+
IncomeRange?: IncomeRange;
|
|
818
|
+
Tag?: string;
|
|
819
|
+
PhoneNumber?: string;
|
|
820
|
+
PhoneNumberCountry?: CountryISO;
|
|
821
|
+
Address?: address.CreateAddress;
|
|
822
|
+
ScaContext?: string;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
interface CategorizeUserNatural {
|
|
826
|
+
/**
|
|
827
|
+
* Needed for calling the correct API url (it will not be sent to the API)
|
|
828
|
+
*/
|
|
829
|
+
NaturalSca: true;
|
|
830
|
+
|
|
831
|
+
/**
|
|
832
|
+
* The id of the user
|
|
833
|
+
*/
|
|
834
|
+
Id: string;
|
|
835
|
+
|
|
836
|
+
/**
|
|
837
|
+
* The new category of the user, which must be OWNER.
|
|
838
|
+
*/
|
|
839
|
+
UserCategory: 'OWNER';
|
|
840
|
+
|
|
841
|
+
/**
|
|
842
|
+
* Whether the user has accepted Mangopay’s terms and conditions (as defined by your contract, see the T&Cs guide for details).
|
|
843
|
+
*/
|
|
844
|
+
TermsAndConditionsAccepted: boolean;
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* The individual’s email address.
|
|
848
|
+
*/
|
|
849
|
+
Email?: string;
|
|
850
|
+
|
|
851
|
+
/**
|
|
852
|
+
* The date of birth of the individual.
|
|
853
|
+
*/
|
|
854
|
+
Birthday: Timestamp;
|
|
855
|
+
|
|
856
|
+
/**
|
|
857
|
+
* The nationality of the individual.
|
|
858
|
+
*/
|
|
859
|
+
Nationality: CountryISO;
|
|
860
|
+
|
|
861
|
+
/**
|
|
862
|
+
* The country of residence of the individual.
|
|
863
|
+
*/
|
|
864
|
+
CountryOfResidence: CountryISO;
|
|
865
|
+
|
|
866
|
+
/**
|
|
867
|
+
* Format: International E.164 standard (prefixed by plus sign and country code) or local format
|
|
868
|
+
*
|
|
869
|
+
* The individual’s phone number. The local format (recommended) requires
|
|
870
|
+
* PhoneNumberCountry to ensure correct formatting.
|
|
871
|
+
*
|
|
872
|
+
* If present, the phone number forms part of card transaction data that is
|
|
873
|
+
* passed to issuers to improve authentication rates.
|
|
874
|
+
*
|
|
875
|
+
* For users with UserCategory OWNER , the phone number is used to pre-populate the SCA
|
|
876
|
+
* session for them to confirm and receive an SMS OTP. If the individual modifies the phone number
|
|
877
|
+
* during the session, this data is not updated in the API.
|
|
878
|
+
*/
|
|
879
|
+
PhoneNumber?: string;
|
|
880
|
+
|
|
881
|
+
/**
|
|
882
|
+
* Format: Two-letter country code (ISO 3166-1 alpha-2 format)
|
|
883
|
+
*
|
|
884
|
+
* Required if the PhoneNumber is provided in local format (recommended), to render the value in the E.164 standard.
|
|
885
|
+
*/
|
|
886
|
+
PhoneNumberCountry?: string;
|
|
887
|
+
|
|
888
|
+
/**
|
|
889
|
+
* Possible values: USER_PRESENT, USER_NOT_PRESENT
|
|
890
|
+
*/
|
|
891
|
+
ScaContext?: string;
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
interface CategorizeUserLegal {
|
|
895
|
+
/**
|
|
896
|
+
* Needed for calling the correct API url (it will not be sent to the API)
|
|
897
|
+
*/
|
|
898
|
+
LegalSca: true;
|
|
899
|
+
|
|
900
|
+
/**
|
|
901
|
+
* The id of the user
|
|
902
|
+
*/
|
|
903
|
+
Id: string;
|
|
904
|
+
|
|
905
|
+
/**
|
|
906
|
+
* The new category of the user, which must be OWNER.
|
|
907
|
+
*/
|
|
908
|
+
UserCategory: 'OWNER';
|
|
909
|
+
|
|
910
|
+
/**
|
|
911
|
+
* Whether the user has accepted Mangopay’s terms and conditions (as defined by your contract, see the T&Cs guide for details).
|
|
912
|
+
*/
|
|
913
|
+
TermsAndConditionsAccepted: boolean;
|
|
914
|
+
|
|
915
|
+
/**
|
|
916
|
+
* Information about the legal representative declared for the user.
|
|
917
|
+
*/
|
|
918
|
+
LegalRepresentative: CreateLegalRepresentativeData;
|
|
919
|
+
|
|
920
|
+
/**
|
|
921
|
+
* The legally registered address of the entity’s administrative center.
|
|
922
|
+
*/
|
|
923
|
+
HeadquartersAddress: address.CreateAddress;
|
|
924
|
+
|
|
925
|
+
/**
|
|
926
|
+
* Required if LegalPersonType is BUSINESS.
|
|
927
|
+
*/
|
|
928
|
+
CompanyNumber?: string;
|
|
929
|
+
|
|
930
|
+
/**
|
|
931
|
+
* Possible values: USER_PRESENT, USER_NOT_PRESENT
|
|
932
|
+
*/
|
|
933
|
+
ScaContext?: string;
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
interface UserEnrollmentResult {
|
|
937
|
+
/**
|
|
938
|
+
* Information about the action required from the user if UserStatus is PENDING_USER_ACTION (otherwise returned null).
|
|
939
|
+
*/
|
|
940
|
+
PendingUserAction: PendingUserActionData;
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
interface UserConsent {
|
|
944
|
+
PendingUserAction: PendingUserActionData;
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
interface UserDataFormatValidation {
|
|
948
|
+
/**
|
|
949
|
+
* Information about the registration number of a legal entity
|
|
950
|
+
*/
|
|
951
|
+
CompanyNumber?: CompanyNumberValidation;
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
interface CompanyNumberValidation {
|
|
955
|
+
/**
|
|
956
|
+
* The registration number of a legal entity, assigned by the relevant national authority.
|
|
957
|
+
*/
|
|
958
|
+
CompanyNumber: string;
|
|
959
|
+
|
|
960
|
+
/**
|
|
961
|
+
* The country of the registration of the legal entity, against which the company number format is validated.
|
|
962
|
+
*/
|
|
963
|
+
CountryCode: CountryISO;
|
|
964
|
+
|
|
965
|
+
/**
|
|
966
|
+
* Whether the format of the value is valid for the country.
|
|
967
|
+
*/
|
|
968
|
+
IsValid?: boolean;
|
|
969
|
+
|
|
970
|
+
/**
|
|
971
|
+
* The list of regular expressions applicable to the country. Rules only exist for countries listed in the Company number article.
|
|
972
|
+
* <p></p>
|
|
973
|
+
* Note: Any non-alphanumeric characters, like dashes or spaces, are removed before applying the validation rules.
|
|
974
|
+
*/
|
|
975
|
+
ValidationRules?: string[];
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
interface RegulatoryData extends entityBase.EntityBaseData {
|
|
979
|
+
/**
|
|
980
|
+
* Code indicating the reason for blocking the user, and steps you can take to get them unblocked.
|
|
981
|
+
*/
|
|
982
|
+
ActionCode: string;
|
|
983
|
+
|
|
984
|
+
/**
|
|
985
|
+
* Information about which payment flows are blocked for the user.
|
|
986
|
+
*/
|
|
987
|
+
ScopeBlocked: ScopeBlocked;
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
interface ScopeBlocked {
|
|
991
|
+
/**
|
|
992
|
+
* Whether or not the user is blocked from making pay-ins or sending or receiving transfers.
|
|
993
|
+
*/
|
|
994
|
+
Inflows: boolean;
|
|
995
|
+
|
|
996
|
+
/**
|
|
997
|
+
* Whether or not the user is blocked from making payouts or sending or receiving transfers.
|
|
998
|
+
*/
|
|
999
|
+
Outflows: boolean;
|
|
1000
|
+
}
|
|
1001
|
+
}
|