Overview
This page contains full documentation for both JavaScript SDK tracks:- Latest SDK:
@tender-cash/js-sdk - Legacy SDK (Old Version):
@tender-cash/agent-sdk-react
- Latest SDK
- Legacy SDK (Old Version)
Package
@tender-cash/js-sdk
Current JavaScript SDK package
Installation
Usage in React
UseTenderSdk as the primary component.
TenderAgentSdk is still exported as a backward-compatible alias.When
referenceId and amount are provided, the modal auto-opens on component mount.API Reference
Component Props (TenderAgentProps)
Applies to both TenderSdk and TenderAgentSdk.Required Props
| Prop | Type | Description |
|---|---|---|
accessId | string | Your Tender merchant Access ID. |
fiatCurrency | string | Fiat code, e.g. "USD", "EUR", "NGN". |
env | "test" | "live" | "local" | Target environment. |
Optional Props
| Prop | Type | Description |
|---|---|---|
onEventResponse | (data: onFinishResponse) => void | Called when payment state changes. |
referenceId | string | Payment reference. Required for auto-open mode. |
amount | number | Payment amount in fiat. Required for auto-open mode. |
paymentExpirySeconds | number | Payment expiration in seconds. |
theme | "light" | "dark" | Modal theme. |
closeModal | () => void | Callback fired when modal closes. |
Ref Usage
Ref Methods (TenderRef)
| Method | Description |
|---|---|
initiatePayment | Opens modal and starts payment with provided parameters. |
dismiss | Closes the modal. |
Callback Data (onFinishResponse)
Features
- Shadow DOM style isolation
- Auto-open mode from props
- Programmatic control with refs
- TypeScript support
- Works across desktop and mobile
Next Steps
API Reference
Explore the full API documentation
Webhooks
Set up webhook notifications
GitHub
View source repositories
Support
Contact our support team