API Options
When creating a payment intent with the Khaime API, you can configure how the response is returned.Default Behavior (Token)
By default, the API returns atoken - an opaque string that the React SDK decodes internally.
@khaime/react:
Redirect URL Mode
If you want a redirect URL instead of embedding the checkout, passreturnType: "url":
Some payment gateways (like Startbutton) only support redirect URLs. In these cases, the API automatically returns
redirectUrl regardless of your return_type setting.When to Use Each Mode
Token Mode Benefits
- Seamless checkout experience
- Customer stays on your site
- Full control over UI
URL Mode Benefits
- No frontend code needed
- Works with any platform
- Hosted by Khaime (PCI compliant)
