@thepayulink/server 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/index.d.ts +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -75,6 +75,12 @@ toRupees(19950); // 199.5
|
|
|
75
75
|
|
|
76
76
|
### Payouts
|
|
77
77
|
|
|
78
|
+
Payouts, `balance.fetch()` and `transactions.list()` need a **live key with Payouts access**
|
|
79
|
+
and an **IP allowlist** (merchant panel → API Key → *Edit access*). Otherwise the API
|
|
80
|
+
answers `403 KEY_NOT_PERMITTED`, `403 IP_NOT_ALLOWED`, or `400 TEST_MODE_UNSUPPORTED` for a
|
|
81
|
+
test key. Keep that key only on the server that sends payouts; use a separate Checkout key
|
|
82
|
+
for orders.
|
|
83
|
+
|
|
78
84
|
```js
|
|
79
85
|
const payout = await pl.payouts.create({
|
|
80
86
|
amount: rupees(2500), // PAISE; UPI payouts must be whole rupees
|
package/dist/index.d.ts
CHANGED
|
@@ -172,6 +172,7 @@ export default class PayuLink {
|
|
|
172
172
|
list(params?: ListParams & { status?: string; receipt?: string; utr?: string }): Promise<Collection<Order>>;
|
|
173
173
|
};
|
|
174
174
|
|
|
175
|
+
/** Needs a live key with Payouts access, called from an IP on the key's allowlist. */
|
|
175
176
|
payouts: {
|
|
176
177
|
create(params: CreatePayoutParams): Promise<Payout>;
|
|
177
178
|
fetch(payoutId: string): Promise<Payout>;
|
|
@@ -180,10 +181,12 @@ export default class PayuLink {
|
|
|
180
181
|
cancel(payoutId: string, params?: { reason?: string }): Promise<Payout>;
|
|
181
182
|
};
|
|
182
183
|
|
|
184
|
+
/** Needs a live key with Payouts access, called from an IP on the key's allowlist. */
|
|
183
185
|
balance: {
|
|
184
186
|
fetch(): Promise<Balance>;
|
|
185
187
|
};
|
|
186
188
|
|
|
189
|
+
/** Needs a live key with Payouts access, called from an IP on the key's allowlist. */
|
|
187
190
|
transactions: {
|
|
188
191
|
/** type: comma-separated names, e.g. "payout_lock,payout_debit" */
|
|
189
192
|
list(params?: ListParams & { type?: string }): Promise<Collection<Transaction>>;
|
package/package.json
CHANGED