Choose Payment Methods
This page describes how to split payment methods on rave.
Rave provides multiple payment methods including card payments
, account payments
, and ussd
payments. The rave checkout modal provides all methods at once, but based on your preference you can select that only certain payment methods are shown to your users. See details below on how to achieve that.
You can either select your preferred payment methods on the Rave dashboard or at the point of integration of the inline modal (for developers). This doc shows how to choose payment methods at the point of integration. To read on how to select.payment methods via the dashboard, please see this guide.
Dashboard vs Integration configuration
By default, the methods you specify during integration are the methods that will show on the modal. However, if you
Enable dashboard payment options
in your account settings, the payment options you specify on the dashboard will override the options set at integration.
Splitting Payment Methods
To split payment methods you would need to pass
payment_options
in yourgetpaidSetup
function with either of the following values:card
,account
,ussd
,qr
,mpesa
,mobilemoneyghana
,mobilemoneyuganda
,mobilemoneyrwanda
,mobilemoneyzambia
.mobilemoneytanzania
,barter
,bank transfer
,To use more than one option just add them as comma separated values without spaces e.g.
card,account
,card,account,qr
etc.
Payment method availability
Some payment methods are currency-specific, and so cannot be used for other currencies. Only the selected preferred payment methods that are available for the selected payment currency will be shown on the modal.
For instance,mpesa
payment is only available in Kenya (forKES
), sompesa
cannot be used for any other currency. If I selectcard
,account
, andmpesa
as my payment methods, and my currency isNGN
, only card and account payment options will show.
wechat payment method
We now support
mpesa
it only works forKES
at the moment. If your payment currency isKES
, you can now pass
Rave Inline choose payment methods
<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_options: "card",
txref: "rave-123456",
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>
<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_options: "account",
txref: "rave-123456",
meta: [{
metaname: "flightID",
metavalue: "AP1234"
}],
onclose: function() {},
callback: function(response) {
var txref = response.tx.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.tx.chargeResponseCode == "00" ||
response.tx.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>
<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_options: "ussd",
txref: "rave-123456",
meta: [{
metaname: "flightID",
metavalue: "AP1234"
}],
onclose: function() {},
callback: function(response) {
var txref = response.tx.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.tx.chargeResponseCode == "00" ||
response.tx.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>
<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_options: "card,account",
txref: "rave-123456",
meta: [{
metaname: "flightID",
metavalue: "AP1234"
}],
onclose: function() {},
callback: function(response) {
var txref = response.tx.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.tx.chargeResponseCode == "00" ||
response.tx.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>
<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_options: "card,ussd",
txref: "rave-123456",
meta: [{
metaname: "flightID",
metavalue: "AP1234"
}],
onclose: function() {},
callback: function(response) {
var txref = response.tx.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.tx.chargeResponseCode == "00" ||
response.tx.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>
<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_options: "account,ussd",
txref: "rave-123456",
meta: [{
metaname: "flightID",
metavalue: "AP1234"
}],
onclose: function() {},
callback: function(response) {
var txref = response.tx.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.tx.chargeResponseCode == "00" ||
response.tx.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>
<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",
redirect_url: "https://your-website.com/",
payment_options: "barter",
txref: "rave-123456",
meta: [{
metaname: "flightID",
metavalue: "AP1234"
}],
onclose: function() {},
callback: function(response) {
var txref = response.tx.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.tx.chargeResponseCode == "00" ||
response.tx.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>
<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: "KES",
payment_options: "card,wechat",
txref: "rave-123456",
meta: [{
metaname: "flightID",
metavalue: "AP1234"
}],
onclose: function() {},
callback: function(response) {
var txref = response.tx.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.tx.chargeResponseCode == "00" ||
response.tx.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>
Rave quick setup (Embed code) choose payment method
<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_options="card"></a>
<script type="text/javascript" src="https://api.ravepay.co/flwv3-pug/getpaidx/api/flwpbf-inline.js"></script>
</form>
<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_options="account"></a>
<script type="text/javascript" src="https://api.ravepay.co/flwv3-pug/getpaidx/api/flwpbf-inline.js"></script>
</form>
<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_options="ussd"></a>
<script type="text/javascript" src="https://api.ravepay.co/flwv3-pug/getpaidx/api/flwpbf-inline.js"></script>
</form>
<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_options="card,account"></a>
<script type="text/javascript" src="https://api.ravepay.co/flwv3-pug/getpaidx/api/flwpbf-inline.js"></script>
</form>
<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_options="card,ussd"></a>
<script type="text/javascript" src="https://api.ravepay.co/flwv3-pug/getpaidx/api/flwpbf-inline.js"></script>
</form>
<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_options="account,ussd"></a>
<script type="text/javascript" src="https://api.ravepay.co/flwv3-pug/getpaidx/api/flwpbf-inline.js"></script>
</form>
Card payments example
Account payments example
USSD payment example
Updated almost 5 years ago