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,225 @@
|
|
|
1
|
+
import { entityBase } from "./entityBase";
|
|
2
|
+
import { money } from "./money";
|
|
3
|
+
import { transaction } from "./transaction";
|
|
4
|
+
import { conversionRate } from "./conversionRate";
|
|
5
|
+
|
|
6
|
+
export namespace conversion {
|
|
7
|
+
import TransactionStatus = transaction.TransactionStatus;
|
|
8
|
+
import TransactionType = transaction.TransactionType;
|
|
9
|
+
import TransactionNature = transaction.TransactionNature;
|
|
10
|
+
import MoneyData = money.MoneyData;
|
|
11
|
+
import MoneyDataOptionalAmount = money.MoneyDataOptionalAmount;
|
|
12
|
+
import ConversionRateData = conversionRate.ConversionRateData;
|
|
13
|
+
|
|
14
|
+
type QuoteStatus = "ACTIVE" | "EXPIRED";
|
|
15
|
+
|
|
16
|
+
interface ConversionData extends entityBase.EntityBaseData {
|
|
17
|
+
/**
|
|
18
|
+
* The unique identifier of the active quote which guaranteed the rate for the conversion.
|
|
19
|
+
*/
|
|
20
|
+
QuoteId: string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The unique identifier of the user at the source of the transaction
|
|
24
|
+
*/
|
|
25
|
+
AuthorId: string;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The unique identifier of the debited wallet.
|
|
29
|
+
*/
|
|
30
|
+
DebitedWalletId: string;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* The unique identifier of the credited wallet
|
|
34
|
+
*/
|
|
35
|
+
CreditedWalletId: string;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The sell funds
|
|
39
|
+
*/
|
|
40
|
+
DebitedFunds: MoneyData;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* The buy funds
|
|
44
|
+
*/
|
|
45
|
+
CreditedFunds: MoneyData;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet).
|
|
49
|
+
* Note: The fees currency must match the debited funds currency.
|
|
50
|
+
*/
|
|
51
|
+
Fees: MoneyData;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Real time indicative market rate of a specific currency pair
|
|
55
|
+
*/
|
|
56
|
+
ConversionRateResponse: ConversionRateData;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The status of the transaction.
|
|
60
|
+
*/
|
|
61
|
+
Status: TransactionStatus;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The type of transaction
|
|
65
|
+
*/
|
|
66
|
+
Type: TransactionType;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The nature of the transaction, providing more
|
|
70
|
+
* information about the context in which the transaction occurred
|
|
71
|
+
*/
|
|
72
|
+
Nature: TransactionNature;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The code indicates the result of the operation.
|
|
76
|
+
* This information is mostly used to handle errors or for filtering purposes.
|
|
77
|
+
*/
|
|
78
|
+
ResultCode: string;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* The explanation of the result code.
|
|
82
|
+
*/
|
|
83
|
+
ResultMessage: string;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* The date and time at which the status changed to SUCCEEDED,
|
|
87
|
+
* indicating that the transaction occurred.
|
|
88
|
+
* The statuses CREATED and FAILED return an ExecutionDate of null
|
|
89
|
+
*/
|
|
90
|
+
ExecutionDate: number;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
interface CreateInstantConversion {
|
|
94
|
+
/**
|
|
95
|
+
* The unique identifier of the user at the source of the transaction.
|
|
96
|
+
*/
|
|
97
|
+
AuthorId: string;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The unique identifier of the debited wallet.
|
|
101
|
+
*/
|
|
102
|
+
DebitedWalletId: string;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* The unique identifier of the credited wallet
|
|
106
|
+
*/
|
|
107
|
+
CreditedWalletId: string;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* The sell funds
|
|
111
|
+
*/
|
|
112
|
+
DebitedFunds: MoneyData;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* The buy funds
|
|
116
|
+
*/
|
|
117
|
+
CreditedFunds: MoneyData;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet).
|
|
121
|
+
* Note: The fees currency must match the debited funds currency.
|
|
122
|
+
*/
|
|
123
|
+
Fees?: MoneyData;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Custom data that you can add to this object.
|
|
127
|
+
*/
|
|
128
|
+
Tag?: string;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
interface CreateQuotedConversion {
|
|
132
|
+
/**
|
|
133
|
+
* The unique identifier of the active quote which guaranteed the rate for the conversion.
|
|
134
|
+
*/
|
|
135
|
+
QuoteId: string;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* The unique identifier of the user at the source of the transaction.
|
|
139
|
+
*/
|
|
140
|
+
AuthorId: string;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* The unique identifier of the debited wallet.
|
|
144
|
+
*/
|
|
145
|
+
DebitedWalletId: string;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* The unique identifier of the credited wallet
|
|
149
|
+
*/
|
|
150
|
+
CreditedWalletId: string;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Custom data that you can add to this object.
|
|
154
|
+
*/
|
|
155
|
+
Tag?: string;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
interface CreateClientWalletsQuotedConversion {
|
|
159
|
+
/**
|
|
160
|
+
* The unique identifier of the active quote which guaranteed the rate for the conversion.
|
|
161
|
+
*/
|
|
162
|
+
QuoteId: string;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* The type of the client wallet to be debited.
|
|
166
|
+
* Allowed values: FEES, CREDIT
|
|
167
|
+
*/
|
|
168
|
+
DebitedWalletType: string;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* The type of the client wallet to be credited.
|
|
172
|
+
* Allowed values: FEES, CREDIT
|
|
173
|
+
*/
|
|
174
|
+
CreditedWalletType: string;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Custom data that you can add to this object.
|
|
178
|
+
*/
|
|
179
|
+
Tag?: string;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
interface CreateClientWalletsInstantConversion {
|
|
183
|
+
/**
|
|
184
|
+
* The sell funds
|
|
185
|
+
*/
|
|
186
|
+
DebitedFunds: MoneyData;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* The buy funds
|
|
190
|
+
*/
|
|
191
|
+
CreditedFunds: MoneyDataOptionalAmount;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* The type of the client wallet to be debited.
|
|
195
|
+
* Allowed values: FEES, CREDIT
|
|
196
|
+
*/
|
|
197
|
+
DebitedWalletType: string;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* The type of the client wallet to be credited.
|
|
201
|
+
* Allowed values: FEES, CREDIT
|
|
202
|
+
*/
|
|
203
|
+
CreditedWalletType: string;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Custom data that you can add to this object.
|
|
207
|
+
*/
|
|
208
|
+
Tag?: string;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
interface QuoteData extends entityBase.EntityBaseData {
|
|
212
|
+
ExpirationDate: number;
|
|
213
|
+
Status: QuoteStatus;
|
|
214
|
+
DebitedFunds: MoneyData;
|
|
215
|
+
CreditedFunds: MoneyData;
|
|
216
|
+
ConversionRateResponse: ConversionRateData;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
interface CreateQuote {
|
|
220
|
+
DebitedFunds: MoneyData;
|
|
221
|
+
CreditedFunds: MoneyData;
|
|
222
|
+
Duration: number;
|
|
223
|
+
Tag?: string;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export namespace conversionRate {
|
|
2
|
+
interface ConversionRateData {
|
|
3
|
+
/**
|
|
4
|
+
* The sell currency – the currency of the wallet to be debited
|
|
5
|
+
*/
|
|
6
|
+
DebitedCurrency: string;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The buy currency – the currency of the wallet to be credited.
|
|
10
|
+
*/
|
|
11
|
+
CreditedCurrency: string;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The market rate plus Mangopay's commission,
|
|
15
|
+
* charged during the platform's billing cycle. This is an indicative rate.
|
|
16
|
+
*/
|
|
17
|
+
ClientRate: string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The rate used for the conversion, excluding Mangopay's commission.
|
|
21
|
+
*/
|
|
22
|
+
MarketRate: string;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
MarketRateDate: number;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CountryISO } from "../types";
|
|
2
|
+
|
|
3
|
+
export namespace countryAuthorization {
|
|
4
|
+
interface AuthorizationData {
|
|
5
|
+
BlockUserCreation: boolean;
|
|
6
|
+
BlockBankAccountCreation: boolean;
|
|
7
|
+
BlockPayout: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface CountryAuthorizationData {
|
|
11
|
+
CountryCode: CountryISO;
|
|
12
|
+
CountryName: string;
|
|
13
|
+
Authorization: AuthorizationData;
|
|
14
|
+
LastUpdate: number;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { CountryISO, Timestamp, ValueOf } from "../types";
|
|
2
|
+
import { entityBase } from "./entityBase";
|
|
3
|
+
import { money } from "./money";
|
|
4
|
+
import { enums } from "../enums";
|
|
5
|
+
import { payIn } from "./payIn";
|
|
6
|
+
import { base } from "../base";
|
|
7
|
+
import { billing } from "./billing";
|
|
8
|
+
import { shipping } from "./shipping";
|
|
9
|
+
import { card } from "./card";
|
|
10
|
+
|
|
11
|
+
export namespace deposit {
|
|
12
|
+
import MoneyData = money.MoneyData;
|
|
13
|
+
import PayInPaymentType = payIn.PayInPaymentType;
|
|
14
|
+
import PayInExecutionType = payIn.PayInExecutionType;
|
|
15
|
+
import BrowserInfoData = base.BrowserInfoData;
|
|
16
|
+
import ShippingData = shipping.ShippingData;
|
|
17
|
+
import CompleteBillingData = billing.CompleteBillingData;
|
|
18
|
+
import _3DSVersion = payIn._3DSVersion;
|
|
19
|
+
import CardInfoData = card.CardInfoData;
|
|
20
|
+
|
|
21
|
+
type DepositStatus = ValueOf<enums.IDepositStatus>;
|
|
22
|
+
|
|
23
|
+
type PaymentStatus = ValueOf<enums.IPaymentStatus>;
|
|
24
|
+
|
|
25
|
+
interface DepositData extends entityBase.EntityBaseData {
|
|
26
|
+
AuthorId: string;
|
|
27
|
+
|
|
28
|
+
DebitedFunds: MoneyData;
|
|
29
|
+
|
|
30
|
+
Status: DepositStatus;
|
|
31
|
+
|
|
32
|
+
PaymentStatus: PaymentStatus;
|
|
33
|
+
|
|
34
|
+
PayinsLinked: PayinsLinkedData;
|
|
35
|
+
|
|
36
|
+
ResultCode: string;
|
|
37
|
+
|
|
38
|
+
ResultMessage: string;
|
|
39
|
+
|
|
40
|
+
CardId: string;
|
|
41
|
+
|
|
42
|
+
SecureModeReturnURL: string;
|
|
43
|
+
|
|
44
|
+
SecureModeRedirectURL: string;
|
|
45
|
+
|
|
46
|
+
SecureModeNeeded: boolean;
|
|
47
|
+
|
|
48
|
+
ExpirationDate: Timestamp;
|
|
49
|
+
|
|
50
|
+
PaymentType: PayInPaymentType;
|
|
51
|
+
|
|
52
|
+
ExecutionType: PayInExecutionType;
|
|
53
|
+
|
|
54
|
+
StatementDescriptor: string;
|
|
55
|
+
|
|
56
|
+
Culture: CountryISO;
|
|
57
|
+
|
|
58
|
+
IpAddress: string;
|
|
59
|
+
|
|
60
|
+
BrowserInfo: BrowserInfoData;
|
|
61
|
+
|
|
62
|
+
Billing: CompleteBillingData;
|
|
63
|
+
|
|
64
|
+
Shipping: ShippingData;
|
|
65
|
+
|
|
66
|
+
Requested3DSVersion: _3DSVersion;
|
|
67
|
+
|
|
68
|
+
Applied3DSVersion: _3DSVersion;
|
|
69
|
+
|
|
70
|
+
CardInfo: CardInfoData;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
interface CreateDeposit {
|
|
74
|
+
AuthorId: string;
|
|
75
|
+
|
|
76
|
+
DebitedFunds: MoneyData;
|
|
77
|
+
|
|
78
|
+
CardId: string;
|
|
79
|
+
|
|
80
|
+
SecureModeReturnURL: string;
|
|
81
|
+
|
|
82
|
+
StatementDescriptor?: string;
|
|
83
|
+
|
|
84
|
+
Culture?: CountryISO;
|
|
85
|
+
|
|
86
|
+
IpAddress: string;
|
|
87
|
+
|
|
88
|
+
BrowserInfo: BrowserInfoData;
|
|
89
|
+
|
|
90
|
+
Billing?: CompleteBillingData;
|
|
91
|
+
|
|
92
|
+
Shipping?: ShippingData;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
interface PayinsLinkedData {
|
|
96
|
+
PayinCaptureId: string;
|
|
97
|
+
PayinComplementId: string;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
interface UpdateDeposit {
|
|
101
|
+
Id: string;
|
|
102
|
+
PaymentStatus?: PaymentStatus;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { transaction } from "./transaction";
|
|
2
|
+
import { PickPartial, Timestamp } from "../types";
|
|
3
|
+
import { entityBase } from "./entityBase";
|
|
4
|
+
import { money } from "./money";
|
|
5
|
+
|
|
6
|
+
export namespace dispute {
|
|
7
|
+
import MoneyData = money.MoneyData;
|
|
8
|
+
|
|
9
|
+
type DisputeReasonType =
|
|
10
|
+
| "DUPLICATE"
|
|
11
|
+
| "FRAUD"
|
|
12
|
+
| "PRODUCT_UNACCEPTABLE"
|
|
13
|
+
| "UNKNOWN"
|
|
14
|
+
| "OTHER"
|
|
15
|
+
| "REFUND_CONVERSION_RATE"
|
|
16
|
+
| "LATE_FAILURE_INSUFFICIENT_FUNDS"
|
|
17
|
+
| "LATE_FAILURE_CONTACT_USER"
|
|
18
|
+
| "LATE_FAILURE_BANKACCOUNT_CLOSED"
|
|
19
|
+
| "LATE_FAILURE_BANKACCOUNT_INCOMPATIBLE"
|
|
20
|
+
| "LATE_FAILURE_BANKACCOUNT_INCORRECT"
|
|
21
|
+
| "AUTHORISATION_DISPUTED"
|
|
22
|
+
| "TRANSACTION_NOT_RECOGNIZED"
|
|
23
|
+
| "PRODUCT_NOT_PROVIDED"
|
|
24
|
+
| "CANCELED_REOCCURING_TRANSACTION"
|
|
25
|
+
| "REFUND_NOT_PROCESSED";
|
|
26
|
+
|
|
27
|
+
type DisputeStatus =
|
|
28
|
+
| "CREATED"
|
|
29
|
+
| "PENDING_CLIENT_ACTION"
|
|
30
|
+
| "SUBMITTED"
|
|
31
|
+
| "PENDING_BANK_ACTION"
|
|
32
|
+
| "REOPENED_PENDING_CLIENT_ACTION"
|
|
33
|
+
| "CLOSED";
|
|
34
|
+
|
|
35
|
+
type DisputeType = "CONTESTABLE" | "NOT_CONTESTABLE" | "RETRIEVAL";
|
|
36
|
+
|
|
37
|
+
interface DisputeReason {
|
|
38
|
+
DisputeReasonType: DisputeReasonType;
|
|
39
|
+
|
|
40
|
+
DisputeReasonMessage: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
interface DisputeData extends entityBase.EntityBaseData {
|
|
44
|
+
/**
|
|
45
|
+
* The initial transaction ID
|
|
46
|
+
*/
|
|
47
|
+
InitialTransactionId: string;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The initial transaction type
|
|
51
|
+
*/
|
|
52
|
+
InitialTransactionType: transaction.TransactionType;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The result code
|
|
56
|
+
*/
|
|
57
|
+
ResultCode: string;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* A verbal explanation of the ResultCode
|
|
61
|
+
*/
|
|
62
|
+
ResultMessage: string;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Info about the reason for the dispute
|
|
66
|
+
*/
|
|
67
|
+
DisputeReason: DisputeReason;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* The status of the dispute
|
|
71
|
+
*/
|
|
72
|
+
Status: DisputeStatus;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Used to communicate information about the dispute status to you
|
|
76
|
+
*/
|
|
77
|
+
StatusMessage: string;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The amount of funds that were disputed
|
|
81
|
+
*/
|
|
82
|
+
DisputedFunds: MoneyData;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The amount you wish to contest
|
|
86
|
+
*/
|
|
87
|
+
ContestedFunds: MoneyData;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* The type of dispute
|
|
91
|
+
*/
|
|
92
|
+
DisputeType: DisputeType;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* The deadline by which you must contest the dispute (if you wish to contest it)
|
|
96
|
+
*/
|
|
97
|
+
ContestDeadlineDate: Timestamp;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The date and time the dispute was closed
|
|
101
|
+
*/
|
|
102
|
+
ClosedDate: Timestamp;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* The ID of the associated repudiation transaction
|
|
106
|
+
*/
|
|
107
|
+
RepudiationId: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
interface SubmitDispute
|
|
111
|
+
extends PickPartial<DisputeData, "ContestedFunds"> {
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
interface UpdateDispute extends PickPartial<DisputeData, "Tag"> {
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { Timestamp } from "../types";
|
|
2
|
+
import { entityBase } from "./entityBase";
|
|
3
|
+
|
|
4
|
+
export namespace disputeDocument {
|
|
5
|
+
type DisputeDocumentType =
|
|
6
|
+
| "DELIVERY_PROOF"
|
|
7
|
+
| "INVOICE"
|
|
8
|
+
| "REFUND_PROOF"
|
|
9
|
+
| "USER_CORRESPONDANCE"
|
|
10
|
+
| "USER_ACCEPTANCE_PROOF"
|
|
11
|
+
| "PRODUCT_REPLACEMENT_PROOF"
|
|
12
|
+
| "OTHER";
|
|
13
|
+
|
|
14
|
+
type DocumentStatus =
|
|
15
|
+
| "CREATED"
|
|
16
|
+
| "VALIDATION_ASKED"
|
|
17
|
+
| "VALIDATED"
|
|
18
|
+
| "REFUSED"
|
|
19
|
+
| "OUT_OF_DATE";
|
|
20
|
+
|
|
21
|
+
type RefusedReasonType =
|
|
22
|
+
| "DOCUMENT_UNREADABLE"
|
|
23
|
+
| "DOCUMENT_NOT_ACCEPTED"
|
|
24
|
+
| "DOCUMENT_HAS_EXPIRED"
|
|
25
|
+
| "DOCUMENT_INCOMPLETE"
|
|
26
|
+
| "DOCUMENT_MISSING"
|
|
27
|
+
| "SPECIFIC_CASE"
|
|
28
|
+
| "DOCUMENT_FALSIFIED"
|
|
29
|
+
| "OTHER";
|
|
30
|
+
|
|
31
|
+
interface DisputeDocumentData extends entityBase.EntityBaseData {
|
|
32
|
+
/**
|
|
33
|
+
* Gives the type of the KYC document
|
|
34
|
+
*/
|
|
35
|
+
Type: DisputeDocumentType;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The object owner's UserId
|
|
39
|
+
*/
|
|
40
|
+
UserId: string;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* The Id of a Dispute
|
|
44
|
+
*/
|
|
45
|
+
DisputeId: string;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* The status of this KYC/Dispute document
|
|
49
|
+
*/
|
|
50
|
+
Status: DocumentStatus;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The message accompanying a refusal
|
|
54
|
+
*/
|
|
55
|
+
RefusedReasonMessage: string;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* The type of reason for refusal
|
|
59
|
+
*/
|
|
60
|
+
RefusedReasonType: RefusedReasonType;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The date when the document was processed by MANGOPAY
|
|
64
|
+
*/
|
|
65
|
+
ProcessedDate: Timestamp;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
interface CreateDisputeDocument {
|
|
69
|
+
/**
|
|
70
|
+
* Gives the type of the KYC document
|
|
71
|
+
*/
|
|
72
|
+
Type: DisputeDocumentType;
|
|
73
|
+
Tag?: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
interface SubmitDisputeDocument {
|
|
77
|
+
/**
|
|
78
|
+
* The status of this KYC/Dispute document
|
|
79
|
+
*/
|
|
80
|
+
Status: "VALIDATION_ASKED";
|
|
81
|
+
Tag?: string;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* - Documents have to be in "CREATED" Status
|
|
86
|
+
* - You can create as many pages as needed
|
|
87
|
+
*
|
|
88
|
+
* Remember to change Status to "VALIDATION_ASKED" to submit KYC documents
|
|
89
|
+
* The maximum size per page is about 7Mb (or 10Mb when base64encoded). The following formats are accepted for the documents : .pdf, .jpeg, .jpg, .gif and .png. The minimum size is 1Kb.
|
|
90
|
+
*/
|
|
91
|
+
interface CreateDisputeDocumentPage {
|
|
92
|
+
/**
|
|
93
|
+
* The base64 encoded file which needs to be uploaded
|
|
94
|
+
*
|
|
95
|
+
* You need to fill in only the binary code. Do not send the first part that some converters add into the binary code which is
|
|
96
|
+
* `<img src=" data:image/png;base64..." />`
|
|
97
|
+
*
|
|
98
|
+
* e.g.
|
|
99
|
+
* ```json
|
|
100
|
+
* {
|
|
101
|
+
* "File": "/9j/4AAQSkZJRgABAQEBLAEsAAD/.../wgARCAAyADIDAREAAhEBAxEB/8QAGwAAAgMBAQEA"
|
|
102
|
+
* }
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
File: string;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
interface DocumentPageConsult {
|
|
109
|
+
/**
|
|
110
|
+
* URL where this document page can be viewed.
|
|
111
|
+
*/
|
|
112
|
+
Url: string;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Time in millis when the page consult will expire.
|
|
116
|
+
*/
|
|
117
|
+
ExpirationDate: Timestamp;
|
|
118
|
+
}
|
|
119
|
+
}
|