@moonpay/platform-protocol 1.8.0 → 1.12.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.
@@ -54,6 +54,47 @@ type AssetStatus = {
54
54
  */
55
55
  disabled: boolean;
56
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
+ };
57
98
  /**
58
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.
59
100
  */
@@ -123,7 +164,7 @@ type CreateSessionTokenRequestBody = {
123
164
  */
124
165
  phoneNumber?: string;
125
166
  /**
126
- * 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.
167
+ * 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.
127
168
  */
128
169
  termsAcceptedAt?: string;
129
170
  };
@@ -165,7 +206,7 @@ type CustomerDueDiligenceAnswers = {
165
206
  */
166
207
  accountPurpose: CddAccountPurpose;
167
208
  /**
168
- * The customer's gross annual income. Currency is derived from the customer's residential address.
209
+ * 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.
169
210
  */
170
211
  grossAnnualIncome: MonetaryAmount;
171
212
  /**
@@ -177,7 +218,7 @@ type CustomerDueDiligenceAnswers = {
177
218
  */
178
219
  transactionFrequencyPerMonth: number;
179
220
  /**
180
- * Expected total transaction amount per month. Currency is derived from the customer's residential address.
221
+ * 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.
181
222
  */
182
223
  expectedTransactionAmountPerMonth: MonetaryAmount;
183
224
  };
@@ -353,10 +394,14 @@ type EnhancedDueDiligenceAnswers = {
353
394
  */
354
395
  profession: EddProfession;
355
396
  /**
356
- * The customer's net worth. Currency is derived from the customer's residential address.
397
+ * 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.
357
398
  */
358
399
  netWorth: MonetaryAmount;
359
400
  };
401
+ /**
402
+ * Whether the quote's exchange rate is locked at quote time or an estimate confirmed at settlement.
403
+ */
404
+ type ExchangeRateType = 'fixed' | 'floating';
360
405
  /**
361
406
  * 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`.
362
407
  */
@@ -481,6 +526,10 @@ type GetQuoteResponse = {
481
526
  * The rate used to convert fiat <-> crypto, expressed as the fiat value of one unit of crypto (e.g. `1 SOL = {exchangeRate} USD`).
482
527
  */
483
528
  exchangeRate: string;
529
+ /**
530
+ * 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).
531
+ */
532
+ exchangeRateType: ExchangeRateType;
484
533
  /**
485
534
  * Slippage tolerance applied to the DeFi swap, in basis points (e.g. `50` = 0.5%). Only present when the destination is a DeFi token.
486
535
  */
@@ -791,11 +840,22 @@ type LimitWithAsset = {
791
840
  asset: AssetBase;
792
841
  };
793
842
  /**
794
- * A monetary amount. The currency is derived from the customer's residential address and is not partner-chosen; submitting a mismatched currency is rejected.
843
+ * A monetary amount. The `currency` must be the reporting currency for the customer's `residentialAddress.country`:
844
+ *
845
+ * | Residential address country | Reporting currency |
846
+ * | --------------------------- | ------------------ |
847
+ * | GBR | GBP |
848
+ * | AUS, NZL | AUD |
849
+ * | EEA (European Economic Area) countries | EUR |
850
+ * | All other countries, including USA and CAN | USD |
851
+ *
852
+ * 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`.
853
+ *
854
+ * 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.
795
855
  */
796
856
  type MonetaryAmount = {
797
857
  /**
798
- * The fiat currency code, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code. Must be one of the supported currencies and match the currency expected for the customer's residential address country.
858
+ * 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.
799
859
  */
800
860
  currency: SupportedCurrency;
801
861
  /**
@@ -933,14 +993,22 @@ type MoonPayPaymentsStoredPaymentMethodBase = {
933
993
  */
934
994
  type PaymentDisclosure = {
935
995
  /**
936
- * Stable identifier of the disclosure. Each id maps to one specific piece of text. The full list of ids and their canonical text is published in the developer documentation.
996
+ * Stable identifier of the disclosure. Each id maps to one specific piece of text.
937
997
  */
938
- id: string;
998
+ id: PaymentDisclosureId;
939
999
  /**
940
1000
  * 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.
941
1001
  */
942
1002
  version: string;
943
1003
  };
1004
+ /**
1005
+ * Known identifiers for payment disclosures. Each id maps to one specific piece of canonical disclosure text.
1006
+ * - `us-transaction-finality`: US state-level transaction finality notice, returned when the customer's residential state requires it (e.g. NY, WA).
1007
+ * - `eea-crypto-asset-risk`: EEA crypto-asset risk warning, returned for customers in the EEA buying a MiCA-compliant asset.
1008
+ * - `eea-unregulated-stablecoin-risk`: EEA unregulated stablecoin risk warning, returned for customers in the EEA buying a stablecoin that is not MiCA-compliant.
1009
+ * - `gateway-token`: Gateway DeFi-token notice, returned when buying a DeFi token via Gateway (US customers, excluding NY and WA).
1010
+ */
1011
+ type PaymentDisclosureId = 'us-transaction-finality' | 'eea-crypto-asset-risk' | 'eea-unregulated-stablecoin-risk' | 'gateway-token';
944
1012
  type PaymentMethodType = 'apple_pay' | 'card' | 'ach' | 'fps' | 'fps_open_banking' | 'google_pay' | 'sepa' | 'sepa_open_banking' | 'pix' | 'paypal' | 'venmo' | 'revolut_pay' | 'moonpay_balance' | 'interac';
945
1013
  /**
946
1014
  * A crypto asset available for purchase through MoonPay.
@@ -1054,7 +1122,7 @@ type RequirementEntry = {
1054
1122
  */
1055
1123
  status: RequirementItemStatus;
1056
1124
  /**
1057
- * When status is incomplete, the outstanding fields the customer must provide for this requirement. Omitted when status is complete or when the requirement type does not surface field-level detail.
1125
+ * 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.
1058
1126
  */
1059
1127
  requiredFields?: Array<RequirementFieldName>;
1060
1128
  };
@@ -1099,7 +1167,7 @@ type Requirements = {
1099
1167
  */
1100
1168
  phoneNumber?: RequirementEntry;
1101
1169
  /**
1102
- * Due-diligence questionnaires the customer must complete (Customer Due Diligence and Enhanced Due Diligence).
1170
+ * Due-diligence questionnaires the customer must complete (Customer Due Diligence and Enhanced Due Diligence). When incomplete, `requiredFields` lists the outstanding questionnaire types.
1103
1171
  */
1104
1172
  questionnaires?: RequirementEntry;
1105
1173
  };
@@ -1190,6 +1258,10 @@ type Transaction = {
1190
1258
  wallet: Wallet;
1191
1259
  customer: TransactionCustomer;
1192
1260
  paymentMethod?: TransactionPaymentMethod;
1261
+ /**
1262
+ * 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).
1263
+ */
1264
+ bankTransferDepositInfo?: BankTransferDepositInfo;
1193
1265
  };
1194
1266
  type TransactionCustomer = {
1195
1267
  /**
@@ -1263,4 +1335,4 @@ type AssetControllerListAssetsResponses = {
1263
1335
  };
1264
1336
  type AssetControllerListAssetsResponse = AssetControllerListAssetsResponses[keyof AssetControllerListAssetsResponses];
1265
1337
 
1266
- export type { StageStatus as $, Asset as A, CreateSessionTokenRequestBody as B, CapabilityProduct as C, Customer, CustomerExportBasicDetails, CustomerExportFile, CustomerExportFileSide, CustomerExportFileType, CustomerExportIdentity, CustomerExportPhoneNumber, CustomerExportResidentialAddress, CustomerExportTaxIdentifier, CustomerExportTaxIdentifierType, CustomerKyc, CustomerKycStatus, CreateSessionTokenResponse as D, Fees as E, FeeBehavior as F, GetQuoteBody as G, AssetControllerListAssetsResponse as H, Identity as I, MonetaryFeeAmount as J, MoonPayCorePaginationInfo as K, LimitWithAsset as L, MoonPayPaymentsListPaymentMethodsResponse as M, MoonPayPaymentsPaymentMethodAvailability as N, MoonPayPaymentsPaymentMethodCapabilities as O, MoonPayPaymentsPaymentMethod as P, PaymentMethodType as Q, RequirementEntry as R, SubmitIdentityFilesRequestBody as S, PlatformAsset as T, UpdateIdentityRequestBody as U, GetQuoteResponse as V, QuoteLimitEntry as W, QuoteLimits as X, QuotePaymentMethod as Y, Stage as Z, StageKind as _, CreateIdentityRequestBody as a, MoonPayPaymentsStoredCardPaymentMethod as a0, MoonPayPaymentsStoredPaymentMethod as a1, Transaction as a2, TransactionCustomer as a3, TransactionPaymentMethod as a4, TransactionStatus as a5, TransactionWithStages as a6, Wallet as a7, 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 };
1338
+ export type { Stage 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, StageKind as a0, StageStatus as a1, MoonPayPaymentsStoredCardPaymentMethod as a2, MoonPayPaymentsStoredPaymentMethod as a3, Transaction as a4, TransactionCustomer as a5, TransactionPaymentMethod as a6, TransactionStatus as a7, TransactionWithStages as a8, Wallet as a9, 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 };
@@ -54,6 +54,47 @@ type AssetStatus = {
54
54
  */
55
55
  disabled: boolean;
56
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
+ };
57
98
  /**
58
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.
59
100
  */
@@ -123,7 +164,7 @@ type CreateSessionTokenRequestBody = {
123
164
  */
124
165
  phoneNumber?: string;
125
166
  /**
126
- * 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.
167
+ * 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.
127
168
  */
128
169
  termsAcceptedAt?: string;
129
170
  };
@@ -165,7 +206,7 @@ type CustomerDueDiligenceAnswers = {
165
206
  */
166
207
  accountPurpose: CddAccountPurpose;
167
208
  /**
168
- * The customer's gross annual income. Currency is derived from the customer's residential address.
209
+ * 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.
169
210
  */
170
211
  grossAnnualIncome: MonetaryAmount;
171
212
  /**
@@ -177,7 +218,7 @@ type CustomerDueDiligenceAnswers = {
177
218
  */
178
219
  transactionFrequencyPerMonth: number;
179
220
  /**
180
- * Expected total transaction amount per month. Currency is derived from the customer's residential address.
221
+ * 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.
181
222
  */
182
223
  expectedTransactionAmountPerMonth: MonetaryAmount;
183
224
  };
@@ -353,10 +394,14 @@ type EnhancedDueDiligenceAnswers = {
353
394
  */
354
395
  profession: EddProfession;
355
396
  /**
356
- * The customer's net worth. Currency is derived from the customer's residential address.
397
+ * 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.
357
398
  */
358
399
  netWorth: MonetaryAmount;
359
400
  };
401
+ /**
402
+ * Whether the quote's exchange rate is locked at quote time or an estimate confirmed at settlement.
403
+ */
404
+ type ExchangeRateType = 'fixed' | 'floating';
360
405
  /**
361
406
  * 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`.
362
407
  */
@@ -481,6 +526,10 @@ type GetQuoteResponse = {
481
526
  * The rate used to convert fiat <-> crypto, expressed as the fiat value of one unit of crypto (e.g. `1 SOL = {exchangeRate} USD`).
482
527
  */
483
528
  exchangeRate: string;
529
+ /**
530
+ * 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).
531
+ */
532
+ exchangeRateType: ExchangeRateType;
484
533
  /**
485
534
  * Slippage tolerance applied to the DeFi swap, in basis points (e.g. `50` = 0.5%). Only present when the destination is a DeFi token.
486
535
  */
@@ -791,11 +840,22 @@ type LimitWithAsset = {
791
840
  asset: AssetBase;
792
841
  };
793
842
  /**
794
- * A monetary amount. The currency is derived from the customer's residential address and is not partner-chosen; submitting a mismatched currency is rejected.
843
+ * A monetary amount. The `currency` must be the reporting currency for the customer's `residentialAddress.country`:
844
+ *
845
+ * | Residential address country | Reporting currency |
846
+ * | --------------------------- | ------------------ |
847
+ * | GBR | GBP |
848
+ * | AUS, NZL | AUD |
849
+ * | EEA (European Economic Area) countries | EUR |
850
+ * | All other countries, including USA and CAN | USD |
851
+ *
852
+ * 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`.
853
+ *
854
+ * 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.
795
855
  */
796
856
  type MonetaryAmount = {
797
857
  /**
798
- * The fiat currency code, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code. Must be one of the supported currencies and match the currency expected for the customer's residential address country.
858
+ * 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.
799
859
  */
800
860
  currency: SupportedCurrency;
801
861
  /**
@@ -933,14 +993,22 @@ type MoonPayPaymentsStoredPaymentMethodBase = {
933
993
  */
934
994
  type PaymentDisclosure = {
935
995
  /**
936
- * Stable identifier of the disclosure. Each id maps to one specific piece of text. The full list of ids and their canonical text is published in the developer documentation.
996
+ * Stable identifier of the disclosure. Each id maps to one specific piece of text.
937
997
  */
938
- id: string;
998
+ id: PaymentDisclosureId;
939
999
  /**
940
1000
  * 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.
941
1001
  */
942
1002
  version: string;
943
1003
  };
1004
+ /**
1005
+ * Known identifiers for payment disclosures. Each id maps to one specific piece of canonical disclosure text.
1006
+ * - `us-transaction-finality`: US state-level transaction finality notice, returned when the customer's residential state requires it (e.g. NY, WA).
1007
+ * - `eea-crypto-asset-risk`: EEA crypto-asset risk warning, returned for customers in the EEA buying a MiCA-compliant asset.
1008
+ * - `eea-unregulated-stablecoin-risk`: EEA unregulated stablecoin risk warning, returned for customers in the EEA buying a stablecoin that is not MiCA-compliant.
1009
+ * - `gateway-token`: Gateway DeFi-token notice, returned when buying a DeFi token via Gateway (US customers, excluding NY and WA).
1010
+ */
1011
+ type PaymentDisclosureId = 'us-transaction-finality' | 'eea-crypto-asset-risk' | 'eea-unregulated-stablecoin-risk' | 'gateway-token';
944
1012
  type PaymentMethodType = 'apple_pay' | 'card' | 'ach' | 'fps' | 'fps_open_banking' | 'google_pay' | 'sepa' | 'sepa_open_banking' | 'pix' | 'paypal' | 'venmo' | 'revolut_pay' | 'moonpay_balance' | 'interac';
945
1013
  /**
946
1014
  * A crypto asset available for purchase through MoonPay.
@@ -1054,7 +1122,7 @@ type RequirementEntry = {
1054
1122
  */
1055
1123
  status: RequirementItemStatus;
1056
1124
  /**
1057
- * When status is incomplete, the outstanding fields the customer must provide for this requirement. Omitted when status is complete or when the requirement type does not surface field-level detail.
1125
+ * 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.
1058
1126
  */
1059
1127
  requiredFields?: Array<RequirementFieldName>;
1060
1128
  };
@@ -1099,7 +1167,7 @@ type Requirements = {
1099
1167
  */
1100
1168
  phoneNumber?: RequirementEntry;
1101
1169
  /**
1102
- * Due-diligence questionnaires the customer must complete (Customer Due Diligence and Enhanced Due Diligence).
1170
+ * Due-diligence questionnaires the customer must complete (Customer Due Diligence and Enhanced Due Diligence). When incomplete, `requiredFields` lists the outstanding questionnaire types.
1103
1171
  */
1104
1172
  questionnaires?: RequirementEntry;
1105
1173
  };
@@ -1190,6 +1258,10 @@ type Transaction = {
1190
1258
  wallet: Wallet;
1191
1259
  customer: TransactionCustomer;
1192
1260
  paymentMethod?: TransactionPaymentMethod;
1261
+ /**
1262
+ * 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).
1263
+ */
1264
+ bankTransferDepositInfo?: BankTransferDepositInfo;
1193
1265
  };
1194
1266
  type TransactionCustomer = {
1195
1267
  /**
@@ -1263,4 +1335,4 @@ type AssetControllerListAssetsResponses = {
1263
1335
  };
1264
1336
  type AssetControllerListAssetsResponse = AssetControllerListAssetsResponses[keyof AssetControllerListAssetsResponses];
1265
1337
 
1266
- export type { StageStatus as $, Asset as A, CreateSessionTokenRequestBody as B, CapabilityProduct as C, Customer, CustomerExportBasicDetails, CustomerExportFile, CustomerExportFileSide, CustomerExportFileType, CustomerExportIdentity, CustomerExportPhoneNumber, CustomerExportResidentialAddress, CustomerExportTaxIdentifier, CustomerExportTaxIdentifierType, CustomerKyc, CustomerKycStatus, CreateSessionTokenResponse as D, Fees as E, FeeBehavior as F, GetQuoteBody as G, AssetControllerListAssetsResponse as H, Identity as I, MonetaryFeeAmount as J, MoonPayCorePaginationInfo as K, LimitWithAsset as L, MoonPayPaymentsListPaymentMethodsResponse as M, MoonPayPaymentsPaymentMethodAvailability as N, MoonPayPaymentsPaymentMethodCapabilities as O, MoonPayPaymentsPaymentMethod as P, PaymentMethodType as Q, RequirementEntry as R, SubmitIdentityFilesRequestBody as S, PlatformAsset as T, UpdateIdentityRequestBody as U, GetQuoteResponse as V, QuoteLimitEntry as W, QuoteLimits as X, QuotePaymentMethod as Y, Stage as Z, StageKind as _, CreateIdentityRequestBody as a, MoonPayPaymentsStoredCardPaymentMethod as a0, MoonPayPaymentsStoredPaymentMethod as a1, Transaction as a2, TransactionCustomer as a3, TransactionPaymentMethod as a4, TransactionStatus as a5, TransactionWithStages as a6, Wallet as a7, 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 };
1338
+ export type { Stage 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, StageKind as a0, StageStatus as a1, MoonPayPaymentsStoredCardPaymentMethod as a2, MoonPayPaymentsStoredPaymentMethod as a3, Transaction as a4, TransactionCustomer as a5, TransactionPaymentMethod as a6, TransactionStatus as a7, TransactionWithStages as a8, Wallet as a9, 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 +1 @@
1
- {"version":3,"sources":["../../src/api/index.ts"],"sourcesContent":["/**\n * Partner-friendly type aliases re-exported from the generated OpenAPI types.\n * These drop namespace prefixes and provide consistent names across SDK versions.\n */\nexport type {\n // Assets\n Asset,\n AssetBase,\n AssetControllerListAssetsResponse as ListAssetsResponse,\n AssetStatus,\n // Session\n CreateSessionTokenRequestBody,\n CreateSessionTokenResponse as CreateSessionTokenReturnType,\n // Fees / wallet\n FeeBehavior,\n Fees,\n // Quotes\n GetQuoteBody as GetQuoteParams,\n GetQuoteResponse as Quote,\n LimitWithAsset,\n MonetaryFeeAmount,\n MoonPayCorePaginationInfo as PaginationInfo,\n // Payment methods — config catalog\n MoonPayPaymentsListPaymentMethodsResponse as ListPaymentMethodsResponse,\n MoonPayPaymentsPaymentMethod as PaymentMethodConfig,\n MoonPayPaymentsPaymentMethodAvailability as PaymentMethodAvailability,\n MoonPayPaymentsPaymentMethodCapabilities as PaymentMethodCapabilities,\n MoonPayPaymentsStoredCardPaymentMethod as StoredCardPaymentMethod,\n // Payment methods — stored cards\n MoonPayPaymentsStoredPaymentMethod as StoredPaymentMethod,\n PaymentMethodType,\n PlatformAsset,\n QuoteLimitEntry,\n QuoteLimits,\n QuotePaymentMethod,\n // Stages\n Stage,\n StageKind,\n StageStatus,\n // Transactions\n Transaction,\n TransactionCustomer,\n TransactionPaymentMethod,\n TransactionStatus,\n TransactionWithStages,\n Wallet,\n} from './gen/index.js';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../src/api/index.ts"],"sourcesContent":["/**\n * Partner-friendly type aliases re-exported from the generated OpenAPI types.\n * These drop namespace prefixes and provide consistent names across SDK versions.\n */\nexport type {\n // Assets\n Asset,\n AssetBase,\n AssetControllerListAssetsResponse as ListAssetsResponse,\n AssetStatus,\n // Transactions — bank transfer deposit info\n BankTransferDepositInfo,\n // Session\n CreateSessionTokenRequestBody,\n CreateSessionTokenResponse as CreateSessionTokenReturnType,\n // Quotes — exchange rate type\n ExchangeRateType,\n // Fees / wallet\n FeeBehavior,\n Fees,\n // Quotes\n GetQuoteBody as GetQuoteParams,\n GetQuoteResponse as Quote,\n LimitWithAsset,\n MonetaryFeeAmount,\n MoonPayCorePaginationInfo as PaginationInfo,\n // Payment methods — config catalog\n MoonPayPaymentsListPaymentMethodsResponse as ListPaymentMethodsResponse,\n MoonPayPaymentsPaymentMethod as PaymentMethodConfig,\n MoonPayPaymentsPaymentMethodAvailability as PaymentMethodAvailability,\n MoonPayPaymentsPaymentMethodCapabilities as PaymentMethodCapabilities,\n MoonPayPaymentsStoredCardPaymentMethod as StoredCardPaymentMethod,\n // Payment methods — stored cards\n MoonPayPaymentsStoredPaymentMethod as StoredPaymentMethod,\n PaymentMethodType,\n PlatformAsset,\n QuoteLimitEntry,\n QuoteLimits,\n QuotePaymentMethod,\n // Stages\n Stage,\n StageKind,\n StageStatus,\n // Transactions\n Transaction,\n TransactionCustomer,\n TransactionPaymentMethod,\n TransactionStatus,\n TransactionWithStages,\n Wallet,\n} from './gen/index.js';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -1 +1 @@
1
- export { A as Asset, y as AssetBase, z as AssetStatus, B as CreateSessionTokenRequestBody, D as CreateSessionTokenReturnType, F as FeeBehavior, E as Fees, G as GetQuoteParams, L as LimitWithAsset, H as ListAssetsResponse, M as ListPaymentMethodsResponse, J as MonetaryFeeAmount, K as PaginationInfo, N as PaymentMethodAvailability, O as PaymentMethodCapabilities, P as PaymentMethodConfig, Q as PaymentMethodType, T as PlatformAsset, V as Quote, W as QuoteLimitEntry, X as QuoteLimits, Y as QuotePaymentMethod, Z as Stage, _ as StageKind, $ as StageStatus, a0 as StoredCardPaymentMethod, a1 as StoredPaymentMethod, a2 as Transaction, a3 as TransactionCustomer, a4 as TransactionPaymentMethod, a5 as TransactionStatus, a6 as TransactionWithStages, a7 as Wallet } from './customer.cjs';
1
+ export { A as Asset, y as AssetBase, z as AssetStatus, B as BankTransferDepositInfo, D as CreateSessionTokenRequestBody, E as CreateSessionTokenReturnType, F as ExchangeRateType, G as FeeBehavior, H as Fees, J as GetQuoteParams, L as LimitWithAsset, K as ListAssetsResponse, M as ListPaymentMethodsResponse, N as MonetaryFeeAmount, O as PaginationInfo, P as PaymentMethodAvailability, Q as PaymentMethodCapabilities, T as PaymentMethodConfig, V as PaymentMethodType, W as PlatformAsset, X as Quote, Y as QuoteLimitEntry, Z as QuoteLimits, _ as QuotePaymentMethod, $ as Stage, a0 as StageKind, a1 as StageStatus, a2 as StoredCardPaymentMethod, a3 as StoredPaymentMethod, a4 as Transaction, a5 as TransactionCustomer, a6 as TransactionPaymentMethod, a7 as TransactionStatus, a8 as TransactionWithStages, a9 as Wallet } from './customer.cjs';
@@ -1 +1 @@
1
- export { A as Asset, y as AssetBase, z as AssetStatus, B as CreateSessionTokenRequestBody, D as CreateSessionTokenReturnType, F as FeeBehavior, E as Fees, G as GetQuoteParams, L as LimitWithAsset, H as ListAssetsResponse, M as ListPaymentMethodsResponse, J as MonetaryFeeAmount, K as PaginationInfo, N as PaymentMethodAvailability, O as PaymentMethodCapabilities, P as PaymentMethodConfig, Q as PaymentMethodType, T as PlatformAsset, V as Quote, W as QuoteLimitEntry, X as QuoteLimits, Y as QuotePaymentMethod, Z as Stage, _ as StageKind, $ as StageStatus, a0 as StoredCardPaymentMethod, a1 as StoredPaymentMethod, a2 as Transaction, a3 as TransactionCustomer, a4 as TransactionPaymentMethod, a5 as TransactionStatus, a6 as TransactionWithStages, a7 as Wallet } from './customer.js';
1
+ export { A as Asset, y as AssetBase, z as AssetStatus, B as BankTransferDepositInfo, D as CreateSessionTokenRequestBody, E as CreateSessionTokenReturnType, F as ExchangeRateType, G as FeeBehavior, H as Fees, J as GetQuoteParams, L as LimitWithAsset, K as ListAssetsResponse, M as ListPaymentMethodsResponse, N as MonetaryFeeAmount, O as PaginationInfo, P as PaymentMethodAvailability, Q as PaymentMethodCapabilities, T as PaymentMethodConfig, V as PaymentMethodType, W as PlatformAsset, X as Quote, Y as QuoteLimitEntry, Z as QuoteLimits, _ as QuotePaymentMethod, $ as Stage, a0 as StageKind, a1 as StageStatus, a2 as StoredCardPaymentMethod, a3 as StoredPaymentMethod, a4 as Transaction, a5 as TransactionCustomer, a6 as TransactionPaymentMethod, a7 as TransactionStatus, a8 as TransactionWithStages, a9 as Wallet } from './customer.js';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/frames/apple-pay.ts"],"sourcesContent":["import type { ChallengeRequired } from '../models/challenge.js';\nimport type { FrameTransaction } from '../models/transaction.js';\nimport type { FrameError } from '../protocol.js';\n\nexport interface InboundMessageMap {\n ready: void;\n error: FrameError<\n 'configurationError' | 'quoteExpired' | 'invalidQuote' | 'applePayUnavailable' | 'generic'\n >;\n /** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */\n challenge: ChallengeRequired;\n complete: { transaction: FrameTransaction };\n}\n\nexport interface OutboundMessageMap {\n setQuote: { quote: { signature: string } };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../src/frames/apple-pay.ts"],"sourcesContent":["import type { ChallengeRequired } from '../models/challenge.js';\nimport type { FrameTransaction } from '../models/transaction.js';\nimport type { FrameError } from '../protocol.js';\n\nexport interface InboundMessageMap {\n ready: void;\n error: FrameError<\n 'configurationError' | 'quoteExpired' | 'invalidQuote' | 'applePayUnavailable' | 'generic'\n >;\n /**\n * Fired the instant the user taps the native Apple Pay button, BEFORE the OS\n * payment sheet is presented. This is an intent-to-buy / tap signal, distinct\n * from `complete` (the purchase outcome). It fires unconditionally on tap,\n * even if the user later cancels the sheet.\n */\n buttonPressed: void;\n /** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */\n challenge: ChallengeRequired;\n complete: { transaction: FrameTransaction };\n}\n\nexport interface OutboundMessageMap {\n setQuote: { quote: { signature: string } };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -5,6 +5,13 @@ import { FrameError } from '../protocol.cjs';
5
5
  interface InboundMessageMap {
6
6
  ready: void;
7
7
  error: FrameError<'configurationError' | 'quoteExpired' | 'invalidQuote' | 'applePayUnavailable' | 'generic'>;
8
+ /**
9
+ * Fired the instant the user taps the native Apple Pay button, BEFORE the OS
10
+ * payment sheet is presented. This is an intent-to-buy / tap signal, distinct
11
+ * from `complete` (the purchase outcome). It fires unconditionally on tap,
12
+ * even if the user later cancels the sheet.
13
+ */
14
+ buttonPressed: void;
8
15
  /** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */
9
16
  challenge: ChallengeRequired;
10
17
  complete: {
@@ -5,6 +5,13 @@ import { FrameError } from '../protocol.js';
5
5
  interface InboundMessageMap {
6
6
  ready: void;
7
7
  error: FrameError<'configurationError' | 'quoteExpired' | 'invalidQuote' | 'applePayUnavailable' | 'generic'>;
8
+ /**
9
+ * Fired the instant the user taps the native Apple Pay button, BEFORE the OS
10
+ * payment sheet is presented. This is an intent-to-buy / tap signal, distinct
11
+ * from `complete` (the purchase outcome). It fires unconditionally on tap,
12
+ * even if the user later cancels the sheet.
13
+ */
14
+ buttonPressed: void;
8
15
  /** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */
9
16
  challenge: ChallengeRequired;
10
17
  complete: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/frames/buy-button.ts"],"sourcesContent":["import type { ChallengeRequired } from '../models/challenge.js';\nimport type { FrameTransaction } from '../models/transaction.js';\nimport type { FrameError } from '../protocol.js';\n\nexport interface MessageMap {\n /** Frame's UI is rendered and ready to be shown. */\n ready: void;\n complete: { transaction: FrameTransaction };\n /** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */\n challenge: ChallengeRequired;\n error: FrameError;\n}\n\nexport interface OutboundMessageMap {\n setQuote: { quote: { signature: string } };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../src/frames/buy-button.ts"],"sourcesContent":["import type { ChallengeRequired } from '../models/challenge.js';\nimport type { FrameTransaction } from '../models/transaction.js';\nimport type { FrameError } from '../protocol.js';\n\nexport interface MessageMap {\n /** Frame's UI is rendered and ready to be shown. */\n ready: void;\n /**\n * Fired the instant the user taps the native wallet-pay button (Apple Pay /\n * Google Pay) rendered by the buy button frame, BEFORE the OS payment sheet is\n * presented. This is an intent-to-buy / tap signal, distinct from `complete`\n * (the purchase outcome). It fires unconditionally on tap, even if the user\n * later cancels the sheet.\n */\n buttonPressed: void;\n complete: { transaction: FrameTransaction };\n /** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */\n challenge: ChallengeRequired;\n error: FrameError;\n}\n\nexport interface OutboundMessageMap {\n setQuote: { quote: { signature: string } };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -5,6 +5,14 @@ import { FrameError } from '../protocol.cjs';
5
5
  interface MessageMap {
6
6
  /** Frame's UI is rendered and ready to be shown. */
7
7
  ready: void;
8
+ /**
9
+ * Fired the instant the user taps the native wallet-pay button (Apple Pay /
10
+ * Google Pay) rendered by the buy button frame, BEFORE the OS payment sheet is
11
+ * presented. This is an intent-to-buy / tap signal, distinct from `complete`
12
+ * (the purchase outcome). It fires unconditionally on tap, even if the user
13
+ * later cancels the sheet.
14
+ */
15
+ buttonPressed: void;
8
16
  complete: {
9
17
  transaction: FrameTransaction;
10
18
  };
@@ -5,6 +5,14 @@ import { FrameError } from '../protocol.js';
5
5
  interface MessageMap {
6
6
  /** Frame's UI is rendered and ready to be shown. */
7
7
  ready: void;
8
+ /**
9
+ * Fired the instant the user taps the native wallet-pay button (Apple Pay /
10
+ * Google Pay) rendered by the buy button frame, BEFORE the OS payment sheet is
11
+ * presented. This is an intent-to-buy / tap signal, distinct from `complete`
12
+ * (the purchase outcome). It fires unconditionally on tap, even if the user
13
+ * later cancels the sheet.
14
+ */
15
+ buttonPressed: void;
8
16
  complete: {
9
17
  transaction: FrameTransaction;
10
18
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/frames/google-pay.ts"],"sourcesContent":["import type { ChallengeRequired } from '../models/challenge.js';\nimport type { FrameTransaction } from '../models/transaction.js';\nimport type { FrameError } from '../protocol.js';\n\nexport interface InboundMessageMap {\n ready: void;\n error: FrameError<\n 'configurationError' | 'quoteExpired' | 'invalidQuote' | 'googlePayUnavailable' | 'generic'\n >;\n /** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */\n challenge: ChallengeRequired;\n complete: { transaction: FrameTransaction };\n}\n\nexport interface OutboundMessageMap {\n setQuote: { quote: { signature: string } };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../src/frames/google-pay.ts"],"sourcesContent":["import type { ChallengeRequired } from '../models/challenge.js';\nimport type { FrameTransaction } from '../models/transaction.js';\nimport type { FrameError } from '../protocol.js';\n\nexport interface InboundMessageMap {\n ready: void;\n error: FrameError<\n 'configurationError' | 'quoteExpired' | 'invalidQuote' | 'googlePayUnavailable' | 'generic'\n >;\n /**\n * Fired the instant the user taps the native Google Pay button, BEFORE the OS\n * payment sheet is presented. This is an intent-to-buy / tap signal, distinct\n * from `complete` (the purchase outcome). It fires unconditionally on tap,\n * even if the user later cancels the sheet.\n */\n buttonPressed: void;\n /** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */\n challenge: ChallengeRequired;\n complete: { transaction: FrameTransaction };\n}\n\nexport interface OutboundMessageMap {\n setQuote: { quote: { signature: string } };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -5,6 +5,13 @@ import { FrameError } from '../protocol.cjs';
5
5
  interface InboundMessageMap {
6
6
  ready: void;
7
7
  error: FrameError<'configurationError' | 'quoteExpired' | 'invalidQuote' | 'googlePayUnavailable' | 'generic'>;
8
+ /**
9
+ * Fired the instant the user taps the native Google Pay button, BEFORE the OS
10
+ * payment sheet is presented. This is an intent-to-buy / tap signal, distinct
11
+ * from `complete` (the purchase outcome). It fires unconditionally on tap,
12
+ * even if the user later cancels the sheet.
13
+ */
14
+ buttonPressed: void;
8
15
  /** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */
9
16
  challenge: ChallengeRequired;
10
17
  complete: {
@@ -5,6 +5,13 @@ import { FrameError } from '../protocol.js';
5
5
  interface InboundMessageMap {
6
6
  ready: void;
7
7
  error: FrameError<'configurationError' | 'quoteExpired' | 'invalidQuote' | 'googlePayUnavailable' | 'generic'>;
8
+ /**
9
+ * Fired the instant the user taps the native Google Pay button, BEFORE the OS
10
+ * payment sheet is presented. This is an intent-to-buy / tap signal, distinct
11
+ * from `complete` (the purchase outcome). It fires unconditionally on tap,
12
+ * even if the user later cancels the sheet.
13
+ */
14
+ buttonPressed: void;
8
15
  /** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */
9
16
  challenge: ChallengeRequired;
10
17
  complete: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/sdks/apple-pay.ts"],"sourcesContent":["import type * as ApplePayFrame from '../frames/apple-pay.js';\nimport type { FrameTransaction } from '../models/transaction.js';\n\nexport type EventError = {\n kind: 'configurationError' | 'invalidQuote' | 'quoteExpired' | 'genericError';\n message: string;\n};\n\nexport type Event =\n | { kind: 'ready' }\n | { kind: 'complete'; payload: { transaction: FrameTransaction } }\n | { kind: 'challenge'; payload: ApplePayFrame.InboundMessageMap['challenge'] }\n | { kind: 'quoteExpired'; payload: { setQuote: (signature: string) => void } }\n | { kind: 'error'; payload: EventError }\n | { kind: 'unsupported' };\n\nexport interface SetupError {\n kind: 'configurationError' | 'genericError';\n message: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../src/sdks/apple-pay.ts"],"sourcesContent":["import type * as ApplePayFrame from '../frames/apple-pay.js';\nimport type { FrameTransaction } from '../models/transaction.js';\n\nexport type EventError = {\n kind: 'configurationError' | 'invalidQuote' | 'quoteExpired' | 'genericError';\n message: string;\n};\n\nexport type Event =\n | { kind: 'ready' }\n | { kind: 'buttonPressed' }\n | { kind: 'complete'; payload: { transaction: FrameTransaction } }\n | { kind: 'challenge'; payload: ApplePayFrame.InboundMessageMap['challenge'] }\n | { kind: 'quoteExpired'; payload: { setQuote: (signature: string) => void } }\n | { kind: 'error'; payload: EventError }\n | { kind: 'unsupported' };\n\nexport interface SetupError {\n kind: 'configurationError' | 'genericError';\n message: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -9,6 +9,8 @@ type EventError = {
9
9
  };
10
10
  type Event = {
11
11
  kind: 'ready';
12
+ } | {
13
+ kind: 'buttonPressed';
12
14
  } | {
13
15
  kind: 'complete';
14
16
  payload: {
@@ -9,6 +9,8 @@ type EventError = {
9
9
  };
10
10
  type Event = {
11
11
  kind: 'ready';
12
+ } | {
13
+ kind: 'buttonPressed';
12
14
  } | {
13
15
  kind: 'complete';
14
16
  payload: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/sdks/buy-button.ts"],"sourcesContent":["import type * as BuyButtonFrame from '../frames/buy-button.js';\n\nexport type Event =\n | { kind: 'ready' }\n | { kind: 'complete'; payload: BuyButtonFrame.MessageMap['complete'] }\n | { kind: 'challenge'; payload: BuyButtonFrame.MessageMap['challenge'] }\n | { kind: 'error'; payload: BuyButtonFrame.MessageMap['error'] };\n\nexport interface SetupError {\n kind: 'configurationError' | 'genericError';\n message: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../src/sdks/buy-button.ts"],"sourcesContent":["import type * as BuyButtonFrame from '../frames/buy-button.js';\n\nexport type Event =\n | { kind: 'ready' }\n | { kind: 'buttonPressed' }\n | { kind: 'complete'; payload: BuyButtonFrame.MessageMap['complete'] }\n | { kind: 'challenge'; payload: BuyButtonFrame.MessageMap['challenge'] }\n | { kind: 'error'; payload: BuyButtonFrame.MessageMap['error'] };\n\nexport interface SetupError {\n kind: 'configurationError' | 'genericError';\n message: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -5,6 +5,8 @@ import '../protocol.cjs';
5
5
 
6
6
  type Event = {
7
7
  kind: 'ready';
8
+ } | {
9
+ kind: 'buttonPressed';
8
10
  } | {
9
11
  kind: 'complete';
10
12
  payload: MessageMap['complete'];
@@ -5,6 +5,8 @@ import '../protocol.js';
5
5
 
6
6
  type Event = {
7
7
  kind: 'ready';
8
+ } | {
9
+ kind: 'buttonPressed';
8
10
  } | {
9
11
  kind: 'complete';
10
12
  payload: MessageMap['complete'];
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/sdks/google-pay.ts"],"sourcesContent":["import type * as GooglePayFrame from '../frames/google-pay.js';\nimport type { FrameTransaction } from '../models/transaction.js';\n\nexport type EventError = {\n kind: 'configurationError' | 'invalidQuote' | 'quoteExpired' | 'genericError';\n message: string;\n};\n\nexport type Event =\n | { kind: 'ready' }\n | { kind: 'complete'; payload: { transaction: FrameTransaction } }\n | { kind: 'challenge'; payload: GooglePayFrame.InboundMessageMap['challenge'] }\n | { kind: 'quoteExpired'; payload: { setQuote: (signature: string) => void } }\n | { kind: 'error'; payload: EventError }\n | { kind: 'unsupported' };\n\nexport interface SetupError {\n kind: 'configurationError' | 'genericError';\n message: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../src/sdks/google-pay.ts"],"sourcesContent":["import type * as GooglePayFrame from '../frames/google-pay.js';\nimport type { FrameTransaction } from '../models/transaction.js';\n\nexport type EventError = {\n kind: 'configurationError' | 'invalidQuote' | 'quoteExpired' | 'genericError';\n message: string;\n};\n\nexport type Event =\n | { kind: 'ready' }\n | { kind: 'buttonPressed' }\n | { kind: 'complete'; payload: { transaction: FrameTransaction } }\n | { kind: 'challenge'; payload: GooglePayFrame.InboundMessageMap['challenge'] }\n | { kind: 'quoteExpired'; payload: { setQuote: (signature: string) => void } }\n | { kind: 'error'; payload: EventError }\n | { kind: 'unsupported' };\n\nexport interface SetupError {\n kind: 'configurationError' | 'genericError';\n message: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -9,6 +9,8 @@ type EventError = {
9
9
  };
10
10
  type Event = {
11
11
  kind: 'ready';
12
+ } | {
13
+ kind: 'buttonPressed';
12
14
  } | {
13
15
  kind: 'complete';
14
16
  payload: {
@@ -9,6 +9,8 @@ type EventError = {
9
9
  };
10
10
  type Event = {
11
11
  kind: 'ready';
12
+ } | {
13
+ kind: 'buttonPressed';
12
14
  } | {
13
15
  kind: 'complete';
14
16
  payload: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moonpay/platform-protocol",
3
- "version": "1.8.0",
3
+ "version": "1.12.0",
4
4
  "description": "Shared protocol types for the MoonPay Developer Platform",
5
5
  "type": "module",
6
6
  "exports": {