bc-payments-sdk
Version:
BetterCommerce's Payments NodeJS SDK is a complete solution for storefront clients that integrate payments. `bc-payments-sdk` is a single point interface for storefront clients for interacting with payment gateways.
26 lines (25 loc) • 1.32 kB
TypeScript
/**
* Class {Checkout} contains methods that can be used to interact with the Checkout
* module on the CommerceHub platform.
*
* The methods in this class can be used to convert a basket into an order,
* update the payment response for a given order, and more.
*/
export declare class Checkout {
/**
* Converts a basket into an order on the CommerceHub platform.
* API Reference - https://api20.bettercommerce.io/swagger/ui/index#!/Checkout/CheckoutConvertBasket
* @param data - The data which contains the basket id
* @param {Object} options - The options object that contains headers and cookies
* @returns The order details response from the CommerceHub platform
*/
static convertOrder(data: any, { headers, cookies }: any): Promise<any>;
/**
* Updates the payment response in the database based on the payment response data.
* API Reference - https://api20.bettercommerce.io/swagger/ui/index#!/Checkout/CheckoutUpdatePaymentResponse
* @param data - The data which contains the payment response data
* @param {Object} options - The options object that contains headers and cookies
* @returns The payment response result from the CommerceHub platform
*/
static updatePaymentResponse(data: any, { headers, cookies }: any): Promise<any>;
}