@nkhind/vivawallet-sdk
Version:
Non-Official VivaWallet API SDK
64 lines (44 loc) • 1.44 kB
Markdown
This is a Non-official VivaWallet Node SDK. It provides a simple way to interact with the VivaWallet API.
```typescript
import { VivaWallet } from '@nkhind/vivawallet-sdk';
const vivawallet = new VivaWallet({
smartClientId: 'your-smartcheckout-client-id',
smartClientSecret: 'your-smartcheckout-client-secret',
merchantId: 'your-merchant-uuid',
apikey: 'your-api-key',
sourceCode: 'MY_SOURCE_CODE', // Optional
});
```
```typescript
import { VivaISV } from '@nkhind/vivawallet-sdk';
const vivaIsv = new VivaISV({
smartClientId: 'your-smartcheckout-client-id',
smartClientSecret: 'your-smartcheckout-client-secret',
sourceCode: 'MY_SOURCE_CODE', // Optional
});
```
```typescript
import { Marketplace } from '@nkhind/vivawallet-sdk';
const vivaMarketplace = new Marketplace({
smartClientId: 'your-smartcheckout-client-id',
smartClientSecret: 'your-smartcheckout-client-secret',
merchantId: 'your-merchant-uuid',
apikey: 'your-api-key',
sourceCode: 'MY_SOURCE_CODE', // Optional
});
```
```typescript
import {
VivaWebhookDatas
SmartCheckoutWebhookEventDatas,
ConnectedAccountWebhookEventDatas,
} from '@nkhind/vivawallet-sdk';
const datas: VivaWebhookDatas<SmartCheckoutWebhookEventDatas> = req.body;
```
The SDK is written in TypeScript for classes typesafety and Vivawallet Webhook typesafety.