@moonpay/platform-protocol 1.21.0 → 1.22.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/dist/api/customer.d.cts +1 -1394
- package/dist/api/customer.d.ts +1 -1394
- package/dist/api/identity.d.cts +1 -1
- package/dist/api/identity.d.ts +1 -1
- package/dist/api/index.cjs.map +1 -1
- package/dist/api/index.d.cts +15 -1
- package/dist/api/index.d.ts +15 -1
- package/dist/identity-DIQJlm0o.d.cts +1422 -0
- package/dist/identity-DIQJlm0o.d.ts +1422 -0
- package/package.json +1 -1
package/dist/api/customer.d.cts
CHANGED
|
@@ -1,1394 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* A fiat currency or crypto token
|
|
3
|
-
*/
|
|
4
|
-
type Asset = {
|
|
5
|
-
/**
|
|
6
|
-
* A fiat or crypto currency code.
|
|
7
|
-
*
|
|
8
|
-
* **Fiat**
|
|
9
|
-
* Fiat codes are represented as [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) codes.
|
|
10
|
-
*
|
|
11
|
-
* Currently only `USD` is supported.
|
|
12
|
-
*
|
|
13
|
-
* **Crypto**
|
|
14
|
-
* For crypto currency codes, see [supported currencies](https://dev.moonpay.com/docs/list-of-supported-cryptocurrencies).
|
|
15
|
-
*
|
|
16
|
-
* Examples: `BTC` `SOL` `ETH` `USDC_BASE` `USDC_SOL`
|
|
17
|
-
*/
|
|
18
|
-
code: string;
|
|
19
|
-
/**
|
|
20
|
-
* The human-readable name
|
|
21
|
-
*/
|
|
22
|
-
name?: string;
|
|
23
|
-
/**
|
|
24
|
-
* The number of supported decimal places
|
|
25
|
-
*/
|
|
26
|
-
precision?: number;
|
|
27
|
-
};
|
|
28
|
-
type AssetBase = {
|
|
29
|
-
/**
|
|
30
|
-
* A fiat or crypto currency code.
|
|
31
|
-
*
|
|
32
|
-
* **Fiat**
|
|
33
|
-
* Fiat codes are represented as [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) codes.
|
|
34
|
-
*
|
|
35
|
-
* Currently only `USD` is supported.
|
|
36
|
-
*
|
|
37
|
-
* **Crypto**
|
|
38
|
-
* For crypto currency codes, see [supported currencies](https://dev.moonpay.com/docs/list-of-supported-cryptocurrencies).
|
|
39
|
-
*
|
|
40
|
-
* Examples: `BTC` `SOL` `ETH` `USDC_BASE` `USDC_SOL`
|
|
41
|
-
*/
|
|
42
|
-
code: string;
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* Current status flags for an asset.
|
|
46
|
-
*/
|
|
47
|
-
type AssetStatus = {
|
|
48
|
-
/**
|
|
49
|
-
* Temporarily unavailable for trading.
|
|
50
|
-
*/
|
|
51
|
-
suspended: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* Disabled for trading.
|
|
54
|
-
*/
|
|
55
|
-
disabled: boolean;
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* Bank account details and payment reference the customer uses to complete a bank transfer. Present only for bank-transfer payment methods such as SEPA and Faster Payments (FPS).
|
|
59
|
-
*/
|
|
60
|
-
type BankTransferDepositInfo = {
|
|
61
|
-
/**
|
|
62
|
-
* The payment reference the customer must include with the bank transfer so MoonPay can match the payment to the transaction. The customer must always include it - transfers sent without the reference are rejected.
|
|
63
|
-
*/
|
|
64
|
-
reference: string;
|
|
65
|
-
/**
|
|
66
|
-
* The name of the recipient account holder the customer should send the transfer to.
|
|
67
|
-
*/
|
|
68
|
-
recipientName: string;
|
|
69
|
-
/**
|
|
70
|
-
* The address of the recipient account holder the customer should send the transfer to.
|
|
71
|
-
*/
|
|
72
|
-
recipientAddress: string;
|
|
73
|
-
/**
|
|
74
|
-
* The account number of the recipient account. Provided for domestic transfers such as Faster Payments (FPS); UK account numbers are 8 digits.
|
|
75
|
-
*/
|
|
76
|
-
accountNumber?: string;
|
|
77
|
-
/**
|
|
78
|
-
* The address of the recipient's bank.
|
|
79
|
-
*/
|
|
80
|
-
bankAddress?: string;
|
|
81
|
-
/**
|
|
82
|
-
* The name of the recipient's bank.
|
|
83
|
-
*/
|
|
84
|
-
bankName?: string;
|
|
85
|
-
/**
|
|
86
|
-
* The BIC (SWIFT code) of the recipient account, 8 or 11 characters. Provided for SEPA transfers.
|
|
87
|
-
*/
|
|
88
|
-
bic?: string;
|
|
89
|
-
/**
|
|
90
|
-
* The IBAN of the recipient account (up to 34 alphanumeric characters). Provided for SEPA transfers.
|
|
91
|
-
*/
|
|
92
|
-
iban?: string;
|
|
93
|
-
/**
|
|
94
|
-
* The sort code of the recipient bank, 6 digits. Provided for domestic transfers such as Faster Payments (FPS).
|
|
95
|
-
*/
|
|
96
|
-
sortCode?: string;
|
|
97
|
-
};
|
|
98
|
-
/**
|
|
99
|
-
* Destination crypto asset. Identify it by `code` for CeFi assets, or by `caip19` (the CAIP-19 identifier from the assets listing) for DeFi tokens, whose `code` is not unique. Provide exactly one; `caip19` takes precedence if both are sent.
|
|
100
|
-
*/
|
|
101
|
-
type BuyQuoteDestinationAsset = {
|
|
102
|
-
/**
|
|
103
|
-
* CeFi currency code, e.g. `BTC` or `ETH`. Use for centralised assets.
|
|
104
|
-
*/
|
|
105
|
-
code?: string;
|
|
106
|
-
/**
|
|
107
|
-
* CAIP-19 asset identifier from the assets listing. Required for DeFi tokens.
|
|
108
|
-
*/
|
|
109
|
-
caip19?: string;
|
|
110
|
-
};
|
|
111
|
-
/**
|
|
112
|
-
* A platform capability a partner wants the customer to unlock.
|
|
113
|
-
*/
|
|
114
|
-
type CapabilityProduct = 'ramps';
|
|
115
|
-
/**
|
|
116
|
-
* The customer's primary purpose for the account.
|
|
117
|
-
*/
|
|
118
|
-
type CddAccountPurpose = 'investing' | 'payments' | 'purchasingDigitalAssets' | 'purchasingGoodsOrServices' | 'trading';
|
|
119
|
-
/**
|
|
120
|
-
* The customer's employment status.
|
|
121
|
-
*/
|
|
122
|
-
type CddEmploymentStatus = 'employedOrSelfEmployed' | 'retired' | 'student' | 'unemployed';
|
|
123
|
-
/**
|
|
124
|
-
* The customer's primary source of wealth.
|
|
125
|
-
*/
|
|
126
|
-
type CddSourceOfWealth = 'salary' | 'savings' | 'investments' | 'cryptoTrading' | 'other';
|
|
127
|
-
/**
|
|
128
|
-
* A challenge that must be resolved by rendering a MoonPay-hosted frame.
|
|
129
|
-
*/
|
|
130
|
-
type Challenge = {
|
|
131
|
-
/**
|
|
132
|
-
* The type of challenge resolution required.
|
|
133
|
-
*/
|
|
134
|
-
kind: ChallengeKind;
|
|
135
|
-
/**
|
|
136
|
-
* Fully-formed challenge frame URL. Render directly without parsing.
|
|
137
|
-
*/
|
|
138
|
-
url: string;
|
|
139
|
-
};
|
|
140
|
-
type ChallengeKind = 'frame';
|
|
141
|
-
/**
|
|
142
|
-
* Request body for creating an identity.
|
|
143
|
-
*/
|
|
144
|
-
type CreateIdentityRequestBody = {
|
|
145
|
-
/**
|
|
146
|
-
* The customer's residential address. At creation only `country` is accepted; remaining fields are submitted via PATCH /platform/v1/identities/{id}.
|
|
147
|
-
*/
|
|
148
|
-
residentialAddress: CreateIdentityResidentialAddress;
|
|
149
|
-
/**
|
|
150
|
-
* Capabilities the partner wants the customer to unlock. Must contain at least one value.
|
|
151
|
-
*/
|
|
152
|
-
capabilities: Array<IdentityCapability>;
|
|
153
|
-
};
|
|
154
|
-
/**
|
|
155
|
-
* Residential-address fields accepted at identity creation. Only the partner-declared country is required at this stage; remaining address fields are submitted via PATCH /platform/v1/identities/{id}.
|
|
156
|
-
*/
|
|
157
|
-
type CreateIdentityResidentialAddress = {
|
|
158
|
-
/**
|
|
159
|
-
* ISO 3166-1 alpha-3 country code declared by the partner.
|
|
160
|
-
*/
|
|
161
|
-
country: string;
|
|
162
|
-
};
|
|
163
|
-
type CreateSessionTokenRequestBody = {
|
|
164
|
-
/**
|
|
165
|
-
* A unique identifier for the customer from your system.
|
|
166
|
-
*/
|
|
167
|
-
externalCustomerId?: string;
|
|
168
|
-
/**
|
|
169
|
-
* The IP address of the user's device to ensure the integrity of the session. Both IPv4 and IPv6 values are supported.
|
|
170
|
-
*/
|
|
171
|
-
deviceIp: IPv4Address | IPv6Address;
|
|
172
|
-
/**
|
|
173
|
-
* The customer's email address. Must be a valid email. If provided, enables email OTP authentication.
|
|
174
|
-
*/
|
|
175
|
-
email?: string;
|
|
176
|
-
/**
|
|
177
|
-
* The customer's phone number in E.164 format. If both email and phone are provided, enables phone OTP authentication for returning customers.
|
|
178
|
-
*/
|
|
179
|
-
phoneNumber?: string;
|
|
180
|
-
/**
|
|
181
|
-
* An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of when the customer accepted MoonPay's Terms of Use. Send this when you capture Terms of Use acceptance in your own UI. The value can be at most 60 seconds ahead of server time, with no past limit. MoonPay records the terms version live at this timestamp and binds the acceptance to the customer when the session is authorized. Only send this field if you use the Customer API or Guest Checkout; otherwise the request fails with a 503 `service_unavailable` error.
|
|
182
|
-
*/
|
|
183
|
-
termsAcceptedAt?: string;
|
|
184
|
-
};
|
|
185
|
-
type CreateSessionTokenResponse = {
|
|
186
|
-
/**
|
|
187
|
-
* An opaque session token used to set up a connection on your frontend. This token is single-use and must be generated each time the customer visits your app.
|
|
188
|
-
*
|
|
189
|
-
* Token expires 24 hours after issuance.
|
|
190
|
-
*/
|
|
191
|
-
sessionToken: string;
|
|
192
|
-
};
|
|
193
|
-
/**
|
|
194
|
-
* A MoonPay customer as seen by a partner.
|
|
195
|
-
*/
|
|
196
|
-
type Customer = {
|
|
197
|
-
/**
|
|
198
|
-
* The customer's unique MoonPay identifier.
|
|
199
|
-
*/
|
|
200
|
-
id: string;
|
|
201
|
-
/**
|
|
202
|
-
* The partner-provided identifier for this customer, if one was supplied. Null when the customer connected without an external identifier.
|
|
203
|
-
*/
|
|
204
|
-
externalCustomerId: string | null;
|
|
205
|
-
/**
|
|
206
|
-
* KYC details for the customer.
|
|
207
|
-
*/
|
|
208
|
-
kyc: CustomerKyc;
|
|
209
|
-
};
|
|
210
|
-
/**
|
|
211
|
-
* Answers for the Customer Due Diligence questionnaire.
|
|
212
|
-
*/
|
|
213
|
-
type CustomerDueDiligenceAnswers = {
|
|
214
|
-
/**
|
|
215
|
-
* The customer's employment status.
|
|
216
|
-
*/
|
|
217
|
-
employmentStatus: CddEmploymentStatus;
|
|
218
|
-
/**
|
|
219
|
-
* The customer's primary purpose for the account.
|
|
220
|
-
*/
|
|
221
|
-
accountPurpose: CddAccountPurpose;
|
|
222
|
-
/**
|
|
223
|
-
* The customer's gross annual income. Denominate the amount in the reporting currency for the customer's `residentialAddress.country`. See `MonetaryAmount` for the country-to-currency mapping. If the customer's local currency differs, convert the amount to the reporting currency before submitting, using a current exchange rate.
|
|
224
|
-
*/
|
|
225
|
-
grossAnnualIncome: MonetaryAmount;
|
|
226
|
-
/**
|
|
227
|
-
* The customer's primary source of wealth.
|
|
228
|
-
*/
|
|
229
|
-
sourceOfWealth: CddSourceOfWealth;
|
|
230
|
-
/**
|
|
231
|
-
* Expected number of transactions per month, a strictly positive integer.
|
|
232
|
-
*/
|
|
233
|
-
transactionFrequencyPerMonth: number;
|
|
234
|
-
/**
|
|
235
|
-
* Expected total transaction amount per month. Denominate the amount in the reporting currency for the customer's `residentialAddress.country`. See `MonetaryAmount` for the country-to-currency mapping.
|
|
236
|
-
*/
|
|
237
|
-
expectedTransactionAmountPerMonth: MonetaryAmount;
|
|
238
|
-
};
|
|
239
|
-
/**
|
|
240
|
-
* The customer's basic personal details from their verified MoonPay identity.
|
|
241
|
-
*/
|
|
242
|
-
type CustomerExportBasicDetails = {
|
|
243
|
-
/**
|
|
244
|
-
* Customer's first/given name. `null` for mononymous customers recorded with only a last name.
|
|
245
|
-
*/
|
|
246
|
-
firstName: string | null;
|
|
247
|
-
/**
|
|
248
|
-
* Customer's last/family name. `null` for mononymous customers recorded with only a first name.
|
|
249
|
-
*/
|
|
250
|
-
lastName: string | null;
|
|
251
|
-
/**
|
|
252
|
-
* Customer's date of birth in `YYYY-MM-DD` format. `null` when MoonPay does not hold this value.
|
|
253
|
-
*/
|
|
254
|
-
dateOfBirth: string | null;
|
|
255
|
-
/**
|
|
256
|
-
* Customer's nationality as an [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code. `null` when MoonPay does not hold this value.
|
|
257
|
-
*/
|
|
258
|
-
nationality: string | null;
|
|
259
|
-
};
|
|
260
|
-
/**
|
|
261
|
-
* An identity-related file on the customer's verified MoonPay identity, including a pre-signed download URL.
|
|
262
|
-
*/
|
|
263
|
-
type CustomerExportFile = {
|
|
264
|
-
/**
|
|
265
|
-
* MoonPay's identifier for the file.
|
|
266
|
-
*/
|
|
267
|
-
id: string;
|
|
268
|
-
/**
|
|
269
|
-
* Type of file.
|
|
270
|
-
*/
|
|
271
|
-
type: CustomerExportFileType;
|
|
272
|
-
/**
|
|
273
|
-
* Side of the document. Present for two-sided file types; omitted for single-sided.
|
|
274
|
-
*/
|
|
275
|
-
side?: CustomerExportFileSide;
|
|
276
|
-
/**
|
|
277
|
-
* Timestamp at which MoonPay received the file.
|
|
278
|
-
*/
|
|
279
|
-
uploadedAt: string;
|
|
280
|
-
/**
|
|
281
|
-
* A pre-signed URL for downloading the file. The URL expires 60 minutes after the response is returned. Do not attach your API key when fetching it; the signature is the only credential required.
|
|
282
|
-
*/
|
|
283
|
-
downloadUrl: string;
|
|
284
|
-
};
|
|
285
|
-
/**
|
|
286
|
-
* Side of a two-sided identity document. Present for `driving_licence`, `national_identity_card`, and `residence_permit`; omitted for single-sided file types.
|
|
287
|
-
*/
|
|
288
|
-
type CustomerExportFileSide = 'front' | 'back';
|
|
289
|
-
/**
|
|
290
|
-
* Type of identity-related file referenced in the verified identity payload.
|
|
291
|
-
*/
|
|
292
|
-
type CustomerExportFileType = 'driving_licence' | 'national_identity_card' | 'passport' | 'residence_permit' | 'selfie' | 'proof_of_address';
|
|
293
|
-
/**
|
|
294
|
-
* The customer's MoonPay-verified identity. All fields are populated from the customer's latest approved identity verification.
|
|
295
|
-
*/
|
|
296
|
-
type CustomerExportIdentity = {
|
|
297
|
-
/**
|
|
298
|
-
* The customer's basic personal details.
|
|
299
|
-
*/
|
|
300
|
-
basicDetails: CustomerExportBasicDetails;
|
|
301
|
-
/**
|
|
302
|
-
* The customer's residential address.
|
|
303
|
-
*/
|
|
304
|
-
residentialAddress: CustomerExportResidentialAddress;
|
|
305
|
-
/**
|
|
306
|
-
* The customer's phone number.
|
|
307
|
-
*/
|
|
308
|
-
phoneNumber: CustomerExportPhoneNumber;
|
|
309
|
-
/**
|
|
310
|
-
* Tax identifiers recorded on the customer's identity. Empty when the customer has no recorded tax identifiers.
|
|
311
|
-
*/
|
|
312
|
-
taxIdentifiers: Array<CustomerExportTaxIdentifier>;
|
|
313
|
-
/**
|
|
314
|
-
* Identity-related files the customer has submitted, each with a pre-signed download URL.
|
|
315
|
-
*/
|
|
316
|
-
files: Array<CustomerExportFile>;
|
|
317
|
-
};
|
|
318
|
-
/**
|
|
319
|
-
* The customer's phone number from their verified MoonPay identity.
|
|
320
|
-
*/
|
|
321
|
-
type CustomerExportPhoneNumber = {
|
|
322
|
-
/**
|
|
323
|
-
* The customer's phone number in [E.164](https://en.wikipedia.org/wiki/E.164) format. `null` when MoonPay does not hold this value.
|
|
324
|
-
*/
|
|
325
|
-
number: string | null;
|
|
326
|
-
};
|
|
327
|
-
/**
|
|
328
|
-
* The customer's residential address from their verified MoonPay identity.
|
|
329
|
-
*/
|
|
330
|
-
type CustomerExportResidentialAddress = {
|
|
331
|
-
/**
|
|
332
|
-
* Country of the residential address as an [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code. `null` when MoonPay does not hold this value.
|
|
333
|
-
*/
|
|
334
|
-
country: string | null;
|
|
335
|
-
/**
|
|
336
|
-
* State, province, or territory. Present when the country has subdivisions recognised by MoonPay (currently USA and CAN); `null` when MoonPay does not hold this value for those countries. Omitted for all other countries.
|
|
337
|
-
*/
|
|
338
|
-
administrativeArea?: string | null;
|
|
339
|
-
/**
|
|
340
|
-
* City, town, or locality. `null` when MoonPay does not hold this value.
|
|
341
|
-
*/
|
|
342
|
-
locality: string | null;
|
|
343
|
-
/**
|
|
344
|
-
* First line of the residential address (street). `null` when MoonPay does not hold this value.
|
|
345
|
-
*/
|
|
346
|
-
street: string | null;
|
|
347
|
-
/**
|
|
348
|
-
* Optional second line of the residential address (apartment, unit, building). Omitted when MoonPay does not hold this value.
|
|
349
|
-
*/
|
|
350
|
-
subStreet?: string;
|
|
351
|
-
/**
|
|
352
|
-
* Postal or ZIP code. `null` when MoonPay does not hold this value.
|
|
353
|
-
*/
|
|
354
|
-
postalCode: string | null;
|
|
355
|
-
};
|
|
356
|
-
/**
|
|
357
|
-
* A tax identifier on the customer's verified MoonPay identity.
|
|
358
|
-
*/
|
|
359
|
-
type CustomerExportTaxIdentifier = {
|
|
360
|
-
/**
|
|
361
|
-
* Type of tax identifier.
|
|
362
|
-
*/
|
|
363
|
-
type: CustomerExportTaxIdentifierType;
|
|
364
|
-
/**
|
|
365
|
-
* Country issuing the identifier as an ISO 3166-1 alpha-3 code. Present for `tin` entries; omitted for country-specific schemes (`ssn`, `cpf`).
|
|
366
|
-
*/
|
|
367
|
-
country?: string;
|
|
368
|
-
/**
|
|
369
|
-
* Identifier value as recorded by MoonPay.
|
|
370
|
-
*/
|
|
371
|
-
value: string;
|
|
372
|
-
};
|
|
373
|
-
/**
|
|
374
|
-
* Type of tax identifier returned in the verified identity payload.
|
|
375
|
-
*/
|
|
376
|
-
type CustomerExportTaxIdentifierType = 'tin' | 'ssn' | 'cpf';
|
|
377
|
-
/**
|
|
378
|
-
* KYC details for a customer.
|
|
379
|
-
*/
|
|
380
|
-
type CustomerKyc = {
|
|
381
|
-
/**
|
|
382
|
-
* The customer's KYC standing.
|
|
383
|
-
*/
|
|
384
|
-
status: CustomerKycStatus;
|
|
385
|
-
/**
|
|
386
|
-
* Outstanding and completed KYC requirements for the customer.
|
|
387
|
-
*/
|
|
388
|
-
requirements: Requirements;
|
|
389
|
-
/**
|
|
390
|
-
* Hosted challenge the partner must surface to the customer.
|
|
391
|
-
*/
|
|
392
|
-
challenge?: IdentityVerificationChallenge;
|
|
393
|
-
};
|
|
394
|
-
/**
|
|
395
|
-
* The customer's KYC standing with you. `not_created` means no KYC session exists yet for this customer.
|
|
396
|
-
*/
|
|
397
|
-
type CustomerKycStatus = 'collecting' | 'verifying' | 'active' | 'unavailable' | 'not_created';
|
|
398
|
-
/**
|
|
399
|
-
* The customer's profession.
|
|
400
|
-
*/
|
|
401
|
-
type EddProfession = 'agriculture' | 'artsAndEntertainment' | 'businessOwner' | 'education' | 'financialServices' | 'healthcare' | 'industrialTradesAndTransport' | 'informationAndTechnology' | 'legalAndProfessionalServices' | 'publicSector' | 'realEstate' | 'retail' | 'seniorManagement';
|
|
402
|
-
/**
|
|
403
|
-
* Answers for the Enhanced Due Diligence questionnaire.
|
|
404
|
-
*/
|
|
405
|
-
type EnhancedDueDiligenceAnswers = {
|
|
406
|
-
/**
|
|
407
|
-
* The customer's profession.
|
|
408
|
-
*/
|
|
409
|
-
profession: EddProfession;
|
|
410
|
-
/**
|
|
411
|
-
* The customer's net worth. Denominate the amount in the reporting currency for the customer's `residentialAddress.country`. See `MonetaryAmount` for the country-to-currency mapping.
|
|
412
|
-
*/
|
|
413
|
-
netWorth: MonetaryAmount;
|
|
414
|
-
};
|
|
415
|
-
/**
|
|
416
|
-
* Whether the quote's exchange rate is locked at quote time or an estimate confirmed at settlement.
|
|
417
|
-
*/
|
|
418
|
-
type ExchangeRateType = 'fixed' | 'floating';
|
|
419
|
-
/**
|
|
420
|
-
* Controls how MoonPay fees relate to `source.amount`. `inclusive`: fees are taken out of `source.amount` (the customer pays exactly `source.amount`). `exclusive`: `source.amount` is the amount to convert and fees are added on top (the customer pays `source.amount` plus fees). Only affects quotes priced by `source.amount`; ignored when quoting by `destination.amount`.
|
|
421
|
-
*/
|
|
422
|
-
type FeeBehavior = 'inclusive' | 'exclusive';
|
|
423
|
-
type Fees = {
|
|
424
|
-
/**
|
|
425
|
-
* Network fees (in fiat) for the transaction.
|
|
426
|
-
*/
|
|
427
|
-
network?: MonetaryFeeAmount;
|
|
428
|
-
/**
|
|
429
|
-
* MoonPay fees (in fiat) for the transaction.
|
|
430
|
-
*/
|
|
431
|
-
moonpay?: MonetaryFeeAmount;
|
|
432
|
-
/**
|
|
433
|
-
* Ecosystem fees (in fiat) for the transaction, if applicable.
|
|
434
|
-
*/
|
|
435
|
-
ecosystem?: MonetaryFeeAmount;
|
|
436
|
-
/**
|
|
437
|
-
* DeFi swap fee (in fiat) for the transaction, converted to the quote's base currency like the other fees. Present only for DeFi swaps that carry an itemized swap fee; when the fee is taken on-chain it is reflected in `destination.amount` instead.
|
|
438
|
-
*/
|
|
439
|
-
defi?: MonetaryFeeAmount;
|
|
440
|
-
/**
|
|
441
|
-
* Partner fees (in fiat) for the transaction, if applicable. Deprecated: use `fees.ecosystem` instead. This field will be removed in a future release.
|
|
442
|
-
* @deprecated
|
|
443
|
-
*/
|
|
444
|
-
partner?: MonetaryFeeAmount;
|
|
445
|
-
};
|
|
446
|
-
/**
|
|
447
|
-
* Subtype of a proof-of-income document. Must be permitted for the declared `sourceOfWealth`.
|
|
448
|
-
*/
|
|
449
|
-
type FileSubtype = 'payslip' | 'bankStatement' | 'accountScreenshot' | 'companyRegisterScreenshot' | 'dividendDistributionCertificate' | 'investmentPortfolioStatement' | 'invoice' | 'pensionStatement' | 'rentalAgreement' | 'saleContract' | 'signedLetterFromSolicitorOrTrustee';
|
|
450
|
-
type GetQuoteBody = {
|
|
451
|
-
/**
|
|
452
|
-
* Source asset in fiat. Amount can be set in `source` or `destination`.
|
|
453
|
-
*/
|
|
454
|
-
source: {
|
|
455
|
-
/**
|
|
456
|
-
* The currency or token being spent
|
|
457
|
-
*/
|
|
458
|
-
asset: AssetBase;
|
|
459
|
-
/**
|
|
460
|
-
* A stringified amount, which can include decimals.
|
|
461
|
-
*/
|
|
462
|
-
amount?: string;
|
|
463
|
-
};
|
|
464
|
-
/**
|
|
465
|
-
* Destination asset in crypto. Amount can be set in `destination` or `source`. For DeFi tokens, identify the asset by `caip19` and set the amount on `source` only (quoting by destination token amount is not supported).
|
|
466
|
-
*/
|
|
467
|
-
destination: {
|
|
468
|
-
asset: BuyQuoteDestinationAsset;
|
|
469
|
-
/**
|
|
470
|
-
* The amount being received, if known
|
|
471
|
-
*/
|
|
472
|
-
amount?: string;
|
|
473
|
-
};
|
|
474
|
-
/**
|
|
475
|
-
* Wallet address and optional tag where the crypto will be sent. Required for the quote to be executable.
|
|
476
|
-
*/
|
|
477
|
-
wallet?: Wallet;
|
|
478
|
-
/**
|
|
479
|
-
* Payment method for the transaction. Required for the quote to be executable.
|
|
480
|
-
*/
|
|
481
|
-
paymentMethod?: QuotePaymentMethod;
|
|
482
|
-
/**
|
|
483
|
-
* Whether MoonPay fees are included in `source.amount` (`inclusive`) or added on top of it (`exclusive`). Defaults to `inclusive`. Only applies when quoting by `source.amount`; ignored when `destination.amount` is provided.
|
|
484
|
-
*/
|
|
485
|
-
feeBehavior?: FeeBehavior;
|
|
486
|
-
};
|
|
487
|
-
/**
|
|
488
|
-
* Quote for a fiat-to-crypto buy. Contains locked rate, fees, expiry, and signature for payment execution.
|
|
489
|
-
*/
|
|
490
|
-
type GetQuoteResponse = {
|
|
491
|
-
/**
|
|
492
|
-
* Source side of the quote: amount and asset (fiat currency) you send.
|
|
493
|
-
*/
|
|
494
|
-
source: {
|
|
495
|
-
/**
|
|
496
|
-
* A stringified amount, which can include decimals.
|
|
497
|
-
*/
|
|
498
|
-
amount: string;
|
|
499
|
-
/**
|
|
500
|
-
* The currency or token being spent
|
|
501
|
-
*/
|
|
502
|
-
asset: Asset;
|
|
503
|
-
};
|
|
504
|
-
/**
|
|
505
|
-
* Destination side of the quote: amount and asset (cryptocurrency) the customer receives.
|
|
506
|
-
*/
|
|
507
|
-
destination: {
|
|
508
|
-
/**
|
|
509
|
-
* A stringified amount, which can include decimals.
|
|
510
|
-
*/
|
|
511
|
-
amount: string;
|
|
512
|
-
asset: QuoteDestinationAsset;
|
|
513
|
-
};
|
|
514
|
-
/**
|
|
515
|
-
* Breakdown of network, MoonPay, and ecosystem fees.
|
|
516
|
-
*/
|
|
517
|
-
fees: Fees;
|
|
518
|
-
/**
|
|
519
|
-
* Wallet address and optional tag where the crypto will be sent. Null when not provided.
|
|
520
|
-
*/
|
|
521
|
-
wallet: Wallet | null;
|
|
522
|
-
/**
|
|
523
|
-
* The payment method used for the quote.
|
|
524
|
-
*/
|
|
525
|
-
paymentMethod: QuotePaymentMethod | null;
|
|
526
|
-
/**
|
|
527
|
-
* How MoonPay fees relate to `source.amount` in this quote. Echoes the requested `feeBehavior`; always `inclusive` when the quote was priced by `destination.amount`.
|
|
528
|
-
*/
|
|
529
|
-
feeBehavior: FeeBehavior;
|
|
530
|
-
limits: QuoteLimits | null;
|
|
531
|
-
/**
|
|
532
|
-
* An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of when the quote expires.
|
|
533
|
-
*/
|
|
534
|
-
expiresAt: string;
|
|
535
|
-
/**
|
|
536
|
-
* Whether the quote can be executed. Only `executable` quotes can be used to initiate payment frames.
|
|
537
|
-
*/
|
|
538
|
-
executable: boolean;
|
|
539
|
-
/**
|
|
540
|
-
* The rate used to convert fiat <-> crypto, expressed as the fiat value of one unit of crypto (e.g. `1 SOL = {exchangeRate} USD`).
|
|
541
|
-
*/
|
|
542
|
-
exchangeRate: string;
|
|
543
|
-
/**
|
|
544
|
-
* Whether the quote's exchange rate is `fixed` (locked at quote time, e.g. cards, Apple Pay, Google Pay) or `floating` (an estimate confirmed when the payment settles, e.g. bank transfers).
|
|
545
|
-
*/
|
|
546
|
-
exchangeRateType: ExchangeRateType;
|
|
547
|
-
/**
|
|
548
|
-
* Slippage tolerance applied to the DeFi swap, in basis points (e.g. `50` = 0.5%). Only present when the destination is a DeFi token.
|
|
549
|
-
*/
|
|
550
|
-
slippageBps?: number;
|
|
551
|
-
/**
|
|
552
|
-
* Disclosures the partner must render verbatim before the customer can complete the transaction. Empty when no disclosure is required for the customer's geography, payment method, and asset combination.
|
|
553
|
-
*/
|
|
554
|
-
paymentDisclosures: Array<PaymentDisclosure>;
|
|
555
|
-
/**
|
|
556
|
-
* An opaque token representing the quote to initiate payment frames.
|
|
557
|
-
*/
|
|
558
|
-
signature: string;
|
|
559
|
-
/**
|
|
560
|
-
* A challenge the partner must surface and the customer must complete before the quote can proceed — for example, verifying identity to raise guest-checkout limits. Present only when the quote requires one; omitted otherwise.
|
|
561
|
-
*/
|
|
562
|
-
challenge?: Challenge;
|
|
563
|
-
};
|
|
564
|
-
type IPv4Address = string;
|
|
565
|
-
type IPv6Address = string;
|
|
566
|
-
/**
|
|
567
|
-
* A KYC identity.
|
|
568
|
-
*/
|
|
569
|
-
type Identity = {
|
|
570
|
-
/**
|
|
571
|
-
* Unique identifier for the identity.
|
|
572
|
-
*/
|
|
573
|
-
id: string;
|
|
574
|
-
/**
|
|
575
|
-
* Current state of the identity across the KYC lifecycle.
|
|
576
|
-
*/
|
|
577
|
-
status: IdentityStatus;
|
|
578
|
-
/**
|
|
579
|
-
* Capabilities scoped to the identity.
|
|
580
|
-
*/
|
|
581
|
-
capabilities: Array<IdentityCapability>;
|
|
582
|
-
/**
|
|
583
|
-
* Outstanding and completed requirements for the identity.
|
|
584
|
-
*/
|
|
585
|
-
requirements: Requirements;
|
|
586
|
-
/**
|
|
587
|
-
* Hosted challenge the partner must surface to the customer. Present only when `status` is `challengeRequired`. The `url` and `expiresAt` match the values returned by `POST /platform/v1/identities/{id}/verifications` for the same identity.
|
|
588
|
-
*/
|
|
589
|
-
challenge?: IdentityVerificationChallenge;
|
|
590
|
-
/**
|
|
591
|
-
* Timestamp at which the identity was created.
|
|
592
|
-
*/
|
|
593
|
-
createdAt: string;
|
|
594
|
-
/**
|
|
595
|
-
* Timestamp at which the identity was last updated.
|
|
596
|
-
*/
|
|
597
|
-
updatedAt: string;
|
|
598
|
-
};
|
|
599
|
-
/**
|
|
600
|
-
* The customer's basic personal details (name, nationality, date of birth).
|
|
601
|
-
*/
|
|
602
|
-
type IdentityBasicDetailsSubmission = {
|
|
603
|
-
/**
|
|
604
|
-
* Customer's first/given name.
|
|
605
|
-
*/
|
|
606
|
-
firstName?: string;
|
|
607
|
-
/**
|
|
608
|
-
* Customer's last/family name.
|
|
609
|
-
*/
|
|
610
|
-
lastName?: string;
|
|
611
|
-
/**
|
|
612
|
-
* Customer's nationality (ISO 3166-1 alpha-3 country code).
|
|
613
|
-
*/
|
|
614
|
-
nationality?: string;
|
|
615
|
-
/**
|
|
616
|
-
* Customer's date of birth (YYYY-MM-DD).
|
|
617
|
-
*/
|
|
618
|
-
dateOfBirth?: string;
|
|
619
|
-
};
|
|
620
|
-
/**
|
|
621
|
-
* A requested capability scoped to an identity.
|
|
622
|
-
*/
|
|
623
|
-
type IdentityCapability = {
|
|
624
|
-
/**
|
|
625
|
-
* The product the capability unlocks.
|
|
626
|
-
*/
|
|
627
|
-
product: CapabilityProduct;
|
|
628
|
-
};
|
|
629
|
-
/**
|
|
630
|
-
* A Customer Due Diligence questionnaire submission.
|
|
631
|
-
*/
|
|
632
|
-
type IdentityCustomerDueDiligenceSubmission = {
|
|
633
|
-
/**
|
|
634
|
-
* Identifies which questionnaire these answers are for.
|
|
635
|
-
*/
|
|
636
|
-
type: 'customerDueDiligence';
|
|
637
|
-
/**
|
|
638
|
-
* The questionnaire answers.
|
|
639
|
-
*/
|
|
640
|
-
answers: CustomerDueDiligenceAnswers;
|
|
641
|
-
};
|
|
642
|
-
/**
|
|
643
|
-
* An Enhanced Due Diligence questionnaire submission.
|
|
644
|
-
*/
|
|
645
|
-
type IdentityEnhancedDueDiligenceSubmission = {
|
|
646
|
-
/**
|
|
647
|
-
* Identifies which questionnaire these answers are for.
|
|
648
|
-
*/
|
|
649
|
-
type: 'enhancedDueDiligence';
|
|
650
|
-
/**
|
|
651
|
-
* The questionnaire answers.
|
|
652
|
-
*/
|
|
653
|
-
answers: EnhancedDueDiligenceAnswers;
|
|
654
|
-
};
|
|
655
|
-
/**
|
|
656
|
-
* MIME type of the file being uploaded.
|
|
657
|
-
*/
|
|
658
|
-
type IdentityFileMimeType = 'image/jpeg' | 'image/png' | 'application/pdf';
|
|
659
|
-
/**
|
|
660
|
-
* Side of a two-sided identity document being uploaded.
|
|
661
|
-
*/
|
|
662
|
-
type IdentityFileSide = 'front' | 'back';
|
|
663
|
-
/**
|
|
664
|
-
* A single uploaded file the partner is confirming for submission.
|
|
665
|
-
*/
|
|
666
|
-
type IdentityFileSubmission = {
|
|
667
|
-
/**
|
|
668
|
-
* `uploadId` returned by `POST /files/upload-url`.
|
|
669
|
-
*/
|
|
670
|
-
uploadId: string;
|
|
671
|
-
/**
|
|
672
|
-
* Type of file being submitted. Must match the `fileType` declared when the upload URL was issued.
|
|
673
|
-
*/
|
|
674
|
-
fileType: IdentityFileType;
|
|
675
|
-
/**
|
|
676
|
-
* Side of the document. Required for two-sided file types; omit for single-sided. Must match the `side` declared when the upload URL was issued.
|
|
677
|
-
*/
|
|
678
|
-
side?: IdentityFileSide;
|
|
679
|
-
/**
|
|
680
|
-
* Source of wealth the file evidences. Required for `proofOfIncome`; must match the value declared when the upload URL was issued.
|
|
681
|
-
*/
|
|
682
|
-
sourceOfWealth?: SourceOfWealth;
|
|
683
|
-
/**
|
|
684
|
-
* Document subtype. Required for `proofOfIncome`; must match the value declared when the upload URL was issued.
|
|
685
|
-
*/
|
|
686
|
-
subtype?: FileSubtype;
|
|
687
|
-
};
|
|
688
|
-
/**
|
|
689
|
-
* Type of identity-related file the customer is uploading.
|
|
690
|
-
*/
|
|
691
|
-
type IdentityFileType = 'drivingLicence' | 'nationalIdentityCard' | 'passport' | 'residencePermit' | 'selfie' | 'proofOfAddress' | 'proofOfIncome';
|
|
692
|
-
/**
|
|
693
|
-
* Presigned URL the partner uses to upload an identity-related file directly to MoonPay storage.
|
|
694
|
-
*/
|
|
695
|
-
type IdentityFileUploadUrl = {
|
|
696
|
-
/**
|
|
697
|
-
* Identifier of the upload. Use this value to refer to the file in subsequent submission calls.
|
|
698
|
-
*/
|
|
699
|
-
uploadId: string;
|
|
700
|
-
/**
|
|
701
|
-
* Fully-formed presigned URL. PUT the file body to this URL using the headers in `headers` within the validity window expressed by `expiresAt`.
|
|
702
|
-
*/
|
|
703
|
-
url: string;
|
|
704
|
-
/**
|
|
705
|
-
* Timestamp at which the presigned URL expires. Partners must complete the upload before this time.
|
|
706
|
-
*/
|
|
707
|
-
expiresAt: string;
|
|
708
|
-
/**
|
|
709
|
-
* Headers the partner must set on the upload request.
|
|
710
|
-
*/
|
|
711
|
-
headers: IdentityFileUploadUrlHeaders;
|
|
712
|
-
};
|
|
713
|
-
/**
|
|
714
|
-
* Headers the partner must send when uploading the file to the presigned URL.
|
|
715
|
-
*/
|
|
716
|
-
type IdentityFileUploadUrlHeaders = {
|
|
717
|
-
/**
|
|
718
|
-
* Content-Type header value. Must match the `mimeType` requested.
|
|
719
|
-
*/
|
|
720
|
-
'Content-Type': string;
|
|
721
|
-
};
|
|
722
|
-
/**
|
|
723
|
-
* Request body for issuing a presigned upload URL for an identity-related file.
|
|
724
|
-
*/
|
|
725
|
-
type IdentityFileUploadUrlRequestBody = {
|
|
726
|
-
/**
|
|
727
|
-
* Type of file the customer is uploading.
|
|
728
|
-
*/
|
|
729
|
-
fileType: IdentityFileType;
|
|
730
|
-
/**
|
|
731
|
-
* Side of the document being uploaded. Required for two-sided file types (`drivingLicence`, `nationalIdentityCard`, `residencePermit`); must be omitted for single-sided file types.
|
|
732
|
-
*/
|
|
733
|
-
side?: IdentityFileSide;
|
|
734
|
-
/**
|
|
735
|
-
* MIME type of the file being uploaded. Must match the `Content-Type` header used on the subsequent upload request.
|
|
736
|
-
*/
|
|
737
|
-
mimeType: IdentityFileMimeType;
|
|
738
|
-
/**
|
|
739
|
-
* Source of wealth the file evidences. Required for `proofOfIncome`; must be omitted for all other file types.
|
|
740
|
-
*/
|
|
741
|
-
sourceOfWealth?: SourceOfWealth;
|
|
742
|
-
/**
|
|
743
|
-
* Document subtype. Required for `proofOfIncome` and must be permitted for the declared `sourceOfWealth`; must be omitted for all other file types.
|
|
744
|
-
*/
|
|
745
|
-
subtype?: FileSubtype;
|
|
746
|
-
};
|
|
747
|
-
/**
|
|
748
|
-
* The customer's phone number submission. Submit only when the phoneNumber requirement is outstanding.
|
|
749
|
-
*/
|
|
750
|
-
type IdentityPhoneNumberSubmission = {
|
|
751
|
-
/**
|
|
752
|
-
* The customer's phone number in E.164 format.
|
|
753
|
-
*/
|
|
754
|
-
number: string;
|
|
755
|
-
};
|
|
756
|
-
/**
|
|
757
|
-
* A due-diligence questionnaire the customer is submitting.
|
|
758
|
-
*/
|
|
759
|
-
type IdentityQuestionnaireSubmission = IdentityCustomerDueDiligenceSubmission | IdentityEnhancedDueDiligenceSubmission;
|
|
760
|
-
/**
|
|
761
|
-
* The customer's residential address. Submit only the fields listed as outstanding under the residentialAddress requirement on the identity.
|
|
762
|
-
*/
|
|
763
|
-
type IdentityResidentialAddressSubmission = {
|
|
764
|
-
/**
|
|
765
|
-
* ISO 3166-1 alpha-3 country code.
|
|
766
|
-
*/
|
|
767
|
-
country?: string;
|
|
768
|
-
/**
|
|
769
|
-
* State, province, or territory. Required for country values that have subdivisions recognised by the platform (currently USA and CAN).
|
|
770
|
-
*/
|
|
771
|
-
administrativeArea?: string;
|
|
772
|
-
/**
|
|
773
|
-
* City, town, or locality of the residential address.
|
|
774
|
-
*/
|
|
775
|
-
locality?: string;
|
|
776
|
-
/**
|
|
777
|
-
* First line of the residential address (street).
|
|
778
|
-
*/
|
|
779
|
-
street?: string;
|
|
780
|
-
/**
|
|
781
|
-
* Optional second line of the residential address (apartment, unit, building).
|
|
782
|
-
*/
|
|
783
|
-
subStreet?: string;
|
|
784
|
-
/**
|
|
785
|
-
* Postal or ZIP code of the residential address.
|
|
786
|
-
*/
|
|
787
|
-
postalCode?: string;
|
|
788
|
-
};
|
|
789
|
-
/**
|
|
790
|
-
* The state of an identity across the KYC lifecycle.
|
|
791
|
-
*/
|
|
792
|
-
type IdentityStatus = 'created' | 'collecting' | 'verifying' | 'challengeRequired' | 'approved' | 'rejected' | 'manualReview' | 'blocked';
|
|
793
|
-
/**
|
|
794
|
-
* Submission for a Tax Identification Number. Partners supply the issuing country in the `country` field.
|
|
795
|
-
*/
|
|
796
|
-
type IdentityTaxIdentifierGenericSubmission = {
|
|
797
|
-
/**
|
|
798
|
-
* Identifies this entry as a TIN submission.
|
|
799
|
-
*/
|
|
800
|
-
type: 'tin';
|
|
801
|
-
/**
|
|
802
|
-
* Country issuing the TIN, as an ISO 3166-1 alpha-3 country code.
|
|
803
|
-
*/
|
|
804
|
-
country: string;
|
|
805
|
-
/**
|
|
806
|
-
* The TIN value as issued by the country's tax authority.
|
|
807
|
-
*/
|
|
808
|
-
value: string;
|
|
809
|
-
};
|
|
810
|
-
/**
|
|
811
|
-
* Submission for a country-specific tax identifier (SSN or CPF). The country is fixed by `type`; no `country` value is required.
|
|
812
|
-
*/
|
|
813
|
-
type IdentityTaxIdentifierSchemeSubmission = {
|
|
814
|
-
/**
|
|
815
|
-
* Identifies which country-specific scheme this submission targets.
|
|
816
|
-
*/
|
|
817
|
-
type: 'ssn' | 'cpf';
|
|
818
|
-
/**
|
|
819
|
-
* The identifier value, formatted as expected by the issuing scheme.
|
|
820
|
-
*/
|
|
821
|
-
value: string;
|
|
822
|
-
};
|
|
823
|
-
/**
|
|
824
|
-
* A tax identifier the customer is submitting.
|
|
825
|
-
*/
|
|
826
|
-
type IdentityTaxIdentifierSubmission = IdentityTaxIdentifierGenericSubmission | IdentityTaxIdentifierSchemeSubmission;
|
|
827
|
-
/**
|
|
828
|
-
* A MoonPay-hosted challenge a partner must surface to the customer to complete identity verification.
|
|
829
|
-
*/
|
|
830
|
-
type IdentityVerificationChallenge = {
|
|
831
|
-
/**
|
|
832
|
-
* Fully-formed challenge URL. Render directly without parsing; the URL embeds the challenge token.
|
|
833
|
-
*/
|
|
834
|
-
url: string;
|
|
835
|
-
/**
|
|
836
|
-
* Timestamp at which the challenge URL expires. Partners must surface the challenge to the customer before this time.
|
|
837
|
-
*/
|
|
838
|
-
expiresAt: string;
|
|
839
|
-
};
|
|
840
|
-
/**
|
|
841
|
-
* Outcome of POST /platform/v1/identities/{id}/verifications. Discriminated on status.
|
|
842
|
-
*/
|
|
843
|
-
type IdentityVerificationResponse = {
|
|
844
|
-
/**
|
|
845
|
-
* Current outcome of the verification request.
|
|
846
|
-
*/
|
|
847
|
-
status: IdentityVerificationStatus;
|
|
848
|
-
};
|
|
849
|
-
/**
|
|
850
|
-
* The state of an identity verification request.
|
|
851
|
-
*/
|
|
852
|
-
type IdentityVerificationStatus = 'approved' | 'processing' | 'challengeRequired';
|
|
853
|
-
type LimitWithAsset = {
|
|
854
|
-
/**
|
|
855
|
-
* A stringified amount, which can include decimals.
|
|
856
|
-
*/
|
|
857
|
-
amount: string;
|
|
858
|
-
asset: AssetBase;
|
|
859
|
-
};
|
|
860
|
-
/**
|
|
861
|
-
* A monetary amount. The `currency` must be the reporting currency for the customer's `residentialAddress.country`:
|
|
862
|
-
*
|
|
863
|
-
* | Residential address country | Reporting currency |
|
|
864
|
-
* | --------------------------- | ------------------ |
|
|
865
|
-
* | GBR | GBP |
|
|
866
|
-
* | AUS, NZL | AUD |
|
|
867
|
-
* | EEA (European Economic Area) countries | EUR |
|
|
868
|
-
* | All other countries, including USA and CAN | USD |
|
|
869
|
-
*
|
|
870
|
-
* The expected value is fixed by the residential address country, but `currency` is still required: it acts as an explicit confirmation so amounts are never silently misinterpreted. Submitting any other currency is rejected with a 400 validation error that identifies the expected currency, for example `Expected currency EUR for residentialAddress.country CZE, got PLN`.
|
|
871
|
-
*
|
|
872
|
-
* If the customer's local currency differs from the reporting currency, for example CZK or PLN in an EEA country, convert the amount to the reporting currency before submitting, using a current exchange rate.
|
|
873
|
-
*/
|
|
874
|
-
type MonetaryAmount = {
|
|
875
|
-
/**
|
|
876
|
-
* The fiat currency code, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code. Must be the reporting currency for the customer's `residentialAddress.country`. See the country-to-currency table above.
|
|
877
|
-
*/
|
|
878
|
-
currency: SupportedCurrency;
|
|
879
|
-
/**
|
|
880
|
-
* The amount as a decimal string, strictly greater than zero. Must not have more than 2 decimal places.
|
|
881
|
-
*/
|
|
882
|
-
amount: MonetaryDecimal;
|
|
883
|
-
};
|
|
884
|
-
/**
|
|
885
|
-
* A monetary amount expressed as a decimal string, e.g. "55000" or "1234.56".
|
|
886
|
-
*/
|
|
887
|
-
type MonetaryDecimal = string;
|
|
888
|
-
type MonetaryFeeAmount = {
|
|
889
|
-
/**
|
|
890
|
-
* The amount of fees in fiat.
|
|
891
|
-
*/
|
|
892
|
-
amount: string;
|
|
893
|
-
/**
|
|
894
|
-
* The fiat currency used to pay the fees.
|
|
895
|
-
*/
|
|
896
|
-
asset: AssetBase;
|
|
897
|
-
};
|
|
898
|
-
type MoonPayCorePaginationInfo = {
|
|
899
|
-
/**
|
|
900
|
-
* The cursor to use as the starting point for the next page of results.
|
|
901
|
-
*/
|
|
902
|
-
nextCursor: string | null;
|
|
903
|
-
};
|
|
904
|
-
/**
|
|
905
|
-
* Availability information for a stored card payment method.
|
|
906
|
-
*/
|
|
907
|
-
type MoonPayPaymentsCardAvailability = {
|
|
908
|
-
/**
|
|
909
|
-
* Whether the card is available
|
|
910
|
-
*/
|
|
911
|
-
active: boolean;
|
|
912
|
-
/**
|
|
913
|
-
* If the card is not available, reasons explaining why.
|
|
914
|
-
*/
|
|
915
|
-
reasons?: Array<MoonPayPaymentsCardAvailabilityReason>;
|
|
916
|
-
};
|
|
917
|
-
/**
|
|
918
|
-
* Reasons why a stored card is not available.
|
|
919
|
-
*/
|
|
920
|
-
type MoonPayPaymentsCardAvailabilityReason = 'card_expired' | 'card_declined' | 'card_blocked';
|
|
921
|
-
/**
|
|
922
|
-
* The card network brand.
|
|
923
|
-
*/
|
|
924
|
-
type MoonPayPaymentsCardBrand = 'visa' | 'mastercard' | 'maestro' | 'american_express' | 'other';
|
|
925
|
-
/**
|
|
926
|
-
* The type of card: credit, debit, or unknown.
|
|
927
|
-
*/
|
|
928
|
-
type MoonPayPaymentsCardType = 'credit' | 'debit' | 'unknown';
|
|
929
|
-
type MoonPayPaymentsListPaymentMethodsResponse = {
|
|
930
|
-
/**
|
|
931
|
-
* List of available payment method configurations
|
|
932
|
-
*/
|
|
933
|
-
paymentMethodConfigs?: Array<MoonPayPaymentsPaymentMethod>;
|
|
934
|
-
/**
|
|
935
|
-
* List of stored payment methods available for the customer
|
|
936
|
-
*/
|
|
937
|
-
paymentMethods?: Array<MoonPayPaymentsStoredPaymentMethod>;
|
|
938
|
-
};
|
|
939
|
-
type MoonPayPaymentsPaymentMethod = {
|
|
940
|
-
type: PaymentMethodType;
|
|
941
|
-
/**
|
|
942
|
-
* Details of how the payment method can be used.
|
|
943
|
-
*/
|
|
944
|
-
capabilities: MoonPayPaymentsPaymentMethodCapabilities;
|
|
945
|
-
availability: MoonPayPaymentsPaymentMethodAvailability;
|
|
946
|
-
};
|
|
947
|
-
type MoonPayPaymentsPaymentMethodAvailability = {
|
|
948
|
-
/**
|
|
949
|
-
* Whether the payment method is available
|
|
950
|
-
*/
|
|
951
|
-
active: boolean;
|
|
952
|
-
/**
|
|
953
|
-
* If the payment method is not available, reasons explaining why.
|
|
954
|
-
*/
|
|
955
|
-
reasons?: Array<string>;
|
|
956
|
-
};
|
|
957
|
-
type MoonPayPaymentsPaymentMethodCapabilities = {
|
|
958
|
-
/**
|
|
959
|
-
* [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) codes of fiat currencies supported by this payment method.
|
|
960
|
-
*/
|
|
961
|
-
supportedCurrencies: Array<string>;
|
|
962
|
-
/**
|
|
963
|
-
* Transaction types supported by this payment method.
|
|
964
|
-
*/
|
|
965
|
-
supportedTransactionTypes: Array<string>;
|
|
966
|
-
/**
|
|
967
|
-
* Whether this payment method can be deleted.
|
|
968
|
-
*/
|
|
969
|
-
allowsDeletion: boolean;
|
|
970
|
-
/**
|
|
971
|
-
* Whether this payment method requires the MoonPay widget to complete the payment flow.
|
|
972
|
-
*/
|
|
973
|
-
requiresWidget: boolean;
|
|
974
|
-
};
|
|
975
|
-
type MoonPayPaymentsStoredCardPaymentMethod = MoonPayPaymentsStoredPaymentMethodBase & {
|
|
976
|
-
cardType: MoonPayPaymentsCardType;
|
|
977
|
-
/**
|
|
978
|
-
* The card network brand
|
|
979
|
-
*/
|
|
980
|
-
brand: MoonPayPaymentsCardBrand;
|
|
981
|
-
/**
|
|
982
|
-
* Last 4 digits of the card number
|
|
983
|
-
*/
|
|
984
|
-
last4: string;
|
|
985
|
-
/**
|
|
986
|
-
* Expiration month as 2-digit string
|
|
987
|
-
*/
|
|
988
|
-
expirationMonth: string;
|
|
989
|
-
/**
|
|
990
|
-
* Expiration year as 4-digit string
|
|
991
|
-
*/
|
|
992
|
-
expirationYear: string;
|
|
993
|
-
/**
|
|
994
|
-
* Current availability of this stored card
|
|
995
|
-
*/
|
|
996
|
-
availability: MoonPayPaymentsCardAvailability;
|
|
997
|
-
};
|
|
998
|
-
/**
|
|
999
|
-
* A stored payment method.
|
|
1000
|
-
*/
|
|
1001
|
-
type MoonPayPaymentsStoredPaymentMethod = MoonPayPaymentsStoredPaymentMethodBase | MoonPayPaymentsStoredCardPaymentMethod;
|
|
1002
|
-
type MoonPayPaymentsStoredPaymentMethodBase = {
|
|
1003
|
-
/**
|
|
1004
|
-
* Unique identifier for the stored payment method
|
|
1005
|
-
*/
|
|
1006
|
-
id: string;
|
|
1007
|
-
type: PaymentMethodType;
|
|
1008
|
-
};
|
|
1009
|
-
/**
|
|
1010
|
-
* A payment disclosure that the partner must render verbatim before the customer can complete the transaction.
|
|
1011
|
-
*/
|
|
1012
|
-
type PaymentDisclosure = {
|
|
1013
|
-
/**
|
|
1014
|
-
* Stable identifier of the disclosure. Each id maps to one specific piece of text.
|
|
1015
|
-
*/
|
|
1016
|
-
id: PaymentDisclosureId;
|
|
1017
|
-
/**
|
|
1018
|
-
* Version of the disclosure text. Bumped whenever the canonical wording for this `id` changes. Partners that receive an unknown `(id, version)` pair should fall back to a conservative disclosure and alert their integration team.
|
|
1019
|
-
*/
|
|
1020
|
-
version: string;
|
|
1021
|
-
};
|
|
1022
|
-
/**
|
|
1023
|
-
* Known identifiers for payment disclosures. Each id maps to one specific piece of canonical disclosure text.
|
|
1024
|
-
* - `us-transaction-finality`: US state-level transaction finality notice, returned when the customer's residential state requires it (e.g. NY, WA).
|
|
1025
|
-
* - `eea-crypto-asset-risk`: EEA crypto-asset risk warning, returned for customers in the EEA buying a MiCA-compliant asset.
|
|
1026
|
-
* - `eea-unregulated-stablecoin-risk`: EEA unregulated stablecoin risk warning, returned for customers in the EEA buying a stablecoin that is not MiCA-compliant.
|
|
1027
|
-
* - `gateway-token`: Gateway DeFi-token notice, returned when buying a DeFi token via Gateway (US customers, excluding NY and WA).
|
|
1028
|
-
*/
|
|
1029
|
-
type PaymentDisclosureId = 'us-transaction-finality' | 'eea-crypto-asset-risk' | 'eea-unregulated-stablecoin-risk' | 'gateway-token';
|
|
1030
|
-
type PaymentMethodType = 'apple_pay' | 'card' | 'ach' | 'fps' | 'fps_open_banking' | 'google_pay' | 'sepa' | 'sepa_open_banking' | 'pix' | 'paypal' | 'venmo' | 'revolut_pay' | 'moonpay_balance' | 'interac';
|
|
1031
|
-
/**
|
|
1032
|
-
* A crypto asset available for purchase through MoonPay.
|
|
1033
|
-
*/
|
|
1034
|
-
type PlatformAsset = {
|
|
1035
|
-
/**
|
|
1036
|
-
* The CAIP-19 asset identifier (encodes chain and contract). Use this value when creating quotes for DeFi tokens.
|
|
1037
|
-
*/
|
|
1038
|
-
caip19: string;
|
|
1039
|
-
/**
|
|
1040
|
-
* The asset code. Use this value when creating quotes for CeFi assets.
|
|
1041
|
-
*/
|
|
1042
|
-
code: string;
|
|
1043
|
-
/**
|
|
1044
|
-
* The human-readable name of the asset.
|
|
1045
|
-
*/
|
|
1046
|
-
name: string;
|
|
1047
|
-
/**
|
|
1048
|
-
* The blockchain network code this asset belongs to.
|
|
1049
|
-
*/
|
|
1050
|
-
network: string;
|
|
1051
|
-
/**
|
|
1052
|
-
* Whether this is a centralised asset listed by MoonPay (`cefi`) or a DeFi token (`defi`). Quote CeFi assets by `code` and DeFi tokens by `caip19`.
|
|
1053
|
-
*/
|
|
1054
|
-
source: 'cefi' | 'defi';
|
|
1055
|
-
/**
|
|
1056
|
-
* The on-chain contract address. Null for native gas tokens.
|
|
1057
|
-
*/
|
|
1058
|
-
contractAddress: string | null;
|
|
1059
|
-
/**
|
|
1060
|
-
* The number of decimal places used on-chain, or null if unknown.
|
|
1061
|
-
*/
|
|
1062
|
-
decimals: number | null;
|
|
1063
|
-
/**
|
|
1064
|
-
* The maximum decimal places MoonPay supports when trading this asset. `null` when MoonPay doesn't list a trading precision for it (typically DeFi tokens).
|
|
1065
|
-
*/
|
|
1066
|
-
precision: number | null;
|
|
1067
|
-
status: AssetStatus;
|
|
1068
|
-
};
|
|
1069
|
-
/**
|
|
1070
|
-
* Destination crypto asset returned on the quote. Adds the resolved network and, for DeFi tokens, the CAIP-19 identifier on top of the base asset fields.
|
|
1071
|
-
*/
|
|
1072
|
-
type QuoteDestinationAsset = {
|
|
1073
|
-
/**
|
|
1074
|
-
* A fiat or crypto currency code.
|
|
1075
|
-
*
|
|
1076
|
-
* **Fiat**
|
|
1077
|
-
* Fiat codes are represented as [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) codes.
|
|
1078
|
-
*
|
|
1079
|
-
* Currently only `USD` is supported.
|
|
1080
|
-
*
|
|
1081
|
-
* **Crypto**
|
|
1082
|
-
* For crypto currency codes, see [supported currencies](https://dev.moonpay.com/docs/list-of-supported-cryptocurrencies).
|
|
1083
|
-
*
|
|
1084
|
-
* Examples: `BTC` `SOL` `ETH` `USDC_BASE` `USDC_SOL`
|
|
1085
|
-
*/
|
|
1086
|
-
code: string;
|
|
1087
|
-
/**
|
|
1088
|
-
* The human-readable name
|
|
1089
|
-
*/
|
|
1090
|
-
name?: string;
|
|
1091
|
-
/**
|
|
1092
|
-
* The number of supported decimal places
|
|
1093
|
-
*/
|
|
1094
|
-
precision?: number;
|
|
1095
|
-
/**
|
|
1096
|
-
* The CAIP-19 asset identifier (encodes chain and contract). Present for DeFi tokens.
|
|
1097
|
-
*/
|
|
1098
|
-
caip19?: string;
|
|
1099
|
-
};
|
|
1100
|
-
type QuoteLimitEntry = {
|
|
1101
|
-
/**
|
|
1102
|
-
* The maximum amount.
|
|
1103
|
-
*/
|
|
1104
|
-
limit: LimitWithAsset;
|
|
1105
|
-
/**
|
|
1106
|
-
* The remaining amount.
|
|
1107
|
-
*/
|
|
1108
|
-
remaining: LimitWithAsset;
|
|
1109
|
-
};
|
|
1110
|
-
/**
|
|
1111
|
-
* Limits applicable to the quote.
|
|
1112
|
-
*/
|
|
1113
|
-
type QuoteLimits = {
|
|
1114
|
-
/**
|
|
1115
|
-
* The daily limit.
|
|
1116
|
-
*/
|
|
1117
|
-
daily?: QuoteLimitEntry;
|
|
1118
|
-
/**
|
|
1119
|
-
* The monthly limit.
|
|
1120
|
-
*/
|
|
1121
|
-
monthly?: QuoteLimitEntry;
|
|
1122
|
-
/**
|
|
1123
|
-
* The yearly limit.
|
|
1124
|
-
*/
|
|
1125
|
-
yearly?: QuoteLimitEntry;
|
|
1126
|
-
};
|
|
1127
|
-
type QuotePaymentMethod = {
|
|
1128
|
-
type: PaymentMethodType;
|
|
1129
|
-
/**
|
|
1130
|
-
* Unique identifier of the payment method. Used to identify the specific card when type is card.
|
|
1131
|
-
*/
|
|
1132
|
-
id?: string;
|
|
1133
|
-
};
|
|
1134
|
-
/**
|
|
1135
|
-
* Status of a single requirement group on an identity.
|
|
1136
|
-
*/
|
|
1137
|
-
type RequirementEntry = {
|
|
1138
|
-
/**
|
|
1139
|
-
* Whether the requirement has been completed.
|
|
1140
|
-
*/
|
|
1141
|
-
status: RequirementItemStatus;
|
|
1142
|
-
/**
|
|
1143
|
-
* When status is incomplete, the outstanding fields the customer must provide for this requirement. Populated for `basicDetails`, `residentialAddress`, `taxIdentifiers`, and `questionnaires`; omitted when status is complete or for other requirement types, which do not surface field-level detail.
|
|
1144
|
-
*/
|
|
1145
|
-
requiredFields?: Array<RequirementFieldName>;
|
|
1146
|
-
};
|
|
1147
|
-
/**
|
|
1148
|
-
* A field a customer must provide to fulfil a requirement. Members match the field names used in the requirement-fulfilment endpoints (e.g. PATCH /platform/v1/identities/{id}).
|
|
1149
|
-
*/
|
|
1150
|
-
type RequirementFieldName = 'firstName' | 'lastName' | 'dateOfBirth' | 'nationality' | 'street' | 'locality' | 'postalCode' | 'country' | 'administrativeArea' | 'ssn' | 'cpf' | 'tin' | 'customerDueDiligence' | 'enhancedDueDiligence';
|
|
1151
|
-
/**
|
|
1152
|
-
* The completion state of a requirement item.
|
|
1153
|
-
*/
|
|
1154
|
-
type RequirementItemStatus = 'incomplete' | 'complete';
|
|
1155
|
-
/**
|
|
1156
|
-
* Outstanding and completed requirements for the identity, keyed by requirement category. Only requirements that apply to the customer are present.
|
|
1157
|
-
*/
|
|
1158
|
-
type Requirements = {
|
|
1159
|
-
/**
|
|
1160
|
-
* The customer's basic personal details (first name, last name, date of birth, nationality).
|
|
1161
|
-
*/
|
|
1162
|
-
basicDetails?: RequirementEntry;
|
|
1163
|
-
/**
|
|
1164
|
-
* The customer's residential address.
|
|
1165
|
-
*/
|
|
1166
|
-
residentialAddress?: RequirementEntry;
|
|
1167
|
-
/**
|
|
1168
|
-
* Identity document submission (passport, driver's license, residence permit, etc.).
|
|
1169
|
-
*/
|
|
1170
|
-
identityDocuments?: RequirementEntry;
|
|
1171
|
-
/**
|
|
1172
|
-
* Selfie photo submission.
|
|
1173
|
-
*/
|
|
1174
|
-
selfie?: RequirementEntry;
|
|
1175
|
-
/**
|
|
1176
|
-
* Tax identifier submission (SSN, CPF, TIN, etc.).
|
|
1177
|
-
*/
|
|
1178
|
-
taxIdentifiers?: RequirementEntry;
|
|
1179
|
-
/**
|
|
1180
|
-
* Proof-of-address document submission.
|
|
1181
|
-
*/
|
|
1182
|
-
proofOfAddress?: RequirementEntry;
|
|
1183
|
-
/**
|
|
1184
|
-
* Customer's phone number in E.164 format.
|
|
1185
|
-
*/
|
|
1186
|
-
phoneNumber?: RequirementEntry;
|
|
1187
|
-
/**
|
|
1188
|
-
* Due-diligence questionnaires the customer must complete (Customer Due Diligence and Enhanced Due Diligence). When incomplete, `requiredFields` lists the outstanding questionnaire types.
|
|
1189
|
-
*/
|
|
1190
|
-
questionnaires?: RequirementEntry;
|
|
1191
|
-
};
|
|
1192
|
-
/**
|
|
1193
|
-
* The bank-transfer settlement outcome to simulate. Sandbox only.
|
|
1194
|
-
*/
|
|
1195
|
-
type SimulateBankTransferOutcome = 'settled' | 'timeout';
|
|
1196
|
-
/**
|
|
1197
|
-
* Request body for simulating bank-transfer settlement.
|
|
1198
|
-
*/
|
|
1199
|
-
type SimulateBankTransferRequest = {
|
|
1200
|
-
/**
|
|
1201
|
-
* Which settlement outcome to simulate.
|
|
1202
|
-
*/
|
|
1203
|
-
outcome: SimulateBankTransferOutcome;
|
|
1204
|
-
/**
|
|
1205
|
-
* Optional sender bank account used to create the customer's bank account when settling. Defaults are synthesized per currency when omitted.
|
|
1206
|
-
*/
|
|
1207
|
-
senderBankAccount?: SimulateSenderBankAccount;
|
|
1208
|
-
};
|
|
1209
|
-
/**
|
|
1210
|
-
* The sender's bank account, used to model the incoming deposit. When omitted, a default matching the transaction's currency is used.
|
|
1211
|
-
*/
|
|
1212
|
-
type SimulateSenderBankAccount = {
|
|
1213
|
-
/**
|
|
1214
|
-
* The name on the sender's bank account.
|
|
1215
|
-
*/
|
|
1216
|
-
accountHolderName: string;
|
|
1217
|
-
/**
|
|
1218
|
-
* The sender's IBAN. Used for SEPA (EUR) transfers.
|
|
1219
|
-
*/
|
|
1220
|
-
iban?: string;
|
|
1221
|
-
/**
|
|
1222
|
-
* The sender's account number. Used for Faster Payments (GBP) transfers.
|
|
1223
|
-
*/
|
|
1224
|
-
accountNumber?: string;
|
|
1225
|
-
/**
|
|
1226
|
-
* The sender's sort code. Used for Faster Payments (GBP) transfers.
|
|
1227
|
-
*/
|
|
1228
|
-
sortCode?: string;
|
|
1229
|
-
};
|
|
1230
|
-
/**
|
|
1231
|
-
* Source of wealth a proof-of-income file evidences.
|
|
1232
|
-
*/
|
|
1233
|
-
type SourceOfWealth = 'salary' | 'savings' | 'investments' | 'cryptoTrading' | 'companyProfits' | 'companySale' | 'propertySale' | 'soleProprietorIncome' | 'rentalIncome' | 'inheritance' | 'pension';
|
|
1234
|
-
/**
|
|
1235
|
-
* A stage in the transaction lifecycle
|
|
1236
|
-
*/
|
|
1237
|
-
type Stage = {
|
|
1238
|
-
kind?: StageKind;
|
|
1239
|
-
/**
|
|
1240
|
-
* The human-readable name of the stage.
|
|
1241
|
-
*/
|
|
1242
|
-
name?: string;
|
|
1243
|
-
status?: StageStatus;
|
|
1244
|
-
/**
|
|
1245
|
-
* A developer-friendly message if the status is `failed`
|
|
1246
|
-
*/
|
|
1247
|
-
failureReason?: string | null;
|
|
1248
|
-
};
|
|
1249
|
-
/**
|
|
1250
|
-
* The stages in a transaction lifecycle.
|
|
1251
|
-
*/
|
|
1252
|
-
type StageKind = 'ordering' | 'waiting_payment' | 'waiting_authentication' | 'verification' | 'processing' | 'delivery' | 'crypto_hold';
|
|
1253
|
-
/**
|
|
1254
|
-
* The status of a transaction stage.
|
|
1255
|
-
*/
|
|
1256
|
-
type StageStatus = 'not_started' | 'in_progress' | 'success' | 'failed';
|
|
1257
|
-
/**
|
|
1258
|
-
* Request body for confirming one or more uploaded identity-related files.
|
|
1259
|
-
*/
|
|
1260
|
-
type SubmitIdentityFilesRequestBody = {
|
|
1261
|
-
/**
|
|
1262
|
-
* Files being confirmed. Two-sided documents (driving licence, national identity card, residence permit) must include both `front` and `back` entries with the same `fileType` in a single call.
|
|
1263
|
-
*/
|
|
1264
|
-
files: Array<IdentityFileSubmission>;
|
|
1265
|
-
};
|
|
1266
|
-
/**
|
|
1267
|
-
* The fiat currency codes supported for monetary amounts, as [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) codes.
|
|
1268
|
-
*/
|
|
1269
|
-
type SupportedCurrency = 'AUD' | 'USD' | 'EUR' | 'GBP';
|
|
1270
|
-
type Transaction = {
|
|
1271
|
-
/**
|
|
1272
|
-
* The MoonPay ID of the transaction.
|
|
1273
|
-
*/
|
|
1274
|
-
id: string;
|
|
1275
|
-
/**
|
|
1276
|
-
* An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of when the transaction was created.
|
|
1277
|
-
*/
|
|
1278
|
-
createdAt: string;
|
|
1279
|
-
/**
|
|
1280
|
-
* An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of when the transaction was last updated.
|
|
1281
|
-
*/
|
|
1282
|
-
updatedAt: string;
|
|
1283
|
-
status: TransactionStatus;
|
|
1284
|
-
/**
|
|
1285
|
-
* Total source amount and asset (fiat currency) the customer pays, including all fees. Matches the quote's `source.amount`. For bank-transfer payment methods this is the exact amount the customer must transfer.
|
|
1286
|
-
*/
|
|
1287
|
-
source: {
|
|
1288
|
-
/**
|
|
1289
|
-
* A stringified amount, which can include decimals.
|
|
1290
|
-
*/
|
|
1291
|
-
amount: string;
|
|
1292
|
-
/**
|
|
1293
|
-
* The currency or token being spent
|
|
1294
|
-
*/
|
|
1295
|
-
asset: AssetBase;
|
|
1296
|
-
};
|
|
1297
|
-
/**
|
|
1298
|
-
* Destination amount and asset (cryptocurrency) the customer receives.
|
|
1299
|
-
*/
|
|
1300
|
-
destination: {
|
|
1301
|
-
/**
|
|
1302
|
-
* A stringified amount, which can include decimals.
|
|
1303
|
-
*/
|
|
1304
|
-
amount: string;
|
|
1305
|
-
asset: AssetBase;
|
|
1306
|
-
};
|
|
1307
|
-
/**
|
|
1308
|
-
* Details of fees for the transaction.
|
|
1309
|
-
*/
|
|
1310
|
-
fees: Fees;
|
|
1311
|
-
/**
|
|
1312
|
-
* The wallet used for the transaction.
|
|
1313
|
-
*/
|
|
1314
|
-
wallet: Wallet;
|
|
1315
|
-
customer: TransactionCustomer;
|
|
1316
|
-
paymentMethod?: TransactionPaymentMethod;
|
|
1317
|
-
/**
|
|
1318
|
-
* Bank account details and payment reference for completing a bank transfer. Present only for bank-transfer payment methods such as SEPA and Faster Payments (FPS).
|
|
1319
|
-
*/
|
|
1320
|
-
bankTransferDepositInfo?: BankTransferDepositInfo;
|
|
1321
|
-
};
|
|
1322
|
-
type TransactionCustomer = {
|
|
1323
|
-
/**
|
|
1324
|
-
* The MoonPay ID of the customer associated with the transaction.
|
|
1325
|
-
*/
|
|
1326
|
-
id: string;
|
|
1327
|
-
};
|
|
1328
|
-
type TransactionPaymentMethod = {
|
|
1329
|
-
type: PaymentMethodType;
|
|
1330
|
-
};
|
|
1331
|
-
/**
|
|
1332
|
-
* The status of a transaction.
|
|
1333
|
-
*
|
|
1334
|
-
* - `completed`: The transaction is finalized and assets were delivered.
|
|
1335
|
-
* - `failed`: The transaction failed. No payment was executed and funds were not transferred.
|
|
1336
|
-
* - `pending`: The transaction was created and payment is accepted. The transfer is in progress.
|
|
1337
|
-
*/
|
|
1338
|
-
type TransactionStatus = 'completed' | 'failed' | 'pending';
|
|
1339
|
-
/**
|
|
1340
|
-
* Transaction with lifecycle stages showing step-by-step progress.
|
|
1341
|
-
*/
|
|
1342
|
-
type TransactionWithStages = Transaction & {
|
|
1343
|
-
/**
|
|
1344
|
-
* Details of the stages in the transaction lifecycle.
|
|
1345
|
-
*/
|
|
1346
|
-
stages?: Array<Stage>;
|
|
1347
|
-
};
|
|
1348
|
-
/**
|
|
1349
|
-
* Request body for updating an identity by submitting one or more requirements. Submit only the fields whose requirements are still outstanding; at least one outstanding requirement must be provided.
|
|
1350
|
-
*/
|
|
1351
|
-
type UpdateIdentityRequestBody = {
|
|
1352
|
-
/**
|
|
1353
|
-
* The customer's residential address.
|
|
1354
|
-
*/
|
|
1355
|
-
residentialAddress?: IdentityResidentialAddressSubmission;
|
|
1356
|
-
/**
|
|
1357
|
-
* The customer's basic personal details.
|
|
1358
|
-
*/
|
|
1359
|
-
basicDetails?: IdentityBasicDetailsSubmission;
|
|
1360
|
-
/**
|
|
1361
|
-
* The customer's phone number in E.164 format.
|
|
1362
|
-
*/
|
|
1363
|
-
phoneNumber?: IdentityPhoneNumberSubmission;
|
|
1364
|
-
/**
|
|
1365
|
-
* Tax identifiers the customer is providing. At most one `ssn` and one `cpf` may be submitted; multiple `tin` entries are allowed only if their `country` values differ.
|
|
1366
|
-
*/
|
|
1367
|
-
taxIdentifiers?: Array<IdentityTaxIdentifierSubmission>;
|
|
1368
|
-
/**
|
|
1369
|
-
* Due-diligence questionnaires the customer is submitting. Submit one entry per questionnaire listed under the `questionnaires` requirement on the identity; each questionnaire type may appear at most once.
|
|
1370
|
-
*/
|
|
1371
|
-
questionnaires?: Array<IdentityQuestionnaireSubmission>;
|
|
1372
|
-
};
|
|
1373
|
-
type Wallet = {
|
|
1374
|
-
/**
|
|
1375
|
-
* The wallet address used for the transaction.
|
|
1376
|
-
*/
|
|
1377
|
-
address: string;
|
|
1378
|
-
/**
|
|
1379
|
-
* An optional memo or destination tag (used by some blockchains such as XRP or XLM).
|
|
1380
|
-
*/
|
|
1381
|
-
tag?: string;
|
|
1382
|
-
};
|
|
1383
|
-
type AssetControllerListAssetsResponses = {
|
|
1384
|
-
/**
|
|
1385
|
-
* The request has succeeded.
|
|
1386
|
-
*/
|
|
1387
|
-
200: {
|
|
1388
|
-
data: Array<PlatformAsset>;
|
|
1389
|
-
pageInfo: MoonPayCorePaginationInfo;
|
|
1390
|
-
};
|
|
1391
|
-
};
|
|
1392
|
-
type AssetControllerListAssetsResponse = AssetControllerListAssetsResponses[keyof AssetControllerListAssetsResponses];
|
|
1393
|
-
|
|
1394
|
-
export type { SimulateBankTransferOutcome as $, Asset as A, BankTransferDepositInfo as B, CapabilityProduct as C, Customer, CustomerExportBasicDetails, CustomerExportFile, CustomerExportFileSide, CustomerExportFileType, CustomerExportIdentity, CustomerExportPhoneNumber, CustomerExportResidentialAddress, CustomerExportTaxIdentifier, CustomerExportTaxIdentifierType, CustomerKyc, CustomerKycStatus, CreateSessionTokenRequestBody as D, CreateSessionTokenResponse as E, ExchangeRateType as F, FeeBehavior as G, Fees as H, Identity as I, GetQuoteBody as J, AssetControllerListAssetsResponse as K, LimitWithAsset as L, MoonPayPaymentsListPaymentMethodsResponse as M, MonetaryFeeAmount as N, MoonPayCorePaginationInfo as O, MoonPayPaymentsPaymentMethodAvailability as P, MoonPayPaymentsPaymentMethodCapabilities as Q, RequirementEntry as R, SubmitIdentityFilesRequestBody as S, MoonPayPaymentsPaymentMethod as T, UpdateIdentityRequestBody as U, PaymentMethodType as V, PlatformAsset as W, GetQuoteResponse as X, QuoteLimitEntry as Y, QuoteLimits as Z, QuotePaymentMethod as _, CreateIdentityRequestBody as a, SimulateBankTransferRequest as a0, SimulateSenderBankAccount as a1, Stage as a2, StageKind as a3, StageStatus as a4, MoonPayPaymentsStoredCardPaymentMethod as a5, MoonPayPaymentsStoredPaymentMethod as a6, Transaction as a7, TransactionCustomer as a8, TransactionPaymentMethod as a9, TransactionStatus as aa, TransactionWithStages as ab, Wallet as ac, CreateIdentityResidentialAddress as b, IdentityBasicDetailsSubmission as c, IdentityCapability as d, IdentityFileMimeType as e, IdentityFileSide as f, IdentityFileSubmission as g, IdentityFileType as h, IdentityFileUploadUrl as i, IdentityFileUploadUrlHeaders as j, IdentityFileUploadUrlRequestBody as k, IdentityPhoneNumberSubmission as l, IdentityQuestionnaireSubmission as m, IdentityResidentialAddressSubmission as n, IdentityStatus as o, IdentityTaxIdentifierGenericSubmission as p, IdentityTaxIdentifierSchemeSubmission as q, IdentityTaxIdentifierSubmission as r, IdentityVerificationChallenge as s, IdentityVerificationResponse as t, IdentityVerificationStatus as u, RequirementFieldName as v, RequirementItemStatus as w, Requirements as x, AssetBase as y, AssetStatus as z };
|
|
1
|
+
export { D as Customer, H as CustomerExportBasicDetails, I as CustomerExportFile, J as CustomerExportFileSide, K as CustomerExportFileType, N as CustomerExportIdentity, O as CustomerExportPhoneNumber, R as CustomerExportResidentialAddress, U as CustomerExportTaxIdentifier, V as CustomerExportTaxIdentifierType, X as CustomerKyc, Y as CustomerKycStatus } from '../identity-DIQJlm0o.cjs';
|