Skip to main content

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

NameTypeDescription
optionsBaseOptionsThe options for configuring the Merchant instance.

Defined in

src/merchant/merchant.ts:29

Properties

request

Private request: HTTPRequest

HTTP Request

Defined in

src/merchant/merchant.ts:22

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

Fee Calculator - Tripay

Parameters

NameTypeDescription
amountnumberThe amount for which to calculate the fee.
code?PaymentMethodThe payment method code. Optional.

Returns

Promise<IFeeCalc[]>

Returns a promise that resolves to an array of IFeeCalc objects representing the calculated fees.

Defined in

src/merchant/merchant.ts:68


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

Payment Channels - Tripay

Parameters

NameTypeDescription
code?PaymentMethodOptional. The payment method code.

Returns

Promise<IPaymentChannel[]>

Returns a promise that resolves to an array of payment channels.

Defined in

src/merchant/merchant.ts:46


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

Transactions List

Parameters

NameTypeDescription
params?TransactionParamsOptional parameters for the transaction request.

Returns

Promise<ITransactions>

A promise that resolves to the transactions and pagination information.

Defined in

src/merchant/merchant.ts:93