Function create

  • Creates a new PayableRecord object.

    Note: This method requires an existing LicenseRecord. Use create first.

    The expiry parameter sets the expiration date of the PayableRecord. If the payable never expires, leave this parameter as undefined.

    Parameters

    • licenseId: string

      The identifier for the corresponding license record

    • amount: string

      The total amount. Can be a simple numeric value, or an atypical value such as downloadable content.

    • type: string

      Describes the type of payment (e.g. loyalty-point, cash, coupon, etc.)

    • Optional description: string

      A short, human-readable description of the TitleRecord as a future reminder. This parameter is used only if a TitleRecord does not already exist for the provided ptr.

    • Optional expiry: Date

      The expiration date of the LicenseRecord. If the license never expires, leave this parameter as undefined.

    • Optional reference: string

      A customer-specific reference identifier

    Returns Promise<PayableRecord>