bc-checkout-sdk
Version:
BetterCommerce's Checkout NodeJS SDK enables BC client applications to integrate with Checkout merchant API system. It publishes an interface to interact with [Checkout API](https://api-reference.checkout.com/#operation/getPaymentDetails/) endpoints.
32 lines (31 loc) • 1.13 kB
TypeScript
import { IPaymentRequest } from "../models/IPaymentRequest";
import { IPayment } from "../base/contracts/IPayment";
/**
* Class representing a payment.
*
* Provides methods to request a payment and retrieve the details of a payment.
*
* @class Payment
* @implements {IPayment}
*/
export declare class Payment implements IPayment {
/**
* Sends a payment request to the API.
* The amount is sanitized before sending.
*
* API Reference - https://api-reference.checkout.com/#operation/requestAPaymentOrPayout
*
* @param data {IPaymentRequest} - The payment request data.
* @returns A promise resolving to the payment request result or an error object.
*/
request(data: IPaymentRequest): Promise<any>;
/**
* Retrieves the details of a payment from the API.
*
* API Reference - https://api-reference.checkout.com/#operation/getPaymentDetails
*
* @param data {String} - The payment id.
* @returns A promise resolving to the payment details result or an error object.
*/
getDetails(data: any): Promise<any>;
}