UNPKG

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.

33 lines (32 loc) 1.32 kB
import { IPaymentContext } from "../base/contracts/IPaymentContext"; /** * Class representing a payment context. * * A payment context is a request to the Checkout.com API to perform a payment. * The request includes the payment details and the processing channel id. * * @class PaymentContext * @implements {IPaymentContext} */ export declare class PaymentContext implements IPaymentContext { /** * Sends a payment context request. * * API Reference - https://api-reference.checkout.com/#tag/Payment-Context * * @param data - The payment context data to be sent in the request. * @returns A promise that resolves with the response of the payment context request. * If the request fails, the promise resolves with an error object. */ request(data: any): Promise<any>; /** * Gets the payment context details. * * API Reference - https://api-reference.checkout.com/#operation/getPaymentContext * * @param data - The payment context id to be used in the request. * @returns A promise that resolves with the response of the payment context details request. * If the request fails, the promise resolves with an error object. */ getDetails(data: any): Promise<any>; }