Skip to content
This repository has been archived by the owner before Nov 9, 2022. It is now read-only.


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Note: Not maintained anymore. Use

Cordova Rave

A Cordova extension to add Rave Pay Button into your hybrid apps builds.


Getting Started

These instructions will get you up and running on your local machine for development and testing purposes. See Deployment section for notes on how to deploy the project on a live system.


  1. Ensure that you have signed up for a Rave account. If not, go here to sign up for a live account or here to sign up for a test account.

  2. Ensure that you have node and npm installed. If not, visit for instructions on how to install for your specific environment. Installing node will also install npm.

  3. As this package is for Cordova and Cordova-based projects, ensure you all your required dependencies installed. e.g Cordova.


The following steps will get you up and running.

  1. In the root of your project, run npm install cordova-rave

  2. Then: cd node_modules/cordova-rave && npm start Once the second command installs all the necessary dependencies, you will be prompted to enter some information. An example is shown below:

    prompt: PBFPubKey:  FLWPUBK-98765445678900987698765567-X
    prompt: amount:  1
    prompt: customer_email:
    prompt: currency:  NGN
    prompt: country:  Nigeria
    prompt: custom_title:  Cordovey
    prompt: custom_description:  Testing
    prompt: redirect_url:
    prompt: payment_plan_id:  1000
    prompt: payment_options:
    prompt: subaccounts:  []
    prompt: custom_logo: logo.png
    prompt: liveMode:  yes

    PBFPubKey: This is your Rave public key and can be gotten from your Rave dashboard

    amount: The amount you want to charge your customers. You can omit this and set an amount when calling the pay button (see below)

    customer_email: This is the customer's email address. You can omit this and set a value when calling the pay button (see below)

    currency: The currency you want to charge your customers in. If omitted, it defaults to NGN

    country: The merchant's country. Defaults to Nigeria

    custom_title: Text to be displayed as the title of the payment modal

    custom_description: Text describing what your customers are paying for

    redirect_url: This is the url that rave sends the response of your transaction to. It should be configured to handle a get request. If not supplied, no response will be sent from Rave

    payment_plan_id: If you want to bill your customers recurrently, pass in the payment plan id here. It must be an integer

    payment_options: This allows you select the payment options you want for your users.

    subaccounts: This is an array of objects containing the subaccount IDs to split the payment into.

    custom_logo: Link to the Logo image.

    liveMode: This determines if you want to use the Live APIs (yes) or the Test APIs (no). It is required

  3. Generate rave.js. While you're still in the node_modules/cordova-rave directory, run:

    npm run build

    This ultimately creates a rave.js file into your www directory.

  4. Link the rave.js file to index.html in www directory

    Add the following script tag just before your closing script tag

    <script type="text/javascript" src="rave.js"></script>

    With rave.js now linked, you can call the function below (as you please), passing in an object containing the properties for that specific transactionn. An example is shown below

        'amount': 5000,
        'customer_email': '',
        'customer_firstname': 'Jon',
        'customer_lastname': 'Snow',
        'pay_button_text': 'Pay now',
        'redirect_url': '',
        'txref': 'CD-102297-RV098299'


Here are a few things to note

  1. If you set liveMode to no then ensure that you're using your Rave Sandbox API key i.e public key
  2. If you set liveMode to yes then ensure that you're using your Rave Live API keys


  • For any bugs (and questions) about this module, please feel free to report here.
  • And you are welcome to fork and submit pull requests.


This project is licensed under the MIT License - see the file for details


A Cordova extension to add Rave Pay Button into your hybrid app builds








No packages published