@coinflowlabs/vue 1.13.0 → 1.15.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.
@@ -24,7 +24,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
24
24
  };
25
25
  redemptionCheck?: boolean;
26
26
  subtotal?: import('..').Subtotal;
27
- customPayInFees?: import('..').PurchaseCustomPayInFee[];
28
27
  presentment?: import('..').Currency;
29
28
  onSuccess?: import('..').OnSuccessMethod;
30
29
  sessionKey?: string;
@@ -63,7 +62,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
63
62
  wallet?: undefined;
64
63
  blockchain?: import('..').CoinflowBlockchain | undefined;
65
64
  subtotal?: import('..').Subtotal;
66
- customPayInFees?: import('..').PurchaseCustomPayInFee[];
67
65
  presentment?: import('..').Currency;
68
66
  onSuccess?: import('..').OnSuccessMethod;
69
67
  onAuthDeclined?: import('..').OnAuthDeclinedMethod;
@@ -100,7 +98,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
100
98
  blockchain: "polygon";
101
99
  wallet: import('..').EthWallet;
102
100
  subtotal?: import('..').Subtotal;
103
- customPayInFees?: import('..').PurchaseCustomPayInFee[];
104
101
  presentment?: import('..').Currency;
105
102
  onSuccess?: import('..').OnSuccessMethod;
106
103
  sessionKey?: string;
@@ -138,7 +135,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
138
135
  blockchain: "eth";
139
136
  wallet: import('..').EthWallet;
140
137
  subtotal?: import('..').Subtotal;
141
- customPayInFees?: import('..').PurchaseCustomPayInFee[];
142
138
  presentment?: import('..').Currency;
143
139
  onSuccess?: import('..').OnSuccessMethod;
144
140
  sessionKey?: string;
@@ -176,7 +172,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
176
172
  blockchain: "base";
177
173
  wallet: import('..').EthWallet;
178
174
  subtotal?: import('..').Subtotal;
179
- customPayInFees?: import('..').PurchaseCustomPayInFee[];
180
175
  presentment?: import('..').Currency;
181
176
  onSuccess?: import('..').OnSuccessMethod;
182
177
  sessionKey?: string;
@@ -214,7 +209,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
214
209
  blockchain: "arbitrum";
215
210
  wallet: import('..').EthWallet;
216
211
  subtotal?: import('..').Subtotal;
217
- customPayInFees?: import('..').PurchaseCustomPayInFee[];
218
212
  presentment?: import('..').Currency;
219
213
  onSuccess?: import('..').OnSuccessMethod;
220
214
  sessionKey?: string;
@@ -252,7 +246,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
252
246
  wallet: import('..').StellarWallet;
253
247
  blockchain: "stellar";
254
248
  subtotal?: import('..').Subtotal;
255
- customPayInFees?: import('..').PurchaseCustomPayInFee[];
256
249
  presentment?: import('..').Currency;
257
250
  onSuccess?: import('..').OnSuccessMethod;
258
251
  sessionKey?: string;
@@ -290,7 +283,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
290
283
  blockchain: "monad";
291
284
  wallet: import('..').EthWallet;
292
285
  subtotal?: import('..').Subtotal;
293
- customPayInFees?: import('..').PurchaseCustomPayInFee[];
294
286
  presentment?: import('..').Currency;
295
287
  onSuccess?: import('..').OnSuccessMethod;
296
288
  sessionKey?: string;
@@ -328,7 +320,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
328
320
  blockchain: "tempo";
329
321
  wallet: import('..').EthWallet;
330
322
  subtotal?: import('..').Subtotal;
331
- customPayInFees?: import('..').PurchaseCustomPayInFee[];
332
323
  presentment?: import('..').Currency;
333
324
  onSuccess?: import('..').OnSuccessMethod;
334
325
  sessionKey?: string;
@@ -29,7 +29,7 @@ export declare enum SettlementType {
29
29
  }
30
30
  /**
31
31
  * Configuration for a single custom pay-in fee line item.
32
- * Use with customPayInFees prop on purchase flows.
32
+ * Pass via the `customPayInFees` field on `/checkout/link` or `/checkout/jwt-token`.
33
33
  */
34
34
  export interface PurchaseCustomPayInFee {
35
35
  lineItemLabel: string;
@@ -79,6 +79,7 @@ export declare enum MerchantStyle {
79
79
  export type MerchantTheme = {
80
80
  primary?: string;
81
81
  background?: string;
82
+ cardBackground?: string;
82
83
  backgroundAccent?: string;
83
84
  backgroundAccent2?: string;
84
85
  textColor?: string;
@@ -92,6 +93,7 @@ export type MerchantTheme = {
92
93
  cardNumberPlaceholder?: string;
93
94
  cvvPlaceholder?: string;
94
95
  expirationPlaceholder?: string;
96
+ placeholderColor?: string;
95
97
  showCardIcon?: boolean;
96
98
  };
97
99
  interface BaseCustomerInfo {
@@ -264,16 +266,48 @@ export declare enum PaymentMethods {
264
266
  credits = "credits",
265
267
  crypto = "crypto",
266
268
  wire = "wire",
267
- cashApp = "cashApp"
269
+ cashApp = "cashApp",
270
+ rain = "rain"
268
271
  }
269
272
  export declare const paymentMethodLabels: Record<PaymentMethods, string>;
270
- export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
271
- subtotal?: Subtotal;
273
+ export interface CoinflowCommonPaymentIntentProps extends Omit<CoinflowTypes, 'blockchain'> {
274
+ paymentIntentId: string;
275
+ onSuccess?: OnSuccessMethod;
276
+ onAuthDeclined?: OnAuthDeclinedMethod;
277
+ /**
278
+ * If true, pre-checks the partial USDC payment checkbox when USDC balance is available.
279
+ * If false or undefined, maintains default behavior (unchecked).
280
+ */
281
+ partialUsdcChecked?: boolean;
282
+ /**
283
+ * The DeviceID gotten from the Coinflow SDK:
284
+ * https://docs.coinflow.cash/guides/checkout/fraud-protection/chargeback-protection/implement-chargeback-protection#how-to-add-chargeback-protection
285
+ *
286
+ * nSureSDK.getDeviceId()
287
+ */
288
+ deviceId?: string;
289
+ /**
290
+ * If rendering the Coinflow component within multiple nested iframes, all ancestors in the chain must be provided as a comma-separated list.
291
+ *
292
+ * Example:
293
+ * Primary origin that will be interacting with the Coinflow iFrame: foo.com
294
+ * Subsequent origins that will render foo.com: bar.com
295
+ * The origin array would then be: [https://foo.com,https://bar.com]
296
+ */
297
+ origins?: string[];
272
298
  /**
273
- * Custom pay-in fees to add to checkout. Each fee appears as a separate line item.
274
- * These fees are added to the subtotal and displayed to the customer.
299
+ * End-user wallet used for wallet-authenticated payment-intent checkout flows.
300
+ *
301
+ * Required when the target payment intent type depends on a customer wallet
302
+ * (for example: EVM/Solana/Stellar transaction intents or credits/USDC signing flows).
303
+ *
304
+ * The wallet implementation must match the active blockchain.
275
305
  */
276
- customPayInFees?: PurchaseCustomPayInFee[];
306
+ wallet?: WalletTypes;
307
+ blockchain?: 'solana' | 'eth' | 'polygon' | 'base' | 'arbitrum' | 'stellar' | 'monad';
308
+ }
309
+ export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
310
+ subtotal?: Subtotal;
277
311
  presentment?: Currency;
278
312
  onSuccess?: OnSuccessMethod;
279
313
  sessionKey?: string;
@@ -601,7 +635,7 @@ export interface DecentRedeem extends CommonEvmRedeem {
601
635
  * Gas fees for the transaction will be automatically calculated and added to the total charged to the customer. Optionally the merchant can opt to pay for these gas fees.
602
636
  */
603
637
  export type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | KnownTokenIdRedeem | NormalRedeem | TokenRedeem | DecentRedeem;
604
- export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' | 'handleHeightChange'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'chargebackProtectionAccountType' | 'webhookInfo' | 'subtotal' | 'customPayInFees' | 'presentment' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins' | 'threeDsChallengePreference' | 'supportEmail' | 'allowedPaymentMethods' | 'accountFundingTransaction' | 'partialUsdcChecked' | 'isZeroAuthorization' | 'zeroAuthorizationConfig'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount' | 'lockDefaultToken' | 'origins' | 'allowedWithdrawSpeeds'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'destinationAuthKey' | 'redemptionCheck'>, WithGeo {
638
+ export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' | 'handleHeightChange'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'chargebackProtectionAccountType' | 'webhookInfo' | 'subtotal' | 'presentment' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins' | 'threeDsChallengePreference' | 'supportEmail' | 'allowedPaymentMethods' | 'accountFundingTransaction' | 'partialUsdcChecked' | 'isZeroAuthorization' | 'zeroAuthorizationConfig'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount' | 'lockDefaultToken' | 'origins' | 'allowedWithdrawSpeeds'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'destinationAuthKey' | 'redemptionCheck'>, WithGeo {
605
639
  walletPubkey: string | null | undefined;
606
640
  sessionKey?: string;
607
641
  route: string;
@@ -616,6 +650,22 @@ export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' |
616
650
  usePermit?: boolean;
617
651
  handleHeightChangeId: string | number;
618
652
  }
653
+ export interface CoinflowIntentsIFrameProps {
654
+ theme?: MerchantTheme;
655
+ merchantCss?: string;
656
+ color?: 'white' | 'black';
657
+ intentId: string;
658
+ route: string;
659
+ routePrefix?: string;
660
+ handleHeightChangeId: string | number;
661
+ env?: CoinflowEnvs;
662
+ loaderBackground?: string;
663
+ handleHeightChange?: (height: string) => void;
664
+ origins?: string[];
665
+ deviceId?: string;
666
+ walletPubkey?: string | undefined | null;
667
+ blockchain?: 'solana' | 'eth' | 'polygon' | 'base' | 'arbitrum' | 'stellar' | 'monad';
668
+ }
619
669
  export declare enum CardType {
620
670
  VISA = "VISA",
621
671
  MASTERCARD = "MSTR",
@@ -1,4 +1,4 @@
1
- import { CoinflowBlockchain, CoinflowEnvs, CoinflowIFrameProps, CoinflowPurchaseProps, CustomerInfo, WithGeo } from './CoinflowTypes';
1
+ import { CoinflowBlockchain, CoinflowEnvs, CoinflowIFrameProps, CoinflowIntentsIFrameProps, CoinflowPurchaseProps, CustomerInfo, WithGeo } from './CoinflowTypes';
2
2
  export declare class CoinflowUtils {
3
3
  env: CoinflowEnvs;
4
4
  url: string;
@@ -7,9 +7,12 @@ export declare class CoinflowUtils {
7
7
  static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
8
8
  static getCoinflowAppBaseUrl(env?: CoinflowEnvs): string;
9
9
  static getCoinflowApiUrl(env?: CoinflowEnvs): string;
10
- static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, customPayInFees, presentment, transaction, blockchain, webhookInfo, email, loaderBackground, handleHeightChangeId, bankAccountLinkRedirect, additionalWallets, chargebackProtectionData, chargebackProtectionAccountType, merchantCss, color, rent, lockDefaultToken, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, lockAmount, nativeSolToConvert, theme, usePermit, transactionSigner, authOnly, deviceId, jwtToken, origins, threeDsChallengePreference, supportEmail, destinationAuthKey, allowedPaymentMethods, accountFundingTransaction, partialUsdcChecked, redemptionCheck, allowedWithdrawSpeeds, isZeroAuthorization, zeroAuthorizationConfig, userLocation, baseUrl, }: CoinflowIFrameProps & {
10
+ static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, presentment, transaction, blockchain, webhookInfo, email, loaderBackground, handleHeightChangeId, bankAccountLinkRedirect, additionalWallets, chargebackProtectionData, chargebackProtectionAccountType, merchantCss, color, rent, lockDefaultToken, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, lockAmount, nativeSolToConvert, theme, usePermit, transactionSigner, authOnly, deviceId, jwtToken, origins, threeDsChallengePreference, supportEmail, destinationAuthKey, allowedPaymentMethods, accountFundingTransaction, partialUsdcChecked, redemptionCheck, allowedWithdrawSpeeds, isZeroAuthorization, zeroAuthorizationConfig, userLocation, baseUrl, }: CoinflowIFrameProps & {
11
11
  baseUrl?: string;
12
12
  } & WithGeo): string;
13
+ static getCoinflowIntentsUrl({ baseUrl, route, color, theme, env, origins, deviceId, merchantCss, loaderBackground, handleHeightChangeId, }: CoinflowIntentsIFrameProps & {
14
+ baseUrl?: string;
15
+ }): string;
13
16
  static getTransaction(props: CoinflowPurchaseProps): string | undefined;
14
17
  static byBlockchain<T>(blockchain: CoinflowBlockchain, args: {
15
18
  solana: T;
@@ -0,0 +1,41 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
2
+ cardForm: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
3
+ args: {
4
+ type: import('vue').PropType<{
5
+ merchantId: string;
6
+ env?: import('..').CoinflowEnvs;
7
+ theme?: import('..').MerchantTheme;
8
+ variant: "card-form" | "card-number-form" | "cvv-form";
9
+ token?: string;
10
+ onLoad?: () => void;
11
+ }>;
12
+ required: true;
13
+ };
14
+ }>> & Readonly<{}>, {
15
+ tokenize: () => Promise<import('../components/card-form/CoinflowCardFormV2.vue').CardFormV2TokenResponse>;
16
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
17
+ iframeRef: HTMLIFrameElement;
18
+ }, HTMLIFrameElement, import('vue').ComponentProvideOptions, {
19
+ P: {};
20
+ B: {};
21
+ D: {};
22
+ C: {};
23
+ M: {};
24
+ Defaults: {};
25
+ }, Readonly<import('vue').ExtractPropTypes<{
26
+ args: {
27
+ type: import('vue').PropType<{
28
+ merchantId: string;
29
+ env?: import('..').CoinflowEnvs;
30
+ theme?: import('..').MerchantTheme;
31
+ variant: "card-form" | "card-number-form" | "cvv-form";
32
+ token?: string;
33
+ onLoad?: () => void;
34
+ }>;
35
+ required: true;
36
+ };
37
+ }>> & Readonly<{}>, {
38
+ tokenize: () => Promise<import('../components/card-form/CoinflowCardFormV2.vue').CardFormV2TokenResponse>;
39
+ }, {}, {}, {}, {}> | null;
40
+ }, HTMLDivElement>;
41
+ export default _default;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coinflowlabs/vue",
3
3
  "private": false,
4
- "version": "1.13.0",
4
+ "version": "1.15.0",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",