PayNow

Modules

Module Placement in Template

To incorporate any module into your webstore template:

Text
{{ modules | raw }}

This placeholder auto-populates with modules you’ve configured in the module section.


Gift Card Balance Module

File Name: module.giftcard_balance.html
Directory: Root

Fields

NameTypeDescription
settings.headerstringHeader of the module
errorstringError text if something went wrong
giftCardgiftcard lookup objectGift card data object

Giftcard Lookup Object

NameTypeDescription
codestringCode of the gift card
balanceint64Current balance
starting_balanceint64Starting balance
expires_atstringExpiration date

Recent Payments Module

File Name: module.recent_payments.html
Directory: Root

Fields

NameTypeDescription
settings.headerstringHeader of the module
settings.displayLimitint64Number of payments to display
settings.displayFreePaymentsboolDisplay free payments
settings.displayTimeOfPurchaseboolDisplay time of payment
settings.displayPriceOfPurchaseboolDisplay price of purchase
settings.displayPurchasedProductboolDisplay purchased product details
ordersorder[]List of recent orders

Order Object

NameTypeDescription
total_amountnumberTotal amount of the order
completed_atstringCompletion date of the order
customercustomerCustomer who made the payment
linesline[]Order lines (if product display enabled)

Customer Object

NameTypeDescription
idflakeCustomer ID
steam.namestringSteam name
steam.avatar_urlstringSteam avatar URL
namestringCustomer name

Order Line Object

NameTypeDescription
product_idflakeProduct ID
product_namestringProduct name
product_image_urlstringProduct image URL
giftboolWas it a gift?
priceint64Price of the product
total_amountint64Total paid amount
quantityint64Quantity ordered

Text Box Module

File Name: module.text_box.html
Directory: Root

Fields

NameTypeDescription
settings.headerstringHeader of the module
contentstringHTML content of the box

Payment Goal Module

File Name: module.payment_goal.html
Directory: Root

Fields

NameTypeDescription
settings.headerstringHeader of the module
settings.periodstringTime period for the goal
settings.goalTargetint64Goal amount in store’s default currency
settings.displayAbsoluteGoalAmountbooleanDisplay the absolute goal amount
settings.allowPercentageOverflowbooleanAllow % to go above 100%
settings.animateGoalBarbooleanAnimate the progress bar
settings.barStylestringstriped or normal
revenuestringCurrent revenue value toward the goal

Top Customer Module

File Name: module.top_customers.html
Directory: Root

Fields

NameTypeDescription
settings.headerstringHeader of the module
settings.periodstringTime period used to calculate top customers
settings.fieldenumField to sort customers by
settings.limitint64Max number of customers to display
settings.displayCustomerSpendAmountboolShow spend amount per customer
customerscustomer[]List of top customers

Allowed Enum Values

  • total_spend_amount_gross
  • total_spend_amount_net
  • average_spend_amount_gross
  • average_spend_amount_net
  • total_payments

Top Customer Object

NameTypeDescription
idflakeCustomer ID
steam.namestringSteam name
steam.avatar_urlstringSteam avatar
namestringCustomer name
stats.total_spend_amount_grossint64Total gross spend amount
stats.total_spend_amount_netint64Total net spend amount
stats.average_spend_amount_grossint64Average gross spend
stats.average_spend_amount_netint64Average net spend
stats.total_paymentsint64Total number of payments

File Name: module.featured_product.html
Directory: Root

Fields

NameTypeDescription
settings.headerstringHeader of the module
productStorefrontProductDtoThe featured product object