API reference

All functionality is exposed via a Givecloud instance attached to the window object.


Here's a simple example where subscribe to changes to the authenticated account. This lets update DOM whenever a change is registered.

// Update the DOM when changes are made to the account
Givecloud.Account.subscribe(function(account) {
    let accountName = document.getElementById('nav-account-name');
    if (accountName) {
        accountName.innerHTML = `Hi, <strong>${account.display_name}</strong>`;
    } else {
        accountName.innerHTML = '';

Liquid objects

Throughout the API reference docs Liquid objects are referenced as follows

  1. Prefixed with an L
  2. The name of the Liquid object in pascal case.

So for example, the payment_method Liquid object would be referenced as LPaymentMethod.