Skip to main content
Docs

CommercePaymentSourceResource

The CommercePaymentSourceResource type represents a payment source for a checkout session.

Properties

  • Name
    id
    Type
    string
    Description

    The unique identifier for the payment method.

  • Name
    last4
    Type
    string
    Description

    The last four digits of the payment method.

  • Name
    paymentMethod
    Type
    string
    Description

    The type of payment method. For example, 'card' or 'bank_account'.

  • Name
    cardType
    Type
    string
    Description

    The brand or type of card. For example, 'visa' or 'mastercard'.

  • Name
    isDefault
    Type
    boolean
    Description

    A boolean that indicates if this payment method is set as the default for the account.

  • Name
    isRemovable
    Type
    boolean
    Description

    A boolean that indicates if the payment method can be removed by the user.

  • Name
    status
    Type
    'active' | 'expired' | 'disconnected'
    Description

    The current status of the payment method.

  • Name
    walletType
    Type
    string | undefined
    Description

    The type of digital wallet, if applicable. For example, 'apple_pay', or 'google_pay'.

  • Name
    remove()
    Type
    (params?: RemovePaymentSourceParams) => Promise<DeletedObjectResource>
    Description

    A function that removes this payment source from the account. Accepts the following parameters:

    • orgId? (string): The ID of the organization to remove the payment source from.
  • Name
    makeDefault()
    Type
    (params?: MakeDefaultPaymentSourceParams) => Promise<null>
    Description

    A function that sets this payment source as the default for the account. Accepts the following parameters:

    • orgId? (string): The ID of the organization to set as the default.

Feedback

What did you think of this content?

Last updated on