Transfer to Bank & Mobile Money
Money can be moved from your Marasoft Pay balance to a bank account or mobile money wallet by simply sending a post request with the required parameters to the endpont https://api.marasoftpay.live/createtransfer
How to integrate
This integration can be completed in 2 easy steps:
1. Get bank codes or mobile money codes of the recipient's financial institutions with the get banks/mobile-money api
2. Post required data to the create transfer endpoint
Usage
Required Parameters
Parameter | Required? | Description |
---|---|---|
enc_key | Yes | Your encryption key from MarasoftPay. Get it from your dashboard. Always make sure sensitive details like your encryption key is not in a visible area on your website, app or desktop application |
secret_key | Yes | Your secret key is to be set from your Marasoft dashboard under the API section. Transfers will not be processed from your account if this parameter is not included. Learn more |
bank_code | Yes | A Bank Code is a unique identification code for a particular bank. These codes are used when transferring money between banks and also can be used to exchange messages between them, we would provide you with an api for the list bankcodes. |
account_number | Yes | Account number of the customer |
transactionRef | Yes | a unique reference code to identify the transfer (if you don't supply one, we will generate one for you). |
amount | Yes | Amount (in the lowest currency value - kobo, pesewas or cent) you are debiting customer. Do not pass this if creating subscriptions. |
currency | Yes | Allowed values are: NGN and KSH It defaults to NGN. |
description | No | Field containing the description you want recorded with the transaction. Fields within this key will show up on merchant receipt and within the transaction information on the Marasoft Dashboard. |
Code Sample
<?php
$enc_key = "yourencrytionkey";
$bankCode = $_POST['bank_code'];
$amount = $_POST['amount'];
$account_number = $_POST['account_number'];
$transactionRef = $_POST['transactionRef'];
$description = $_POST['description'];
$currency = $_POST['currency'];
$url = "https://developers.marasoftpay.live//createtransfer";
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$headers = array(
"Content-Type: application/x-www-form-urlencoded",
);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
$data = "amount=1000&transactionRef=383hshs833&account_number=*********&description=PAYOUT&
currency=NGN&bank_code=00***&enc_key=MSFT_Enc_GXUG6*****************&secret_key=********************";
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
echo $resp = curl_exec($curl);
curl_close($curl);
Important notes
1. Details of all funds sent out of your account are accessible via the transfer section on the dashboard and payout history api
2. Webhooks for transfers are sent to your transfer webhook url.
Handling Webhooks
After a payment has been successfully processed, Marasoft Pay will send a webhook notification to the URL that you specify. For more information on how to utilize webhooks, please refer Webhooks section of this documentation