@bates-solutions/stripe API Reference - v2.2.1
    Preparing search index...

    Function resolveId

    • Resolve a Stripe reference that may be either an ID string or an expanded object, to its ID.

      Stripe fields like customer / subscription / product are a bare ID string unless expanded, in which case they are the full object. This collapses both forms.

      Parameters

      • value: string | { id?: string } | null | undefined

      Returns string | undefined

      resolveId('cus_1');          // 'cus_1'
      resolveId({ id: 'cus_1' }); // 'cus_1'
      resolveId(null); // undefined