Recurring billing

This shows you how to accept payments recurrently using rave.

Rave helps merchants collect payments recurringly, you can get started with a recurring payment following these steps:

  1. Login into your rave dashboard, navigate to Collect payments.

  2. Click on the create payment page button.

  3. Select recurring charge in the modal that pops up.

  4. Configure the other required information. And share your recurring payment link to accept recurring charges.

Recurring charge using the javascript payment modal

  1. Log into your dashboard, navigate to Collect payments.

  2. Click on payment plan, and create a new payment plan.

  3. Fill in the payment plan details and proceed.

  4. Once the payment plan is created click on it to retrieve the plan ID.

  5. Once you retrieve the plan ID see how to add it to your javascript snippet to accept recurring payments.

<form>
    <script src="https://api.ravepay.co/flwv3-pug/getpaidx/api/flwpbf-inline.js"></script>
    <button type="button" onClick="payWithRave()">Pay Now</button>
</form>

<script>
    const API_publicKey = "FLWPUBK-24b72aebb821aea177483039677df9d3-X";

    function payWithRave() {
        var x = getpaidSetup({
            PBFPubKey: API_publicKey,
            customer_email: "[email protected]",
            amount: 2000,
            customer_phone: "234099940409",
            currency: "NGN",
            payment_method: "both",
            txref: "rave-123456",
            payment_plan: 13,
            meta: [{
                metaname: "flightID",
                metavalue: "AP1234"
            }],
            onclose: function() {},
            callback: function(response) {
                var txref = response.data.txRef; // collect flwRef returned and pass to a 					server page to complete status check.
                console.log("This is the response returned after a charge", response);
                if (
                    response.data.chargeResponseCode == "00" ||
                    response.data.chargeResponseCode == "0"
                ) {
                    // redirect to a success page
                } else {
                    // redirect to a failure page.
                }

                x.close(); // use this to close the modal immediately after payment.
            }
        });
    }
</script>
  • payment_plan: You need to pass the ID of the payment plan using the steps described above.

Using the rave inline quick setup (embed code)

<form>
  <a class="flwpug_getpaid" 
  data-PBFPubKey="FLWPUBK-24b72aebb821aea177483039677df9d3-X" 
  data-txref="rave-123456" 
  data-amount="2000" 
  data-customer_email="[email protected]" 
  data-currency="NGN" 
  data-pay_button_text="Pay Now" 
  data-country="NG" 
  data-redirect_url="https://your-website.com/urlredirect"
  data-payment_plan="13"></a>

  <script type="text/javascript" src="https://api.ravepay.co/flwv3-pug/getpaidx/api/flwpbf-inline.js"></script>
</form>

Recurring charge using rave's API

If you would like to make use of our APIs instead you can see how to get started on the Create Payment Plan page.


Next Steps

Congratulations! you can now charge a user re-currently, to get a notification to your server for subsequent charges to your customers please visit the Webhooks sections.