跳到內容

Interface: LinePayConfig ​

Defined in: src/config.ts:32

Properties ​

baseUrl? ​

ts
baseUrl?: string;

Defined in: src/config.ts:53

Replaces the host that env selects, for example to go through a proxy with a fixed IP address. It must use https, except for localhost.


channelId ​

ts
channelId: string;

Defined in: src/config.ts:34

The channel ID of the merchant (Merchant Center, "Manage link key").


channelSecretKey ​

ts
channelSecretKey: string;

Defined in: src/config.ts:36

The channel secret key. Keep it on the server.


env ​

ts
env: LinePayEnv;

Defined in: src/config.ts:38

sandbox for testing, production for real payments.


fetch? ​

ts
fetch?: (input, init?) => Promise<Response>;

Defined in: src/config.ts:48

Replaces the global fetch: for a proxy, a fixed IP address, or tests.

Parameters ​

input ​

string | URL | Request

init? ​

RequestInit

Returns ​

Promise<Response>


merchantDeviceProfileId? ​

ts
merchantDeviceProfileId?: string;

Defined in: src/config.ts:58

Sent as X-LINE-MerchantDeviceProfileId. Give it together with merchantDeviceType: one without the other is refused.


merchantDeviceType? ​

ts
merchantDeviceType?: string;

Defined in: src/config.ts:63

Sent as X-LINE-MerchantDeviceType. Give it together with merchantDeviceProfileId: one without the other is refused.


middleware? ​

ts
middleware?: readonly Middleware[];

Defined in: src/config.ts:68

Middleware of the client, outermost first. The default is [retryWhenNotSent()]; pass [] for none.


timeout? ​

ts
timeout?: number;

Defined in: src/config.ts:44

Time limit of one attempt in milliseconds. It applies to every operation without a more specific setting. Order of precedence: the timeout of the call, timeouts[operation], timeout, the default of the operation.


timeouts? ​

ts
timeouts?: Partial<Record<
  | "request"
  | "confirm"
  | "capture"
  | "void"
  | "refund"
  | "paymentDetails"
  | "checkPaymentStatus"
  | "checkRegKey"
  | "payPreapproved"
| "expireRegKey", number>>;

Defined in: src/config.ts:46

Time limits per operation.


validate? ​

ts
validate?: boolean;

Defined in: src/config.ts:74

Check the input before sending it, including that amounts add up. true by default. The checks of path parameters (transactionId, regKey) cannot be turned off.

Released under the MIT License. An independent library, not made or endorsed by LINE Pay.