Installation
Install the Package
Requirements
- React 17.0.0 or higher
- A Khaime merchant account
The package includes Stripe and Paystack as dependencies - you don’t need to install them separately.
Quick Start
1. Create a payment on your backend
Call the Khaime API to create a payment intent and get a token:2. Pass the token to your frontend
3. Render the checkout component
What Happens Behind the Scenes
When you render<KhaimeCheckout token={...} />:
- The component decodes the token
- It detects which payment gateway to use (Stripe, Paystack, etc.)
- It renders the appropriate UI:
- Stripe: Embedded payment form with card input
- Paystack: Button that opens a popup
- Startbutton: Button that redirects to payment page
- When payment completes,
onSuccessis called with the result
Next Steps
Components Reference
Learn about all available components and their props
