Skip to content

commercetools-stripe API

Everything the package exports, by the path you import it from. Open an export for its signature and options.

@evolve-framework/commercetools-stripe

StripePaymentAdapter and its options, configuration and client.

Classes

StripePaymentAdapterStripe as a commercetools payment provider, offering card, iDEAL, Bancontact, PayPal and Klarna as the active payment method configuration enables them.
import { StripePaymentAdapter } from "@evolve-framework/commercetools-stripe";

Extends BasePaymentAdapter

new StripePaymentAdapter(options: StripePaymentAdapterOptions)
OptionTypeDescription
clientFactoryClientFactory

Pre-configured commercetools ClientFactory, used to build a system request builder for commercetools reads/writes.

configStripeConfig

Stripe credentials and runtime settings used by the SDK and routes.

Functions

createStripeClient
import { createStripeClient } from "@evolve-framework/commercetools-stripe";
function createStripeClient(config: StripeConfig): Stripe
OptionTypeDescription
apiKeystring

Stripe secret API key (sk_*).

accountstring

Stripe connected account id used when issuing API calls.

webhookSecretstring

Endpoint signing secret (whsec_*) used to validate webhook signatures.

serverUrlstring

Externally reachable base URL of this service; used to build redirect URLs.

Returns Stripe

Types

MetaData
import { type MetaData } from "@evolve-framework/commercetools-stripe";
export type MetaData = {
targetId: string;
targetType: string;
paymentId: string;
paymentMethodArgs?: string;
};

@evolve-framework/commercetools-stripe/testing

An MSW server with the mocked commercetools project, for testing a service that uses the adapter.

Constants

mswServer
import { mswServer } from "@evolve-framework/commercetools-stripe/testing";
const mswServer: SetupServer

Not listed: 2 options types. They appear as the tables under the constructors and functions they type.