Skip to main content

Credify Messaging App Integration Guide

Overview

Credify's messaging widget enables dynamic financial messaging (like installment offers) to be shown on product or cart pages.

It is easily integrated by embedding a script and configuring a global object on the page.

tip

The messaging widget takes the full width of its container. For ideal aesthetics, please ensure the wrapper element has a fixed width of 480px to maintain proper layout and appearance.

Installation

Include the following script tag to your HTML page:

<script>

// First step is to define the window.Credify_EF object to configure how the widget behaves:

window.Credify_EF = {
platform: 'custom',
storeId: 'store_abc123', // provided by Credify
locale: 'en', // 'en' or 'ar'
MessagingState: {
page: 'product', // 'product' or 'cart'
amount: 199900, // Amount in cents
designMode: false
}
};

const host = 'https://splitpay.credify.live';
const hour = Math.floor(Date.now() / 3600000) // Optional, used to prevent caching for a long time

const script = document.createElement('script')
script.setAttribute(
'src',
`${host}/_app/immutable/chunks/messaging-app.js?t=${hour}`
)

document.body.appendChild(script)
</script>

Update Amount Dynamically

If the product price or cart total changes dynamically, update the widget by setting the amount:

Credify_EF.MessagingState.amount = NEW_AMOUNT * 100;

// for 2,499.00 EGP
Credify_EF.MessagingState.amount = 2499 * 100;

Supported Platforms

  • Shopify
  • WooCommerce
  • Custom HTML/JS environments

Support

For integration issues or support, please contact the Credify team at support@credify.live