0.2.1 • Published 6 months ago

@kohortpay/sdk v0.2.1

Weekly downloads
-
License
-
Repository
github
Last release
6 months ago

kohortPay/sdk

🏗 Welcome to your new SDK! 🏗

It has been generated successfully based on your OpenAPI spec. However, it is not yet ready for production use. Here are some next steps:

SDK Installation

NPM

npm add @kohortpay/sdk

Yarn

yarn add @kohortpay/sdk

SDK Example Usage

import { KohortPay } from "@kohortpay/sdk";
import { CheckoutSessionsControllerCreateSecurity } from "@kohortpay/sdk/dist/sdk/models/operations";

(async () => {
    const sdk = new KohortPay();
    const operationSecurity: CheckoutSessionsControllerCreateSecurity = {
        basic: {
            password: "",
            username: "",
        },
    };

    const res = await sdk.checkoutSessionsAPI.checkoutSessionsControllerCreate(
        {
            cancelUrl: "https://cancel.example.com",
            customerEmail: "customer@example.com",
            customerFirstName: "John",
            customerId: "user_xxxxxxxxxxxxxxxx",
            customerLastName: "Doe",
            expiresAt: new Date("2023-10-02T14:30:00.000Z"),
            lineItems: [
                {
                    description: "Item Description",
                    imageUrl: "https://example.com/image.jpg",
                    name: "Item Name",
                    price: 100,
                    quantity: 1,
                },
            ],
            metadata: {},
            successUrl: "https://success.example.com",
        },
        operationSecurity
    );

    if (res.statusCode == 200) {
        // handle response
    }
})();

Available Resources and Operations

checkoutSessionsAPI

organizations

paymentGroups

paymentGroupSettingsAPI

paymentIntents

Development

Maturity

This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.

Contributions

While we value open-source contributions to this SDK, this library is generated programmatically. Feel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release!

SDK Created by Speakeasy

0.2.1

6 months ago

0.2.0

6 months ago