Launch Week Day 1: Socket for Jira Is Now Available.Learn More
Socket
Book a DemoSign in
Socket

merchi_checkout

Package Overview
Dependencies
Maintainers
2
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

merchi_checkout

Merchi's custom checkout step form

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
69
-24.18%
Maintainers
2
Weekly downloads
 
Created
Source

Merchi Checkout

A customizable checkout step form component for Merchi e-commerce platform.

Table of Contents

  • Installation
  • Usage
  • Features
  • Props
  • Examples
  • Contributing
  • License

Installation

# Using npm
npm install merchi_checkout

# Using yarn
yarn add merchi_checkout

Usage

import { MerchiCheckout } from 'merchi_checkout';

function App() {
  return (
    <MerchiCheckout
      invoice={invoiceData}
      product={productData}
      currentUser={userData}
      toggleMerchiCheckout={() => {}}
      isOpen={true}
    />
  );
}

Features

  • Customizable checkout flow
  • Support for discount codes
  • Google Places integration for address autocomplete
  • Multiple payment gateway support
  • Quote request functionality
  • Domain signup integration
  • Customizable styling through className props
  • Responsive design
  • Invoice generation and management

Props

Style Classes

NameTypeDefaultDescription
classNameMerchiCheckoutAlertsContainerstring?"d-flex justify-content-center flex-column alerts-container-sm"Class for the alerts container
classNameMerchiCheckoutAlertstring?"alert alert-dismissible alert-notify"Class for the alert element
classNameMerchiCheckoutAlertErrorstring?"alert-danger"Class for the danger/error alert
classNameMerchiCheckoutAlertSuccessstring?"alert-success"Class for the success alert
classNameMerchiCheckoutButtonPrimarystring?"btn btn-md btn-primary d-flex align-items-center justify-content-center"Class for the primary button
classNameMerchiCheckoutButtonPrimaryBlockstring?"btn btn-lg btn-primary btn-block"Class for the primary block button
classNameMerchiCheckoutButtonSecondarystring?"btn btn-lg btn-secondary"Class for the secondary button
classNameMerchiCheckoutButtonSecondaryBlockstring?"btn btn-lg btn-secondary btn-block"Class for the secondary block button
classNameMerchiCheckoutButtonDownloadInvoicestring?"btn btn-lg btn-primary"Class for the download invoice button
classNameMerchiCheckoutConfirmInfoPanelstring?"d-flex align-items-center"Class for the confirmation information panel
classNameMerchiCheckoutFooterActionsContainerstring?"d-flex justify-content-between mt-4"Class for the footer actions container
classNameMerchiCheckoutFormCheckboxstring?"form-check-input"Class for input checkbox or radio
classNameMerchiCheckoutFormGroupstring?"form-group"Class for the form group: label, input, checkbox, radio...
classNameMerchiCheckoutFormGroupCheckboxstring?"form-check"Class for the checkbox/radio container
classNameMerchiCheckoutFormInputstring?"form-control"Class for input fields
classNameMerchiCheckoutFormSelectstring?"form-control"Class for select dropdown fields
classNameMerchiCheckoutGoogleSuggestListstring?"list-group m-b-0"Class for a list group
classNameMerchiCheckoutGoogleSuggestListItemstring?"list-group-item cursor-pointer"Class for the list item geo suggest
classNameMerchiCheckoutListGroupItemLoaderstring?"list-group-item modal-merchi-checkout-shipment-option"Class for the list item loader
classNameMerchiCheckoutFormLabelCheckboxstring?NoneClass for the checkbox/radio label
classNameMerchiCheckoutInputErrorstring?"text-danger"Class for the input error
classNameMerchiCheckoutListGroupstring?"modal-merchi-checkout-shipment-option"Class for the checkout list group
classNameMerchiCheckoutListGroupItemstring?"list-group-item"Class for the checkout list group item
classNameMerchiCheckoutRowstring?"merchi-row"Class for a row element
classNameMerchiCheckoutRowColumnstring?"merchi-column"Class for a column element
classNameMerchiCheckoutSubtitlestring?"merchi-checkout-subtitle"Class for subtitle elements
classNameMerchiCheckoutTabsContainerstring?"merchi-checkout-tabs-container"Class for the tabs container
classNameMerchiCheckoutTabstring?"merchi-checkout-tab"Class for the checkout tab element
classNameMerchiCheckoutTabPanestring?"tab-pane"Class for the tab pane
classNameMerchiCheckoutTabPaneButtonstring?"btn merchi-checkout-tab-btn"Class for the tab pane button
classNameMerchiCheckoutTabPaneContainerstring?"tab-content"Class for the tab content
classNameMerchiCheckoutTabButtonstring?"btn merchi-checkout-tab-btn"Class for the merchi checkout tab button
classNameMerchiInvoiceButtonPayInvoicestring?"btn btn-lg btn-primary btn-block"Class for the invoice pay button
discountClassNamestring?'merchi-checkout-discount-code-container'Class for the discount container
discountClassNameMainContainerstring?NoneClass for the discount main container
discountClassNameButtonItemRemovestring?'btn btn-sm btn-link'Class for the discount button to remove an item
discountClassNameButtonstring?'btn btn-primary'Class for the discount button
discountClassNameButtonContainerstring?''Class for the discount button container
discountClassNameErrorMessagestring?'text-danger'Class for the discount error message
discountClassNameInputstring?'form-control'Class for the discount input
discountClassNameListItemstring?'list-group-item d-flex align-items-center justify-content-between mt-2'Class for the discount list item
discountClassNameListItemsstring?'list-group'Class for the discount list items
discountClassNameInputContainerstring?'merchi-checkout-discount-code-field-container'Class for the discount input container
discountClassNameInputdiscountLabelstring?'visually-hidden'Class for the discount label

State Props

NameTypeDefaultDescription
currentUserMerchiUserJson?NoneMerchi user entity
invoiceMerchiInvoiceJson?NoneA Merchi invoice json object
jobMerchiJobJson?NoneA Merchi job json object
productMerchiProductJson?NoneA Merchi product json object
isOpenboolean?NoneUsed if the checkout is active
isBuyRequestboolean?NoneTells the checkout to display payment gateway
isProductEmbedFormboolean?falseTells the checkout that it's a child of the Product embed form

State Modifiers

NameTypeDefaultDescription
includeDomainSignupboolean?falseTells the checkout to hide the domain sign up tab
showUserTermsAndConditionsboolean?trueShow user terms and conditions
showDiscountCodeboolean?trueShow the discount code UI on the confirm tab
discountShowAppliedItemsboolean?falseShow the applied discount items
redirectWithValueboolean?trueOn redirect the value of the sale will be appended onto the redirect URLs

Function Props

NameTypeDefaultDescription
setInvoice(i: MerchiInvoiceJson) => void?NoneA setter function for the Merchi invoice
setJob(j: MerchiJobJson) => void?NoneA setter function for the Merchi job
toggleMerchiCheckout() => voidNoneA toggle function which sets the "isOpen" prop

Configuration Props

NameTypeDefaultDescription
urlApistring?'https://api.merchi.co/v6/'URL to connect to the Merchi API
urlFrontendstring?'https://merchi.co/'URL to redirect users to a frontend
redirectAfterSuccessUrlstring?NoneOn checkout or job creation this url will be redirected to. Typically used for third party conversion tracking
redirectAfterQuoteSuccessUrlstring?NoneOn checkout or job creation "quote request", this url will be redirected to. Typically used for third party conversion tracking
messageSuccessBuyRequeststring?NoneA success message shown on completion of a buy request
messageSuccessQuoteRequeststring?NoneA success message shown on completion of a quote request
discountButtonTextstring?NoneText for the discount button
discountLabelstring?'Discount code'Label for the discount input

Examples

Basic Usage

import { MerchiCheckout } from 'merchi_checkout';

function BasicCheckout() {
  return (
    <MerchiCheckout
      invoice={invoiceData}
      product={productData}
      isOpen={true}
      toggleMerchiCheckout={() => {}}
    />
  );
}

With Custom Styling

import { MerchiCheckout } from 'merchi_checkout';

function CustomStyledCheckout() {
  return (
    <MerchiCheckout
      invoice={invoiceData}
      product={productData}
      isOpen={true}
      toggleMerchiCheckout={() => {}}
      classNameMerchiCheckoutButtonPrimary="custom-primary-button"
      classNameMerchiCheckoutFormInput="custom-input"
    />
  );
}

Contributing

We welcome contributions! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

Keywords

react

FAQs

Package last updated on 27 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts