Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • CustomerAdapter

Index

Methods

  • fetchPaymentMethods(): Promise<object[]>
  • attachPaymentMethod(paymentMethodId: string): Promise<object>
  • Adds a Payment Method to a customer. If you are implementing your own CustomerAdapter: On your backend, retrieve the Stripe customer associated with your logged-in user. Then, call the Attach method on the Payment Method with that customer's ID ( https://stripe.com/docs/api/payment_methods/attach ).

    • Parameters:
      • paymentMethod: A valid Stripe Payment Method ID Return the payment method in JSON format.

    Parameters

    • paymentMethodId: string

    Returns Promise<object>

  • detachPaymentMethod(paymentMethodId: String): Promise<object>
  • Deletes the given Payment Method from the customer. If you are implementing your own CustomerAdapter: Call the Detach method ( https://stripe.com/docs/api/payment_methods/detach ) on the Payment Method.

    • Parameters:
      • paymentMethod: The Stripe Payment Method ID to delete from the customer Return the payment method in JSON format.

    Parameters

    • paymentMethodId: String

    Returns Promise<object>

  • setSelectedPaymentOption(paymentOption: null | string): Promise<void>
  • Set the last selected payment method for the customer. To unset the default payment method, null is passed as the paymentOption. If you are implementing your own CustomerAdapter: Save a representation of the passed paymentOption as the customer's default payment method.

    Parameters

    • paymentOption: null | string

    Returns Promise<void>

  • fetchSelectedPaymentOption(): Promise<null | string>
  • Retrieve the last selected payment method for the customer. If you are implementing your own CustomerAdapter: Return a CustomerPaymentOption for the customer's default selected payment method. If no default payment method is selected, return null.

    Returns Promise<null | string>

  • setupIntentClientSecretForCustomerAttach(): Promise<String>
  • Creates a SetupIntent configured to attach a new payment method to a customer, then returns the client secret for the created SetupIntent.

    Returns Promise<String>

Generated using TypeDoc