Using the Kima SDK Without the Widget
Last updated
Last updated
The Kima Widget serves as a reference implementation written in React. If your project uses another framework, or you want to make a custom component, it’s possible to interact with the Kima Transaction Backend directly. But:
🚨 CREDIT CARD TRANSACTIONS ARE ONLY SUPPORTED USING THE WIDGET 🚨
The frontend kima-transaction-widget
is required as it must handle KYC and interactions with 3rd party widgets.
User selects the origin and target chains and amount
Fetch the service fees from Kima to obtain a feeId
User signs a message containing the transaction details
User approves Kima to transfer the origin tokens on their behalf
The transaction details are submitted to the Kima Transaction Backend including the signed message and feeId
The UI polls the Kima GraphQL endpoint for status updates until the transaction has completed
The React component on the Kima Github:
The frontend component will need to provide the following information. This will be used to calculate the service fee and the approval for Kima to move tokens on behalf of the user.
Origin (from)
chain: this is the chain the user tokens will come from
token: the (stable coin) token the user will pay with (or bridge from)
address: the source user address- i.e. the connected user
amount: the amount of tokens to transfer
Target (to)
Chain: the destination chain
Token: the (stable coin) token being delivered
In a payment scenario this will be the same as the origin token
Address: the receiving address
In a bridge transaction this will be same as the connected user
See the list of chains and tokens in the section.