Last updated

getCheckoutUrl()

Gets the checkout URL without redirecting.

Signature

const url = window.FairShareSDK.getCheckoutUrl();

Returns

string — The checkout URL for the current cart.

Example

// Get checkout URL for custom handling
const checkoutUrl = window.FairShareSDK.getCheckoutUrl();

// Open in new tab
window.open(checkoutUrl, '_blank');

// Or use in a link
document.getElementById('checkout-link').href = checkoutUrl;