Skip to main content

Installing the SDK

The Coinbase Onramp SDK is called the CBPay SDK.

This page explains how to install and upgrade the SDK with yarn or npm.

info

The Coinbase Onramp public GitHub can be found at @coinbase/cbpay-js.

Installing CBPay SDK

Yarn

  1. Check available versions of CBPay SDK:
yarn info @coinbase/cbpay-js versions
  1. Install a specific version or the latest version:

Install specific version:

yarn add @coinbase/cbpay-js@1.0.0

Install latest version:

 yarn add @coinbase/cbpay-js
  1. Check your installed version:
yarn list @coinbase/cbpay-js

Npm

  1. Check available versions of CBPay SDK:
npm view @coinbase/cbpay-js versions
  1. Install a specific version or the latest version:

Install specific version:

npm install @coinbase/cbpay-js@1.0.0

Install latest version:

npm install @coinbase/cbpay-js
  1. Check your installed version:
npm list @coinbase/cbpay-js

Upgrading CBPay SDK

Yarn

  1. Compare your installed version of CBPay SDK with the latest available version:
yarn outdated @coinbase/cbpay-js
  1. Update CBPay SDK to the latest:
yarn upgrade @coinbase/cbpay-js --latest
  1. Check your version:
yarn list @coinbase/cbpay-js

Npm

  1. Compare your installed version of CBPay SDK with the latest available version:
npm outdated @coinbase/cbpay-js
  1. If necessary, update package.json with the latest version (or major version), for example:
{
"dependencies": {
"@coinbase/cbpay-js": "./coinbase-cbpay-js-[paysdk-version-latest].tgz"
}
}
  1. Update CBPay SDK to the latest available version:
npm update @coinbase/cbpay-js

See Also:

Was this helpful?