Frontend SDKs (Payments)
Last updated
Last updated
This page compliments the Basic Payment Integration guide. Here you will find additional information regarding functions used in the Payments Integration Guide.
Depending on whether your use case requires a Token or NFT checkout, The path to the function will be different:
For NFT checkout use:
frontendSDK.nft.buyWithFiat
With the nftId
parameter.
For Token checkout use:
frontendSDK.token.buyWithFiat
With the tokenId
parameter.
The synopsis for both functions almost identical, with the `tokenId` / `nftId` being the only difference:
Field Name | Description |
---|---|
Example of usage
nftID
or
tokenID
The ID of the NFT or Token, as defined by your implementation of the Tweed Backend Payment SDK. (Read more about the: Backend side of the Payments integration)
data
Your custom data that will be passed to Tweed, and later will be sent to you in the Webhook(s).
toWalletAddress
The wallet address that the NFT will be send to, If the wallet was created by tweed the wallet address will be populated automatically.
customMintParams
A key-value set of parameters that will be passed into your on-chain smart contract. Needs to match your contract's ABI!
callbacks
You may define handlers for the following widget events:
onSuccess
, onError
, onClose