@monei-js/node-sdk
Version:
Node.js SDK for MONEI Digital Payment Gateway
79 lines (78 loc) • 6.97 kB
TypeScript
/**
* MONEI API v1
* The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code.
*
* The version of the OpenAPI document: 1.7.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from '../axios';
import { type RequestArgs, BaseAPI } from '../base';
import type { PaymentMethods } from '../model';
/**
* PaymentMethodsApi - axios parameter creator
* @export
*/
export declare const PaymentMethodsApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* Retrieve available payment methods for an account or a specific payment. You can provide either an `accountId` or a `paymentId` as a query parameter to get the available payment methods. When providing a `paymentId`, the response will include additional payment-specific information such as amount and currency. This is useful when you want to show payment options that are specifically available for a particular transaction. When providing an `accountId`, the response will include all payment methods available for that account based on the merchant\'s configuration and supported payment methods.
* @summary Get Payment Methods
* @param {string} [accountId] The ID of the account to get payment methods for
* @param {string} [paymentId] The ID of the payment to get payment methods for
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
get: (accountId?: string, paymentId?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* PaymentMethodsApi - functional programming interface
* @export
*/
export declare const PaymentMethodsApiFp: (configuration?: Configuration) => {
/**
* Retrieve available payment methods for an account or a specific payment. You can provide either an `accountId` or a `paymentId` as a query parameter to get the available payment methods. When providing a `paymentId`, the response will include additional payment-specific information such as amount and currency. This is useful when you want to show payment options that are specifically available for a particular transaction. When providing an `accountId`, the response will include all payment methods available for that account based on the merchant\'s configuration and supported payment methods.
* @summary Get Payment Methods
* @param {string} [accountId] The ID of the account to get payment methods for
* @param {string} [paymentId] The ID of the payment to get payment methods for
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
get(accountId?: string, paymentId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaymentMethods>>;
};
/**
* PaymentMethodsApi - factory interface
* @export
*/
export declare const PaymentMethodsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* Retrieve available payment methods for an account or a specific payment. You can provide either an `accountId` or a `paymentId` as a query parameter to get the available payment methods. When providing a `paymentId`, the response will include additional payment-specific information such as amount and currency. This is useful when you want to show payment options that are specifically available for a particular transaction. When providing an `accountId`, the response will include all payment methods available for that account based on the merchant\'s configuration and supported payment methods.
* @summary Get Payment Methods
* @param {string} [accountId] The ID of the account to get payment methods for
* @param {string} [paymentId] The ID of the payment to get payment methods for
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
get(accountId?: string, paymentId?: string, options?: RawAxiosRequestConfig): AxiosPromise<PaymentMethods>;
};
/**
* PaymentMethodsApi - object-oriented interface
* @export
* @class PaymentMethodsApi
* @extends {BaseAPI}
*/
export declare class PaymentMethodsApi extends BaseAPI {
/**
* Retrieve available payment methods for an account or a specific payment. You can provide either an `accountId` or a `paymentId` as a query parameter to get the available payment methods. When providing a `paymentId`, the response will include additional payment-specific information such as amount and currency. This is useful when you want to show payment options that are specifically available for a particular transaction. When providing an `accountId`, the response will include all payment methods available for that account based on the merchant\'s configuration and supported payment methods.
* @summary Get Payment Methods
* @param {string} [accountId] The ID of the account to get payment methods for
* @param {string} [paymentId] The ID of the payment to get payment methods for
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PaymentMethodsApi
*/
get(accountId?: string, paymentId?: string, options?: RawAxiosRequestConfig): Promise<PaymentMethods>;
}