---
updatedAt: 2025-06-15T23:31:24.000Z
agentTools:
  projectIndex: https://docs.wizit.money/llms.txt
---

# Salesforce Commerce Cloud

Wizit LINK Integration SFRA (Storefront Reference Architecture)

## Summary

This implementation guide describes how to integrate Wizit Payment Processor (int\_Wizit\_sfra) into Salesforce Commerce Cloud (SFCC) reference application SFRA version 6.2.0.

This cartridge provides the ability to use Wizit as a Payment Method during the checkout of the SFCC storefront.

#### 1. Wizit

<ul>
  <li>Wizit is a service that offers an order to be paid in 4 fixed instalments at a fixed frequency of 2 weeks each.</li>
  <li>The Wizit – Salesforce cartridge enables Wizit to be offered as a Payment Method.<br />
  i.     This cartridge displays the Wizit ‘Payment Breakdown’ on the Product, Cart and Checkout Pages.<br />
  ii.     This cartridge enables the Consumers to select Wizit as a Payment method on the Checkout page.</li>
  <li>This is only available in Australia region.</li>
  <li>Purchases are split into 25% increments, and this cannot be adjusted.</li>
  <li>Repayment is made every 2 weeks, and this cannot be adjusted.</li>
  <li>Repayments are made via a Credit or Debit Card (Visa and Mastercard are accepted).</li>
  <li>Merchant refunds will always apply any amount to the last ‘repayment’ to the first.<br />
  i.     In a scenario where $100 has been purchased, and the 1st instalment of $25 has been paid; but a ‘full’ refund is requested.<br />
  ii.     A refund of $100 is requested via the Wizit Merchant Portal<br />
  iii.     $75 is nullified (the 4th, 3rd, 2nd instalments) as they have not yet been paid.<br />
  iv.     $25 (1st instalment) is refunded back to the consumer</li>
</ul>

#### 2. Regionality

<ul>
  <li>The Wizit Cartridge can be used for purchases from Australia only (assuming relevant commercial agreements are in place).  <br />
  i.	Consumer Orders can be delivered to addresses in Australia.  <br />
  ii.	AUD is the only currency serviced by Wizit, transactions made in other currencies are not valid.</li>
</ul>

#### 3. Transactions / Refunds / Settlements Information

<ul>
  <li>Wizit has a ‘Merchant’ Portal, in which Merchants can access their transactions, organise refunds or review settlement information.</li>
</ul>

## Component Overview

<b>1. Functional Overview</b>

Wizit provides a payment processing gateway. Wizit’s payment gateway connects your storefront to process transactions that allow customers to purchase products.

<b>2. Use Cases</b>

Allows checkout using Wizit payment method.\
Allows refund using SFCC Business Manager Module.

<b>3. Limitations, Constraints</b>

This integration is only for SFRA.

The following Wizit APIs are supported.

<ol>
  <li>Get purchase limit</li>
  <li>Get payment token</li>
  <li>Order transaction status</li>
  <li>Order transaction capture</li>
  <li>Create refund</li>
</ol>

<b>4. Compatibility</b>

Compatibility mode version that was tested against is 22.7.

<b>5. Privacy, Payment</b>

This integration requires access to the following customer data elements: Billing Address, Shipping Address, Order Details and Customer Profile details.

No credit card details are stored within SFCC using this integration.\
Token returned from the Wizit token service is saved in the Order section of the SFCC.

## Integration Guide

Below are the steps to integrate the cartridge.

<b>1. Download cartridge</b>

The cartridge can be downloaded from `<https://wizit.money/plugin/sfc/link_wizit_sfra.zip>`

<b>2. Activating the Cartridges in Business Manager</b>

Before the Wizit functionality can become available to SFRA, the cartridge names have to be added to the cartridge path of the Site’s settings. In order to do this, follow the below instructions:

<ol>
  <li>Log into Business Manager</li>
  <li>Navigate to <b>Administration</b> > <b>Sites</b> > <b>Manage Sites</b>.</li>
  <li>Click on the target site name and Click on <b>Settings</b> tab.</li>
  <li>In the Cartridges prepend the cartridge name <b>int\_wizit\_sfra:int\_wizit\_core</b></li>

![](https://files.readme.io/bbeefc4-image007.png)

  <li>Navigate to <b>Administration</b> > <b>Sites</b> > <b>Business Manager</b> and then Prepend bm\_wizit:int\_wizit\_sfra:int\_wizit\_core in the site path</li>

![](https://files.readme.io/ffdf763-image009.png)

  <li>Activate Business manager cartridge
  Go to <b>Administration</b> > <b>Organization</b> > <b>Roles</b> > <b>Administrator - Business Manager Modules</b></li>

  <li>Select your site for which this module needs to be activated</li>

  <li>Select <b>wizit</b> and click update</li>

![](https://files.readme.io/be94ec0-image012.png)

</ol>

<b>3. Code changes in javascript</b>

This chapter will describe how to update frontend JavaScript code for SFRA.\
Add this code in <b>\cartridge\client\default\js\cart\cart.js</b>

```javascript
function updateWizitMsg(grandTotal){
    var amount = grandTotal.match(/\d/g).join('') / 100;
    var currencySymbol = grandTotal.match(/[^\d,]/g).join('');
    var installmentAmount = currencySymbol + (amount/4).toFixed(2);
    var wizitMsg = $('.wizitMsg').html('4 x interest free fortnightly instalments totalling ' + installmentAmount + ' ');
}

function showHideWizitMsg(grandTotal) {
    var basketAmount = Number(grandTotal.replace(/[^0-9.-]+/g,""));
    if($('.wizit-product-details').length && basketAmount >= Number($('.wizitMinAmount').val()) &&
    basketAmount <= Number($('.wizitMaxAmount').val())) {
        $('.wizit-product-details').removeClass('d-none');
        updateWizitMsg(grandTotal);
    } else {
        $('.wizit-product-details').addClass('d-none');
    }
}

```

Then call this code from UpdateCartTotals method with cart.js

```javascript
showHideWizitMsg(data.totals.grandTotal);
```

<b>Here is the example screenshot</b>

![](https://files.readme.io/610bbf7-image014.png)

Next open \cartridge\client\default\js\checkout\billing.js and introduce a 'if' check in it for wizit payment method to show on checkout. Add this code before 'if' condition and put the existing 'if' condition in ‘else if’

```javascript
if (order.billing.payment && order.billing.payment.selectedPaymentInstruments
        && order.billing.payment.selectedPaymentInstruments.length > 0 &&  order.billing.payment.selectedPaymentInstruments[0].paymentMethod.toLowerCase() == 'wizit') {
        htmlToAppend += '<span>' + ' '
            + order.billing.payment.selectedPaymentInstruments[0].paymentMethod
            + '</span>';
} else 

```

<b>Here is the example screenshot</b>

![](https://files.readme.io/c8d1770-image016.png)

Now go to <b>\cartridge\client\default\js\checkout\billing.js</b> and add this code

```javascript
if(data.product.wizitHtml.length) {
  $(".wizit-product-details").html(data.product.wizitHtml)
}

```

<b>Here is the example screenshot</b>

![](https://files.readme.io/a19e902-image018.png)

<b>4. Importing Metadata</b>

For the Wizit integration to work, the following object structures (metadata) needs to be imported and configured in the Business Manager.

<ol>
  <li><b>System Objects</b><br />
  Navigate to <b>Administration</b> > <b>Site Development</b> > <b>Import & Export</b>.<br />
  Upload the <b>systemobject.xml</b> and then import.</li>

  <li><b>Job</b><br />
  Navigate to <b>Administration</b> > <b>Operations</b> > <b>Import & Export</b>.<br />
  Upload the <b>job.xml</b> file and then import in the Jobs.</li>

  <li><b>Services</b><br />
  Navigate to <b>Administration</b> > <b>Operations</b> > <b>Import & Export</b>.<br />
  Upload the <b>job.xml</b> file and then import in the Services.</li>

Navigate to <b>Administration</b> > <b>Operations</b> > <b>Services</b> > <b>Credentials</b>.<br />

Check if the two endpoints has been installed.

  <Image align="center" src="https://files.readme.io/5f142f7-service_two_endpoints.jpg" />

  <li><b>Custom Object</b><br />
  Navigate to <b>Administration</b> > <b>Site Development</b> > <b>Import & Export</b>.<br />
  Upload the file <b>customobject.xml</b> and then import.</li>

  <li><b>Payment Method</b><br />
  Navigate to <b>Merchant Tools</b> > <b>Ordering</b> > <b>Import & Export</b>.<br />
  Upload the file <b>paymentmethod.xml</b> and then import into the Payment Methods Section.</li>

  <li><b>Payment Processor</b><br />
  Navigate to <b>Merchant Tools</b> > <b>Ordering</b> > <b>Payment Processors</b>.<br />
  Create the payment processor <b>WIZIT\_CREDIT</b>.</li>
</ol>

<b>5. Setting Wizit Custom Site Preferences</b>

In Business Manager, navigate to the <b>Site</b> > <b>Site Preferences</b> > <b>Custom Preferences</b>. A custom site preference group with the ID **wizit** is available. Please select it and edit the attributes according to your Wizit account data and the data shown below.

<Image align="center" src="https://files.readme.io/6a3272f-customise_endpoint_settings1.jpg" />

<Image align="center" src="https://files.readme.io/b97c284-customise_endpoint_settings2.jpg" />

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th>
        Site Preference
      </th>

      <th>
        Description
      </th>

      <th>
        Values
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        1. Instance Type
      </td>

      <td>
        Select Environment Production for Production API environment/ Sandbox for sandbox API environment
      </td>

      <td>
        Production/Sandbox
      </td>
    </tr>

    <tr>
      <td>
        2. Enable Wizit
      </td>

      <td>
        To enable wizit cartridge in checkout
      </td>

      <td>
        Yes/No
      </td>
    </tr>

    <tr>
      <td>
        3. API Key
      </td>

      <td>
        API Key will be used in wizit service calls. API key for staging and production are different.
      </td>

      <td>

      </td>
    </tr>

    <tr>
      <td>
        4. Wizit Minimum Payment Amount
      </td>

      <td>
        Minimum amount set by the merchandiser to use to order on their site. This way the min max storefront wizit purchase option will be show/hide.
      </td>

      <td>

      </td>
    </tr>

    <tr>
      <td>
        5. Wizit Maximum Payment Amount
      </td>

      <td>
        Max amount set by the merchandiser to use to order on their site. This way the min max storefront wizit purchase option will be show/hide.
      </td>

      <td>

      </td>
    </tr>

    <tr>
      <td>
        6. Enable Wizit on PDP
      </td>

      <td>
        Enable wizit on product detail page
      </td>

      <td>

      </td>
    </tr>

    <tr>
      <td>
        7. Enable Wizit on Cart
      </td>

      <td>
        Enable wizit on cart
      </td>

      <td>

      </td>
    </tr>

    <tr>
      <td>
        8. Wizit API Mode Production
      </td>

      <td>
        API Mode Production for Wizit
      </td>

      <td>
        Yes / No
      </td>
    </tr>

    <tr>
      <td>
        9. Success URL
      </td>

      <td>
        Call back url, on which user will land after successful transaction.
      </td>

      <td>
        Order-WizitConfirm
      </td>
    </tr>

    <tr>
      <td>
        10. Failure URL
      </td>

      <td>
        Call back url on which user will land after failure transaction
      </td>

      <td>
        Checkout-Begin
      </td>
    </tr>

    <tr>
      <td>
        11. Wizit Learn More URL
      </td>

      <td>
        `<https://info.wizit.money/HowItWorks/HowItWorks.html>`
      </td>

      <td>

      </td>
    </tr>
  </tbody>
</Table>

<b>6. Setting Wizit Payment Method</b>

Confirm that a payment method with the name **WIZIT** is available that was imported.

<b>7. Setting Wizit Payment Processors</b>

Confirm that a payment processor with the name **WIZIT\_CREDIT** is available that was imported.

<b>8. Setting SFCC Service</b>

<ol>
  <li>Wizit.http.defaultendpoint</li>

  <Image align="center" src="https://files.readme.io/661fcdd-default_endpoint.jpg" />

  <li>Profile: Wizit.Http</li>

![](https://files.readme.io/9aa7418-image023.png)

  <li>Credentials:</li>

There are two credentials are available for the Wizit services.\
**wizit.http.credentials.sandbox**\
**wizit.http.credentials.production**

if **wizitAPIMode** custom preference is disabled then sandbox mode will be used, otherwise production mode will be used.

</ol>

<b>9. Setting up Job Schedule</b>

Job ID: Wizit-Configuration

This job is not directly handling/changing any of frontend user experience. This job fetches the min max order amount from the wizit portal by calling purchase limit endpoint and saving it in a custom object. Merchandizer can consider this custom object as a master configuration and can set the storefront min max allowed limits in custom preference by checking this master min max amount range.

Put the Wizit API Key given to you from your account representative here. NOTE: INSTALLING THE WIZIT CARTRIDGE AND NOT SAVING THE API KEY CAN CAUSE ISSUES WITH PAYMENT PROCESSING. ENSURE THAT THE API KEY IS SAVED.

<b>Job: </b>

<Image align="center" src="https://files.readme.io/a7dafdf-Snap1.png" />

<b>Custom object:</b>

Put the Wizit API Key given to you from your account representative here. NOTE: INSTALLING THE WIZIT CARTRIDGE AND NOT SAVING THE API KEY CAN CAUSE ISSUES WITH PAYMENT PROCESSING. ENSURE THAT THE API KEY IS SAVED.

<Image align="center" src="https://files.readme.io/1706a0e-Snap2.png" />

<Image align="center" src="https://files.readme.io/19b7811-Snap3.png" />

## Operations, Maintenance

<b>1. Data Storage</b>

Some additional custom attributes are stored against system objects. The following table lists these attributes and their uses , other than Site Preferences (which are listed under section 3.2.2).

<HTMLBlock>{`
<table style="width: 100%; border-collapse: collapse;">
<thead>
<tr>
  <th style="border: 1px solid #ddd; padding: 8px;">Object</th>
  <th style="border: 1px solid #ddd; padding: 8px;">Attribute</th>
  <th style="border: 1px solid #ddd; padding: 8px;">Type</th>
</tr>
</thead>
<tbody>
<tr>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Order</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Wizit Order ID<br/> ** (isWizitOrder)**</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Boolean</p>
</td>
</tr>
<tr>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Order</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Wizit Token JSON<br/><strong>(tokenServiceResult)</strong></p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Text</p>
</td>
</tr>
<tr>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Order</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Wizit Order Transaction Status<br/><strong>(wizitOrderTransactionStatus)</strong></p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>String</p>
</td>
</tr>
<tr>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Order</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Wizit Order Total Amount<br/><strong>(wizitOrderTotalAmount)</strong></p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Number</p>
</td>
</tr>
<tr>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Order</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Wizit Order Refunded Amount<br/><strong>(wizitOrderRefundedAmount)</strong></p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Number</p>
</td>
</tr>
</tbody>
</table>
`}</HTMLBlock>

<b>2. Availability</b>

If the Wizit service is unavailable the user will not be able to checkout using this payment method.

The service availability can be tracked in SFCC using the Service Status.

<b>3. Support</b>

For support please contact <merchants@wizit.money>

## User Guide

<b>1. Roles, Responsibilities</b>

Integration of this cartridge will typically be done by an SFCC developer.\
Wizit will provide End points of the services and the API KEY to be configured in Job.

<b>2. Business Manager Refund Transaction</b>

For the Wizit integration to work, the following needs to be configured in the Business Manager.

<ol>
  <li>Upload the cartridge <b>bm\_Wizit</b> and <b>int\_Wizit\_core</b> into server.</li>

  <li> Go to Business Manager <b>Menu</b> > <b>Administration</b> > <b>Manage Sites</b> > <b>Business Manager</b> > <b>Settings</b> > Cartridges input field add cartridge name “bm\_Wizit: int\_Wizit\_core".</li>

  <li><b>Administration</b> > <b>Organization</b> > <b>Roles</b> > <b>Administrator</b> > <b>Business manager modules</b> > Select context (select your site) > enable the Wizit transactions management</li>
</ol>

## Testing

<b>Checkout Flow:</b>

Once the cartridge is installed and integrated based on instructions, please try to place an order on your sandbox to test the functionality. Here is unit test coverage screenshot

![](https://files.readme.io/5750d96-image031.png)

## Release History

| Version | Date | Changes         |
| :------ | :--- | :-------------- |
| 22.1.0  | 2023 | Initial release |

# Update cartridge

Check for Updates in the Salesforce Commerce Cloud Marketplace:

1. Log in to the SFCC Business Manager and navigate to Marketplace (or visit xchange.salesforce.com).
2. Search for the Wizit Gateway Cartridge
3. Check if a newer version is available
4. Open UX Studio (Eclipse IDE with Salesforce plugin) or your preferred IDE (e.g., VS Code with SFCC extensions).
5. Select the downloaded Wizit cartridge .zip file and import it into your workspace.
6. In Business Manager, go to Administration > Sites > Manage Sites > \[Your Site] > Settings, Locate the Cartridges field and ensure the updated Wizit cartridge. Click Apply to save changes.
7. If the updated cartridge includes metadata, Go to Business Manager > Administration > Site Development > Site Import & Export. Click Upload under Import & Export Files, select the metadata .zip or .xml file from the cartridge, and click Import
8. Clear the system cache in Business Manager > Administration > Site Development > Cache by clicking Clear Cache.