pk_...) and the SDK installed.
Add a funding flow
RenderFund with the destination address, token, and chain. The customer picks a source and an amount, and the funds arrive as the token you set.
to.token locks the destination token. On Fund, to.chain sets the initial chain, and the customer can switch it. To let the customer change the token too, replace token with defaultToken and pair it with either chain or defaultChain.
Open a specific funding method
WithoutpaymentMethod, the customer chooses between their connected wallet, a crypto transfer, a card, and an exchange account. Set it to open one directly.
onramp prop, as in the example above, and must be enabled for your project; contact the team to turn it on.
For card funding, from.currency takes an ISO 4217 code such as USD or EUR, and from.amount is in that currency. The widget offers the card providers available in the customer’s country and shows the amount each delivers before the customer pays.
Card and bank purchases have a minimum and maximum that depend on the country, currency, and destination token. The widget reads them before quoting: an amount under the minimum shows “Minimum purchase is X CUR”, disables the button, and skips the quote. To validate an amount in your own UI, use useMeldPurchaseLimits.
Limit and order the funding methods
fundMethodsList sets which methods appear and in what order. Add hideUnlistedFundMethods to remove the rest instead of showing them disabled.
connected-wallet, crypto-transfer, cc-onramp, and exchange.
Fix the amount that arrives
To have the customer enter the amount they receive instead of the amount they send, settype to EXACT_OUTPUT. This applies to connected wallet funding; card and exchange funding always use the amount sent.
Fund straight into a contract
Passto.calldata to run a contract call, such as a vault deposit, with the funds as they arrive. See contract calls on arrival.