Webstore Modules

Webstore Modules allow you to embed dynamic components to your webstore hosted by PayNow. You can use it to display recent orders, allow customers to check their gift card balance, show top customers, and more.


Module Placement in Template

To incorporate any of the modules into your webstore, insert the {{ modules | raw }} variable into the desired location within your template layout file. This variable acts as a placeholder, automatically populating with the modules you've added from the module section.


Gift Card Balance module

  • Fields

  • Name
    settings.header
    Type
    string
    Tags
    Description

    header of the module

  • Name
    error
    Type
    string
    Tags
    Description

    error text if something went wrong (i.e. giftcard not found)

  • Name
    giftCard
    Type
    giftcard lookup object
    Tags
    Description

    header of the module

Giftcard Lookup Object

  • Fields

  • Name
    code
    Type
    string
    Tags
    Description

    code of the giftcard

  • Name
    balance
    Type
    int64
    Tags
    Description

    current balance of giftcard

  • Name
    starting_balance
    Type
    int64
    Tags
    Description

    starting balance of giftcard

  • Name
    expires_at
    Type
    string
    Tags
    Description

    expiration date of giftcard

HTML file must be named module.giftcard_balance.html. Also must be in root directory.

Recent Payments module

  • Fields

  • Name
    settings.header
    Type
    string
    Tags
    Description

    header of the module

  • Name
    settings.displayLimit
    Type
    int64
    Tags
    Description

    how many payments to show

  • Name
    settings.displayFreePayments
    Type
    bool
    Tags
    Description

    should display free payments

  • Name
    settings.displayTimeOfPurchase
    Type
    bool
    Tags
    Description

    should display time of payment

  • Name
    settings.displayPriceOfPurchase
    Type
    bool
    Tags
    Description

    should display price of purchase

  • Name
    settings.displayPurchasedProduct
    Type
    bool
    Tags
    Description

    should display purchased product

  • Name
    orders
    Type
    order[]
    Tags
    Description

    list of recent orders

Order Object

  • Fields

  • Name
    total_amount
    Type
    number
    Tags
    Description

    the total amount of the order

  • Name
    completed_at
    Type
    string
    Tags
    Description

    completion date of order

  • Name
    customer
    Type
    customer
    Tags
    Description

    customer that made the payment

  • Name
    lines
    Type
    line[]
    Tags
    Description

    array of order lines if settings.displayPurchasedProduct is enabled

Customer Object

  • Fields

  • Name
    id
    Type
    flake
    Tags
    Description

    ID of the customer

  • Name
    steam.name
    Type
    string
    Tags
    Description

    steam name of the customer

  • Name
    steam.avatar_url
    Type
    string
    Tags
    Description

    steam avatar of the customer

  • Name
    name
    Type
    string
    Tags
    Description

    name of the customer

Order Line Object

  • Fields

  • Name
    product_id
    Type
    flake
    Tags
    Description

    ID of the product

  • Name
    product_name
    Type
    string
    Tags
    Description

    name of the product

  • Name
    product_image_url
    Type
    string
    Tags
    Description

    image of the product

  • Name
    gift
    Type
    bool
    Tags
    Description

    was the order a gift

  • Name
    price
    Type
    int64
    Tags
    Description

    the price of the product

  • Name
    total_amount
    Type
    int64
    Tags
    Description

    the total paid amount

  • Name
    quantity
    Type
    int64
    Tags
    Description

    quantity

HTML file must be named module.recent_payments.html. Also must be in root directory.

Text Box module

  • Fields

  • Name
    settings.header
    Type
    string
    Tags
    Description

    header of the module

  • Name
    content
    Type
    string
    Tags
    Description

    the HTML content of the text box

HTML file must be named module.text_box.html. Also must be in root directory.

Payment Goal module

  • Fields

  • Name
    settings.header
    Type
    string
    Tags
    Description

    header of the module

  • Name
    settings.period
    Type
    string
    Tags
    Description

    the period for which the goal is set

  • Name
    settings.goalTarget
    Type
    int64
    Tags
    Description

    the goal target in the store's default currency

  • Name
    settings.displayAbsoluteGoalAmount
    Type
    boolean
    Tags
    Description

    should the absolute goal amount be displayed?

  • Name
    settings.allowPercentageOverflow
    Type
    boolean
    Tags
    Description

    should the % go above 100%

  • Name
    settings.animateGoalBar
    Type
    boolean
    Tags
    Description

    should the bar be animated

  • Name
    settings.barStyle
    Type
    string
    Tags
    Description

    striped or normal

  • Name
    revenue
    Type
    string
    Tags
    Description

    the current value of the payment goal

HTML file must be named module.payment_goal.html. Also must be in root directory.

Top Customer module

  • Fields

  • Name
    settings.header
    Type
    string
    Tags
    Description

    header of the module

  • Name
    settings.period
    Type
    string
    Tags
    Description

    the period for which the top customers are calculated

  • Name
    settings.field
    Type
    enum
    Tags
    Description

    the field to sort the customers by

    Allowed enum values
    total_spend_amount_gross
    total_spend_amount_net
    average_spend_amount_gross
    average_spend_amount_net
    total_payments
  • Name
    settings.limit
    Type
    int64
    Tags
    Description

    the total returned top customers

  • Name
    settings.displayCustomerSpendAmount
    Type
    bool
    Tags
    Description

    should the customer's spend amount be displayed?

  • Name
    customers
    Type
    customers[]
    Tags
    Description

    the top customers

Top Customer Object

  • Fields

  • Name
    id
    Type
    flake
    Tags
    Description

    ID of the customer

  • Name
    steam.name
    Type
    string
    Tags
    Description

    steam name of the customer

  • Name
    steam.avatar_url
    Type
    string
    Tags
    Description

    steam avatar of the customer

  • Name
    name
    Type
    string
    Tags
    Description

    name of the customer

  • Name
    stats.total_spend_amount_gross
    Type
    int64
    Tags
    Description

    total gross spend amount

  • Name
    stats.total_spend_amount_net
    Type
    int64
    Tags
    Description

    total net spend amount

  • Name
    stats.average_spend_amount_gross
    Type
    int64
    Tags
    Description

    average gross spend amount

  • Name
    stats.average_spend_amount_net
    Type
    int64
    Tags
    Description

    average net spend amount

  • Name
    stats.total_payments
    Type
    int64
    Tags
    Description

    total payment count

HTML file must be named module.top_customer.html. Also must be in root directory.