Broadleaf Microservices
  • v1.0.0-latest-prod

Stripe Payment Services API Client

Client used for interacting with the Stripe payment service related APIs.

createSetupIntent

Create the SetupIntent to save a customer’s card without an initial payment. If the Stripe customer is not specified, the new one will be created.

Parameters

Parameter Type Required? Description

request

SetupIntentRequest

✅

The request to create the SetupIntent

options

ClientOptions

❌

The options to the HTTP call

Response

The created SetupIntent.

Example

import { StripePaymentServicesClient } from '@broadleaf/stripe-payment-services-api';
import { ClientOptions } from '@broadleaf/commerce-core';

const options: ClientOptions = {
  applicationToken,
  baseHost,
  locale: currentLocale,
  preview,
};
const client = new StripePaymentServicesClient(options);
const setupIntentResponse = await client.createSetupIntent(setupIntentRequest);