1.1.3 • Published 2 years ago

@coinable/pay-button v1.1.3

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
2 years ago

@coinable/pay-button

An easy to setup react integration for your application to start accepting SOL and solana tokens (e.g. USDC, DUST, SAMO) today.

The integration works with Coinable, the Web3 eCommerce stack on Solana, that allows users to accept and manage token payments.

Coinable takes care of the processing, organization, and accounting of commerce related transactions, so that users can focus on their product.

To set up an account and create products to use with the pay button, check out the documentation here.

Please see our official package documentation for implementation details.

Installation

via yarn (recommended)

yarn add @coinable/pay-button

via npm

npm install @coinable/pay-button

Basic Usage

<PayButton
  productId="tFFvJppGAwLA2RfxGZ2zxP"
  onFailure={(msg) => console.error(msg)}
  onSuccess={(redirectUrl) => {
    window.location.href = redirectUrl;
  }}
/>

Props

NameDescription
childrenComponent children
onFailureCallback for failure response will return a string with the error description.
onSuccessCallback for success response will return a redirect url to the initiated checkout session.
productIdThe checkout session will be initiated for this product id.
quantityThe quantity of the product to checkout.
requestCurrencyThe currency (fiat or token) that is displayed to the customer.
Examples of commonly used requestCurrency
  • fiat USD - USD
  • fiat EUR - EUR
  • fiat AUD - AUD
  • Native Sol and Wrapped Sol - So11111111111111111111111111111111111111112
  • USDC - EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
  • DUST - DUSTawucrTsGU8hcqRdHDCbuYhCPADMLM2VcCb8VnFnQ
1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago