0.0.28 • Published 11 months ago

@nautical-commerce/checkout v0.0.28

Weekly downloads
-
License
BSD-3-Clause
Repository
-
Last release
11 months ago

Nautical Checkout React Library

This library provides React components and hooks to quickly build a seamless checkout and cart experience for your React application with the Nautical Commerce platform.

Installation

You can install the library using either npm or yarn:

npm install @nautical-commerce/checkout
yarn add @nautical-commerce/checkout

Usage

The library provides two main components: and .

The component provides a seamless checkout experience. It can be used as follows:

import { Checkout as NauticalCheckout, CheckoutProvider as NauticalCheckoutProvider } from '@nautical-commerce/checkout';
<NauticalCheckoutProvider       
  currency={currency}
  client={client}
  isLoggedIn={isLoggedIn}
  getClientSecret={getClientSecret}
  >
...
<NauticalCheckout
  countries={countries}
  defaultAddress={defaultAddress}
  paymentGateways={paymentGateways}
  onPayRedirect={onPayRedirect}
/>
...
</NauticalCheckout Provider>

Props

Checkout Provider

  • countries (required): CountryFragment[] - List of countries supported in your checkout
  • paymentGateways (required): PaymentGatewayFragment - Supported payment gateways and gateway data
  • onPayRedirect (required): (checkoutId: string) => string
  • defaultAddress (optional): AddressFragment | null - The user's default address for shipping

Checkout

  • countries (required): CountryFragment[] - List of countries supported in your checkout
  • paymentGateways (required): PaymentGatewayFragment - Supported payment gateways and gateway data
  • onPayRedirect (required): (checkoutId: string) => string - Takes the checkout Id and returns the url for final payment processing
  • defaultAddress (optional): AddressFragment | null - The user's default address for shipping
0.0.28

11 months ago

0.0.27

11 months ago

0.0.26

11 months ago

0.0.25

11 months ago

0.0.24

11 months ago

0.0.23

11 months ago

0.0.22

11 months ago

0.0.21

11 months ago

0.0.20

11 months ago

0.0.19

11 months ago

0.0.18

11 months ago

0.0.17

11 months ago

0.0.16

11 months ago

0.0.14

11 months ago

0.0.13

11 months ago

0.0.12

11 months ago

0.0.11

11 months ago

0.0.10

11 months ago

0.0.9

11 months ago

0.0.8

11 months ago

0.0.7

11 months ago

0.0.6

11 months ago

0.0.5

11 months ago

0.0.4

11 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago