Class: Merchant
The class contains methods to access the Merchant API on Tripay.
Constructors
constructor
• new Merchant(options)
Creates a new instance of the Merchant class.
Parameters
| Name | Type | Description |
|---|---|---|
options | BaseOptions | The options for configuring the Merchant instance. |
Defined in
Properties
request
• Private request: HTTPRequest
HTTP Request
Defined in
Methods
feeCalc
▸ feeCalc(amount, code?): Promise<IFeeCalc[]>
Getting the transaction fee calculation details for each channel based on the specified amount.
Throws
Throws an error if the code parameter is provided but is not a valid payment method.
See
Parameters
| Name | Type | Description |
|---|---|---|
amount | number | The amount for which to calculate the fee. |
code? | PaymentMethod | The payment method code. Optional. |
Returns
Promise<IFeeCalc[]>
Returns a promise that resolves to an array of IFeeCalc objects representing the calculated fees.
Defined in
paymentChannel
▸ paymentChannel(code?): Promise<IPaymentChannel[]>
Obtaining a list of active payment channels on your Merchant account, including complete information including transaction fees for each channel.
Throws
Throws an error if the code parameter is incorrect.
See
Parameters
| Name | Type | Description |
|---|---|---|
code? | PaymentMethod | Optional. The payment method code. |
Returns
Promise<IPaymentChannel[]>
Returns a promise that resolves to an array of payment channels.
Defined in
transactions
▸ transactions(params?): Promise<ITransactions>
To obtain a list of merchant transactions.
Throws
Throws an error if the method parameter is provided but is not a valid payment method.
See
Parameters
| Name | Type | Description |
|---|---|---|
params? | TransactionParams | Optional parameters for the transaction request. |
Returns
Promise<ITransactions>
A promise that resolves to the transactions and pagination information.