0.4.4 • Published 9 months ago

@matic.co/sdk v0.4.4

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

logo

Matic Payments SDK

Make it easy for your clients to pay you by giving them every payment option under one roof.

See documentation at: https://docs.matic.io

Installation

Matic offers two ways to install our SDK. Our users can choose to install as a Node.js package or from a CDN.

Using Node.js Package:

npm install @matic.co/sdk

If you use Yarn as a package manager:

yarn add @matic.co/sdk

Using CDN:

<script src="https://cdn.matic.io/sdk/matic-sdk.min.js"></script>

Quick Example

- Auth

The openAuth function allows you to execute a pop-up window to verify payment methods in a simple and fast way.

import MaticSDK from '@matic.co/sdk'

const Sdk = MaticSDK.init('your pubkey')

const data = {
  merchant_id: '', // your Merchant ID
}

// open popup
Sdk.openAuth(data)
  .then((response) => {
    // ...
  })
  .catch((error) => {
    // ...
  })

- Speed

The openSpeed function allows you to execute a pop-up window to make payments in a simple and fast way.

import MaticSDK from '@matic.co/sdk'

const Sdk = MaticSDK.init('your pubkey')

const data = {
  merchant_id: '', // your Merchant ID
  total: 100, // The total to pay
  apply_cfee: true, // Whether apply cfee to payment
  cfee_included: true, // Wheter cfee is included in the amount
  merchant_gateway_id: '', // your Gateway ID
}

// open popup
Sdk.openSpeed(data)
  .then((response) => {
    // ...
  })
  .catch((error) => {
    // ...
  })
0.4.4

9 months ago

0.4.1

12 months ago

0.4.0

1 year ago

0.4.3

11 months ago

0.4.2

12 months ago

0.3.8

1 year ago

0.3.9

1 year ago

0.3.6

1 year ago

0.3.5

1 year ago

0.3.7

1 year ago

0.3.0

2 years ago

0.3.2

1 year ago

0.3.1

1 year ago

0.3.4

1 year ago

0.3.3

1 year ago

0.0.0-test-1

2 years ago

0.1.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.0.9

2 years ago

0.0.3

2 years ago

0.0.8

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.1-test

2 years ago

0.0.0

2 years ago

0.0.0-beta3

2 years ago

0.0.0-beta2

2 years ago

0.0.0-beta1

2 years ago

0.0.1-beta5

2 years ago

0.0.1-beta4

2 years ago

0.0.1-beta3

2 years ago

0.0.1-beta1

3 years ago

0.0.1-beta2

3 years ago

0.0.1-alpha19

3 years ago

0.0.1

3 years ago

0.0.2

3 years ago

0.0.1-alpha18

3 years ago

0.0.1-alpha17

3 years ago

0.0.1-alpha15

3 years ago

0.0.1-alpha16

3 years ago

0.0.1-alpha13

3 years ago

0.0.1-alpha14

3 years ago

0.0.1-alpha11

3 years ago

0.0.1-alpha12

3 years ago

0.0.1-alpha3

3 years ago

0.0.1-alpha5

3 years ago

0.0.1-alpha4

3 years ago

0.0.1-alpha7

3 years ago

0.0.1-alpha6

3 years ago

0.0.1-alpha9

3 years ago

0.0.1-alpha10

3 years ago

0.0.1-alpha8

3 years ago

0.0.1-alpha2

3 years ago

0.0.1-alpha1

3 years ago