UNPKG

bc-clearpay-sdk

Version:

BetterCommerce's ClearPay NodeJS SDK enables BC client applications to integrate with ClearPay merchant API system. It publishes an interface to interact with [ClearPay API v2](https://developers.clearpay.co.uk/clearpay-online/reference) endpoints.

16 lines (15 loc) 662 B
/** * Class {Api} is the entry point for making requests to the ClearPay API. * This class provides a convenient interface for making API calls. */ export declare class Api { /** * Make a request to the ClearPay API. * @param url The endpoint to call. * @param method The HTTP method to use. * @param params If the method is GET, these are the query parameters. If the method is POST, these are the request body. * @param cookies Cookies to send with the request. * @returns The response from the ClearPay API. */ static call(url: string, method: string, params?: any, cookies?: any): Promise<any>; }