Guides
DocumentationLog In

Installing Coinbase Pay SDK

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

📘

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

Installing Coinbase Pay SDK

Yarn

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

    yarn add @coinbase/[email protected]
    
  • Install latest version:

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

Npm

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

    npm install @coinbase/[email protected]
    
  • Install latest version:

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

Upgrading Coinbase Pay SDK

Yarn

  1. Compare your installed version of Coinbase Pay SDK with the latest available version:
yarn outdated @coinbase/cbpay-js
  1. Update Coinbase Pay 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 Coinbase Pay 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 Coinbase Pay SDK to the latest available version:
npm update @coinbase/cbpay-js

See Also: