@coinflowlabs/react

中文文档
6.0.0发布于 2026/11/01Apache-2.0TypeScriptESM + CJS

React Component for Coinflow Withdraw

原始使用文档
文档目录88 节
  1. Withdraw Usage
  2. Purchase Usage
  3. Utils
  4. 6.0.0
  5. 5.21.0
  6. 5.19.0
  7. 5.17.0
  8. 5.16.0
  9. 5.15.0
  10. 5.14.0
  11. 5.11.0
  12. 5.10.0
  13. 5.9.2
  14. 5.9.1
  15. 5.8.1
  16. 5.8.0
  17. 5.7.0
  18. 5.6.0
  19. 5.5.1
  20. 5.5.0
  21. 5.4.4
  22. 5.4.3
  23. 5.4.2
  24. 5.4.1
  25. 5.4.0
  26. 5.3.1
  27. 5.3.0
  28. 5.1.0
  29. 5.0.9
  30. 5.0.8
  31. 5.0.7
  32. 5.0.6
  33. 5.0.5
  34. 5.0.4
  35. 5.0.3
  36. 5.0.2
  37. 5.0.2
  38. 5.0.1
  39. 5.0.0
  40. 4.5.2
  41. 4.5.1
  42. 4.5.0
  43. 4.4.1
  44. 4.4.0
  45. 4.3.1
  46. 4.3.0
  47. 4.2.10
  48. 4.2.9
  49. 4.2.8
  50. 4.2.5
  51. 4.2.4
  52. 4.1.0
  53. 4.0.0
  54. 3.1.11
  55. 3.1.10
  56. 3.1.9
  57. 3.1.8
  58. 3.1.7
  59. 3.1.5
  60. 3.1.4
  61. 3.1.2
  62. 3.1.1
  63. 3.0.1
  64. 3.0.0
  65. 2.7.1
  66. 2.7.0
  67. 2.6.1
  68. 2.6.0
  69. 2.5.0
  70. 2.4.0
  71. 2.3.2
  72. 2.3.0
  73. 2.2.0
  74. 2.1.1
  75. 2.1.0
  76. 2.0.0
  77. 1.3.0
  78. 1.2.0
  79. 1.0.0
  80. 0.3.0
  81. 0.2.11
  82. 0.2.9
  83. 0.2.6,0.2.7
  84. 0.2.5
  85. 0.2.4
  86. 0.2.2,0.2.3
  87. 0.2.1
  88. 0.2.0

Coinflow React

Withdraw Usage

import {useWallet} from '@solana/wallet-adapter-react';
const wallet = useWallet();
const connection = useConnection();

<CoinflowWithdraw wallet={wallet} merchantId='<YOUR MERCHANT ID>' env='prod|sandbox' connection={connection} />;

Props:

  • wallet: The Solana Wallet Adapter Wallet
  • merchantId: Your Merchant ID (Contact Coinflow support for this)
  • connection: Solana Connection
  • env (optional): This defaults to prod
    • For testing set to sandbox
  • onSuccess (optional): function to run when the withdrawal process is successful
  • lockAmount (optional): Whether to let the user select the amount to withdraw or to disable the input
  • amount (optional): The amount to withdraw - required if lockAmount=true
  • tokens (optional): Define a list to filter the available tokens
  • lockDefaultToken (optional): Only allow the default token to be used
  • email (optional): Set the default email to be used in entry fields
  • bankAccountLinkRedirect (optional): The URL to be used for bank account setup
  • additionalWallets (optional): Define additional wallets to assign to the user
  • usePermit (optional): Pass as false to disable permit message signing for EVM and use approve transactions
  • transactionSigner (optional): Public Key of the wallet which will actually execute the withdrawal transaction. Must be associated with the same withdrawer as the main wallet.

Purchase Usage

import {useWallet} from '@solana/wallet-adapter-react';
const wallet = useWallet();
const connection = useConnection();

<CoinflowPurchase wallet={wallet} merchantId='<YOUR MERCHANT ID>' env='prod|sandbox|staging' connection={connection} />;

Props:

  • subtotal (optional): Fix the amount of purchase
  • wallet: The Solana Wallet Adapter Wallet
  • merchantId: Your Merchant ID (Contact Coinflow support for this)
  • connection: Solana Connection
  • env (optional): This defaults to prod
    • For testing set to staging
  • onSuccess (optional): function to run when the purchase process is successful
  • transaction (optional): transaction for the user to run which redeems their credits with your smart contract. Create this transaction just like you would for a normal user who has USDC in their account.
  • debugTx (optional): Setting this to true will sign the transaction with the wallet, and send the transaction with no preflight checks allowing for easier debug of any issues.
  • planCode (optional): When a subscription is being purchased, the code of the subscription plan.
  • settlementType (optional): The settlement method to use for the proceeds of a purchase. (Credits, USDC, or Bank)
  • webhookInfo (optional): Product or transaction based information that you want transmitted when you receive webhooks regarding the purchase
  • email (optional): Set the default email to use in email entry fields
  • chargebackProtectionData (optional):
  • customerInfo (optional): Additional information about the customer
  • allowedPaymentMethods (optional): The payment methods displayed on the UI. If omitted, all available payment methods will be displayed.
  • rent (optional, Solana only): Specify the blockchain rent amount to add to the total
  • nativeSolToConvert (optional, Solana only): Specify the amount of native SOL to convert wSOL for the purchase
  • jwtToken (optional): A JWT token which encodes verified checkout parameters to prevent spoofing of arguments.
  • supportEmail (optional): Your business support email address to use for support inquiries
  • zeroAuthorization (optional): Pass in true if you wish to perform a zero authorization card transaction

Utils

CoinflowUtils

  • getFeePayer - Return the PublicKey of the Coinflow Fee Payer

Changelog

6.0.0

  • Breaking: Removed the deprecated legacy card form components: CoinflowCardNumberInput, CoinflowCvvInput, CoinflowCvvOnlyInput, CoinflowCardOnlyInput, CoinflowCardFormHeader and their CoinflowLegacy* aliases. Use CoinflowCardForm, CoinflowCardNumberForm or CoinflowCvvForm instead.

5.21.0

  • Added loading states to the CoinflowCardForm, CoinflowCardNumberInput, CoinflowCvvOnlyInput components

5.19.0

  • CoinflowVenmoButton now renders Venmo's approval flow as an in-page modal instead of a popup window
  • Breaking: CoinflowVenmoButton now requires an overlayId prop — the id of an element the approval overlay fills while it's open, matching CoinflowPayPalButton

5.17.0

  • Added CoinflowVenmoButton to let merchants embed the Venmo button in their own checkout UI

5.16.0

  • Added CoinflowPayPalButton to let merchants embed the PayPal button in their own checkout UI

5.15.0

  • Added cardBackground to MerchantTheme to control the inner card-entry surface independently of the outer canvas background
  • Added placeholderColor to MerchantTheme to control placeholder text color in card form inputs
  • Fixed the card brand icon being hidden when the card form reflows to a stacked two-row layout at narrow widths

5.14.0

  • Fixed an issue with vertical spacing when resizing the page

5.11.0

  • Added unified protection initialization helper and headers helper
  • Test zipcode 00001 triggers fraud protection rejection

5.10.0

  • Added support for CashApp redirection

5.9.2

  • Fixed typing for sessionKey being not present when passing the wallet object

5.9.1

  • Added support for overriding the default account type (from merchant settings) used for chargeback protection via chargebackProtectionAccountType in the URL parameters.

5.8.1

  • Added support for custom pay-in fees via customPayInFees in the JWT token or URL parameters. This allows merchants to add custom fee line items (fixed or percentage-based) that are displayed during checkout.

5.8.0

  • New Blockchain Support: The SDK now supports Stellar, a fast and low-cost blockchain for payments. Pass blockchain='stellar' to enable Stellar payment processing.

5.7.0

  • Added zeroAuthorizationConfig prop to CoinflowPurchase for controlling zero authorization behavior (show/hide saved payment methods, verify a specific card by token). Deprecates isZeroAuthorization boolean prop.

5.6.0

  • New Blockchain Support: The SDK now supports Monad, a high-performance EVM-compatible blockchain. Pass blockchain='monad' to enable Monad payment processing.

5.5.1

  • Internal change to a query parameter name for zero authorization

5.5.0

  • Added zeroAuthorization parameter to allow zero authorization card transactions

5.4.4

  • NSure SDK added as a dependency

5.4.3

  • Added email as a field for customerInfo

5.4.2

  • Large performance improvements when loading the Checkout Form

5.4.1

  • Added redemptionCheck to purchase (Solana only)

5.4.0

  • Added allowedWithdrawSpeeds query parameter to allow merchants to specify what withdraw speeds are allowed. The default is all.

5.3.1

  • Added more chargebackProtectionData product types

5.3.0

  • Added partialUsdcChecked property to pre-check partial USDC payment checkbox

5.1.0

  • Added Multi-Currency Presentment via the presentment property

5.0.9

  • Improving Withdraw With Session Keys

5.0.8

  • credentialless added synchronously before render

5.0.7

  • Add credentialless to iframe

5.0.6

  • Fixing onAuthDeclined callback

5.0.5

  • Added seller prop to chargebackProtectionData

5.0.4

  • Added 3DS Challenge Handling to the standalone Google Pay button

5.0.3

  • Added allowedPaymentMethods to CoinflowPurchase
  • Options are:
    • 'card' = Credit and debit cards
    • 'ach' = ACH bank account transfers
    • 'fasterPayments' = UK Faster Payments (GBP Bank Transfers)
    • 'sepa' = SEPA bank account transfers (EUR Bank Transfers)
    • 'pix' = Pix bank account transfers (BRL Bank Transfers)
    • 'usdc' = USDC
    • 'googlePay' = Google Pay
    • 'applePay' = Apple Pay
    • 'credits' = Credits

5.0.2

5.0.2

  • Allow copy to clipboard for Coinflow Iframe

5.0.1

  • Added onAuthDeclined callback to CoinflowPurchase

5.0.0

  • Deprecating amount and token in favor of subtotal which can be accessed via the following ways:
  • Added multi-currency support for presentment
  • SEPA and UK Faster Payments support
{
  cents: number;
  currency: 'USD' | 'EUR' | 'GBP' | 'BRL';
}

or

{
  address: string;
  amount: number;
}

4.5.2

  • Updating optional peer dependencies to play nice with various bundlers

4.5.1

  • Added sessionKey authentication mechanism to CoinflowWithdraw

4.5.0

  • Added sessionKey authentication mechanism to CoinflowPurchase

4.4.1

  • Added onError callback to Apple Pay and Google Pay buttons

4.4.0

  • Added overlay to digital wallet buttons to make the loading time 0

4.3.1

  • CoinflowPurchaseV2 component added for a modernized purchase flow

4.3.0

  • Added arbitrum blockchain support

4.2.10

  • Added getWalletFromEmail function to CoinflowUtils

4.2.9

  • Added placeholder CSS to card form elements

4.2.8

  • Custom fonts for card elements

4.2.5

  • Allow custom taker on reservoir transactions

4.2.4

  • Memoize styles on credit card inputs

4.1.0

  • Add base blockchain support
  • Added AuthOnly parameter to CoinflowPurchase

4.0.0

  • Require signMessage on wallets for stronger withdraw authentication

3.1.11

  • Added new ChargebackProtectionData productTypes

3.1.10

  • Added waitForHash to EvmTransactionData

3.1.9

  • Added theme props to Coinflow components for easy color control

3.1.8

  • Added orderId option for reservoir items

3.1.7

  • Added nativeSolToConvert for Solana transactions

3.1.5

  • Settlement type param for settlement control

3.1.4

  • Customer info param for added reporting capabilities

3.1.2

  • Added disableGooglePay and disableApplePay props to CoinflowPurchase

3.1.1

  • Added support for EVM NFT purchases

3.0.1

  • Update to CoinflowPurchaseProtection to make partnerId required

3.0.0

Breaking Changes

  • Added supportsVersionedTransactions to CoinflowWithdraw allowing platforms with wallets that support versioned transactions to Withdraw non-USDC/EuroE tokens in a single transaction with better prices.
  • This is enabled to true by default. If you are using a wallet that does not support versioned transactions, you must set supportsVersionedTransactions in CoinflowWithdraw to false.

2.7.1

  • Added new property lockDefaultToken which locks the withdrawal option to the users default currency (USDC or EUROe)

2.7.0

  • Added support for paying solana rent for a transaction
  • Added camera support document verification

2.6.1

  • Added built in support for SSR which fixes a "window not defined" error.

2.6.0

  • Added support for Apple Pay and Google Pay

2.5.0

  • Added the CoinflowCardForm component which allows merchants to collect credit card information from their users in a PCI compliant way. Tokenize it, and then utilize the remainder of Coinflow's APIs.

2.4.0

  • Added support for Ethereum Mainnet

2.3.2

  • Added typing for ChargebackProtectionData
  • Added token prop for CoinflowPurchase with polygon

2.3.0

Support Versioned Transactions in CoinflowPurchase

2.2.0

Added useSocket property to handle browser instances where iframe messages are unavailable

2.1.1

  • Bug fix to set useHeightChange url param to true if using the handleHeightChange prop

2.1.0

  • Added handleHeightChange to all components to allow for dynamic height changes

2.0.0

  • Removing hard requirements for most large 3rd party libraries
  • Improved type checking for wallets and transactions

1.3.0

  • Added support for Polygon blockchain
  • Added support for Solana Checkout with non-USDC tokens

1.2.0

  • Added support for Ethereum Mainnet blockchain

1.0.0

  • Added support for the NEAR blockchain

0.3.0

  • Added Withdraw and Purchase history components

0.2.11

  • Fixing bug with Magic Wallet and Versioned Transactions

0.2.9

  • Added the ability to sign transactions

0.2.6,0.2.7

  • Added CoinflowUtils.getFeePayer() to get the Coinflow fee payer PublicKey

0.2.5

  • Fixing an issue when passing partialSigners not working with the setup transaction

0.2.4

  • Setup and Redeem transactions now run gasless, which doesnt require the user to have SOL in their account to interact with coinflow

0.2.2,0.2.3

  • Added the optional debugTx parameter to allow for easier debugging of any redeem transaction related issues.

0.2.1

  • Added the optional partialSigners parameter to CoinflowPurchase component so redeem txs that require partial signers can be supported.

0.2.0

  • Added the transaction optional parameter to CoinflowPurchase component enabling automatic redemption of credits on purchases.

版本与发布记录

@coinflowlabs/react 共发布 125 个版本,首次发布于 2022/11/17;过去 12 个月发布了 26 个版本。

版本发布日期距今
6.0.0latest2026/11/012 天前
5.22.32026/10/0628 天前
5.22.22026/09/251 个月前
5.22.12026/09/231 个月前
5.22.02026/08/202 个月前
5.21.12026/08/082 个月前

关于 @coinflowlabs/react 的常见问题

@coinflowlabs/react 是什么?

回流回收的React组件

如何安装 @coinflowlabs/react?

在项目目录运行 npm install @coinflowlabs/react,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(>=16)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@coinflowlabs/react 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@coinflowlabs/react 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@coinflowlabs/react 可以商用吗?

@coinflowlabs/react 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@coinflowlabs/react 还在维护吗?

最新版本 6.0.0 发布于 2026/11/01(2 天前);至今共发布 125 个版本,其中过去 12 个月发布了 26 个;首次发布于 2022/11/17。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。