Mode of the client, either "default" or "whitelabel".
Creates an instance of the Plisio client.
The Plisio API secret key used for authenticating requests.
The environment mode (e.g., "live" or "sandbox").
Sends a request to Plisio to create a new invoice.
The return type dynamically depends on whether the client is in "whitelabel" or "default" mode.
Fields required to create the invoice (amount, currency, order number, etc.)
A promise resolving to the invoice creation response.
Sends a request to Plisio to initiate a new withdrawal.
Fields required for the withdrawal, conforming to the WithdrawRequestFields type.
A promise resolving to the data object from the successful withdrawal response.
PlisioClient is a type-safe SDK wrapper for interacting with the Plisio crypto payment API.
It supports both
defaultandwhitelabelmodes, and dynamically adjusts the invoice response types based on the selected mode. Whitelabel mode includes additional customization fields in the API response.This class handles authentication, query string generation, and API request execution. It ensures that the correct response type is returned for each mode.
Version
0.1.0
Since
0.1.0
Example
Example