linkpay-api
Version:
LinkPay JS/TS API SDK
56 lines (55 loc) • 2.46 kB
TypeScript
import type { DeliveryAddress, PayerInfo, TradeInfo, TransAmount } from './base';
/**
* Request message for {@link LinkPayAPI.payment} API
*/
export declare class PaymentRequest {
/** Order information object */
merchantOrderInfo: MerchantOrderInfo;
/** Transaction amount object */
transAmount: TransAmount;
/** Trade information object */
tradeInfo?: TradeInfo;
/** Payer information object */
payerInfo?: PayerInfo;
/** Address object */
deliveryAddress?: DeliveryAddress;
/**
* The valid time of LinkPay order.The Payment Link will expire after 5~43200 minutes (maximum 30 days).The accepted value is 5 to 43200.The unit is minute.Omit: 60 minutes.
*/
validTime?: number;
/**
* The URL used for redirection after the payment is completed.
* For example: HTTPs://www.cardinfolink.com
* EVO Cloud will add the merchantOrderID and result of the payment after the URL.
* Currently the page will only get redirected after the order has been paid,
* so the result is fixed as success.For example: HTTPs://www.cardinfolink.com?merchantOrderID=123123123123&result=success
*/
returnUrl?: string;
/** The webhook URL provided by merchant host to receive the payment result notification after the order has been paid. */
webhook?: string;
}
export interface MerchantOrderInfo {
/**
* The unique order ID generated by the merchant for LinkPay.
* After the payment succeeds, the merchant can use this field to match the original
* LinkPay order in notification message or retrieve the LinkPay order.
* Alphabetic and numeric characters are accepted.
*/
merchantOrderID: string;
/**
* Time when the order is created, submitted by the merchant.
* Format: RFC3339. For example: 2006-01-02T15:04:05+07:00.
*/
merchantOrderTime: string;
/**
* To assign the enabled payment method displayed on the LinkPay
Payment Page.
Omit: Enable the payment method(s) setup on EVO Cloud Portal.
For example: ["Alipay","WeChat_Pay","VISA","UnionPay","Diners"]
All supported payment methods refer to the Appendix 9.1.
(Coming soon) The display order of payment methods will be
determined by the order of payment methods sent in this field.
*/
enabledPaymentMethod?: string[];
}
export default PaymentRequest;