Build With MyBundlePay

One integration for payments, cards, bills and payouts.

MyBundlePay gives developers a clean payment gateway, virtual account funding, payout rails, card issuing tools, bill payments, webhooks and merchant-ready checkout experiences.

REST APIs JSON based
Webhooks Real time events
Sandbox Test first

API Test Console

Test the current endpoint directly from the documentation. Secret keys stay inside this browser session.

Enter your test key, review the sample body for this page, then send a request.

Post https://mybundlepay.com/ng/api/payment

HEADERS

Authorization* string

Pass your {secret_key} as a bearer token in the request header to authorize this call

BODY PARAMS

URL to redirect when a transaction is completed. Successful transactions redirects to this url after payment. {tx_ref} is returned, so you don't need to pass it with your url

Your transaction reference. This MUST be unique for every transaction.

This is the first_name of your customer.

This is the last_name of your customer.

This is the email address of your customer. Transaction notification will be sent to this email address

Currency to charge in. [ 'GHS', 'MGA', 'NGN' ]

Amount to charge the customer.

{
"title":"Title of payment",
"description":"Description of payment",
"logo":"https://assets.piedpiper.com/logo.png"
}

You can pass extra information here.


< ?php
    $curl = curl_init();
    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://mybundlepay.com/ng/api/payment",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_ENCODING => "",
        CURLOPT_MAXREDIRS => 10,
        CURLOPT_TIMEOUT => 0,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
        CURLOPT_CUSTOMREQUEST => "POST",
        CURLOPT_POSTFIELDS => [
            "amount" => 100,
            "currency" => "USD",
            "email" => "[email protected]",
            "first_name" => "John",
            "last_name" => "Doe",
            "return_url" => "https://webhook.site",
            "tx_ref" => "2346vrcd",
            "customization" => [
                "title"=> "Test Payment",
                "description"=> "Payment Description",
                "logo"=> "https://assets.piedpiper.com/logo.png"
            ],
            "meta" => [
                "uuid" => "uuid",
                "response" => "Response"
            ]
        ],
        CURLOPT_HTTPHEADER => array(
            "Accept: application/json",
            "Content-Type: application/json",
            "Authorization: Bearer {secret_key}"
        ),
    ));

    $response = curl_exec($curl);
    curl_close($curl);
    echo $response;
?>

                        

var axios = require('axios');
var data = JSON.stringify({
    "amount" => 100,
    "currency" => "USD",
    "email" => "[email protected]",
    "first_name" => "John",
    "last_name" => "Doe",
    "return_url" => "https://webhook.site",
    "tx_ref" => "2346vrcd",
    "customization" => [
        "title"=> "Test Payment",
        "description"=> "Payment Description",
        "logo"=> "https://assets.piedpiper.com/logo.png"
    ],
    "meta" => [
        "uuid" => "uuid",
        "response" => "Response"
    ]
});

var config = {
  method: 'post',
  url: 'https://mybundlepay.com/ng/api/payment',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': 'Bearer {secret_key}'
    },
  data : data
};

axios(config)
    .then(function (response) {
    console.log(JSON.stringify(response.data));
    })
    .catch(function (error) {
    console.log(error);
    });
});

                        

{
    "message": "Payment link created",
    "status": "success",
    "data": {
        "checkout_url": "https://mybundlepay.com/ng/payment/09229936784"
    }
}