22
33#### Why Another [ Paystack] ( https://paystack.com ) Package?
44
5- Existing Paystack libraries are either outdated, lack modern features, or fail to support TypeScript. This package addresses these gaps by providing:
6- - Full TypeScript support for type safety and better developer experience.
7- - A modern, actively maintained library aligned with Paystack’s latest API updates.
8- - Clean, intuitive APIs designed for ease of use.
5+ Existing Paystack libraries are either outdated, lack modern features, or fail to support TypeScript. This package addresses these gaps by providing:
6+
7+ - Full TypeScript support for type safety and better developer experience.
8+ - A modern, actively maintained library aligned with Paystack’s latest API updates.
9+ - Clean, intuitive APIs designed for ease of use.
10+
11+ ## Deprecation Notice
12+
13+ Named import will be removed in version 4.0.0. Migrate to default import.
14+ Change
15+
16+ ``` ts
17+ import { Paystack } from ' paystack-sdk' ;
18+ const Paystack = require (' paystack-sdk' ).Paystack ;
19+ ```
20+
21+ To
22+
23+ ``` ts
24+ import Paystack from ' paystack-sdk' ;
25+ const Paystack = require (' paystack-sdk' );
26+ ```
927
1028### Installation
1129
@@ -19,31 +37,20 @@ For NPM
1937
2038For Typescript
2139
22- ``` typescript
23- import {Paystack } from ' paystack-sdk' ;
24- // or
40+ ``` ts
2541import Paystack from ' paystack-sdk' ;
2642
27- const paystack = new Paystack (" secret_key" );
43+ const paystack = new Paystack (' secret_key' );
2844```
2945
3046For Javscript
3147
32- ``` javascript
33- const Paystack = require (' paystack-sdk' ).Paystack ;
34- // or
48+ ``` js
3549const Paystack = require (' paystack-sdk' );
3650
3751const paystack = new Paystack (' secret_key' );
3852```
3953
40- OR
41-
42- ``` javascript
43- const { Paystack } = require (' paystack-sdk' );
44- const paystack = new Paystack (' secret_key' );
45- ```
46-
4754All methods use promise meaning you can either use the ` async...await ` or ` then...catch ` or ` try...catch `
4855
4956### Modules
0 commit comments