Package: maplerad-python
The Maplerad Python API WrapperThe library follows an object-oriented approachThere are currently twelve (12) base categories namely:CustomerCollectionsTransferBillsWalletsIssuingIdentityTransactionsCounterpartyForexInstitutionsMiscLearn more from thedocsInstallation$pipinstallmaplerad-pythonAuthorizationA secret key is needed for authorization. It can be gotten from the Maplerad dashboardEnvironmentsMaplerad provides two environments to ensure a smooth and easy experience.sandbox: for developmentlive: for productionSandboxSandbox is your playground. You can credit your test wallets and use that to test your integrations, no real money will be debited or credited.
Ensure to switch to Live when you are ready to launch.LiveAll method calls under Live will be charged and real money will be debited or credited.
You are advised to use this when you have fully tested your integrations and are ready to launch your product.Usage# import the packagefrommaplerad_python.authimportAuthenticationsecret_key=os.getenv("MAPLERAD_SECRET_KEY")environment="DEVELOPMENT"auth=Authenticate(secret_key,environment)Customerscustomer=auth.customers()Create a Customerpayload={"email":user.email,"first_name":user.first_name,"last_name":user.last_name,"country":country_type}result=customer.create_customer(payload)Upgrade Customer tier 1payload={"customer_id":customer_id,"phone":{"phone_number":phone_number,"phone_short_code":phone_short_code},"address":{"city":address.city,"country":address.country,"postal_code":address.postal_code,"state":address.state,"street":address.street,"street2":address.street2},"dob":dob,"identification_number":identification_number}result=customer.upgrade_customer_tier1(payload)Upgrade customer tier2payload={"customer_id":customer_id,"identity":{"country":identity.country,"image":identity.image,"number":identity.number,"type":identity.type}}result=customer.upgrade_customer_tier2(payload)Get a customerresult=customer.get_customer(customer_id)Get all Customersresult=customer.get_all_customers()Get customer cardsresult=customer.get_customer_cards(customer_id)Get customer transactionsresult=customer.get_customer_transactions(customer_id)Get customer virtual accountsresult=customer.get_customer_virtual_accounts(customer_id)Customer Card enrollmentresult=customer.customer_card_enrollment(customer_id,brand)Update Customerpayload={"customer_id":customer_id,"photo":photo,"phone":{"phone_number":phone.phone_number,"phone_country_code":phone.phone_country_code},"middle_name":middle_name,"identity":{"country":identity.country,"image":identity.image,"number":identity.number,"type":identity.type}}result=customer.update_customer(payload)Set customer Blacklist statusresult=customer.set_customer_blacklist_active(customer_id,status)Billsbills=auth.bills()Buy Airtimepayload={"phone_number":phone_number,"identifier":identifier,"amount":amount}result=bills.buy_airtime(payload)Get airtime billersresult=bills.get_airtime_billers(country)Get airtime historyresult=bills.get_airtime_history()Collectionscollections=auth.collections()Create Virtual accountpayload={"customer_id":customer_id,"currency":currency_type,"preferred_bank":preferred_bank,"deposit_account_id":deposit_account_id,"meta":{"occupation":occupation,"utility_bill":utility_bill_url_or_file,"bank_statement":bank_statement_url_or_file,"identity_type":identity_type,"identity_image":identity_image_url_or_file,"identity_number":identity_number,"identity_issued_date":identity_issued_date,"identity_expiration":identity_expiration}}result=collections.create_virtual_account(payload)Counterpartycounterparty=auth.counterparty()Blacklist a counterpartyresult=counterparty.blacklist(counterpartyID,status)Get counterpartyresult=counterparty.get_counterparty(counterpartyID)Get all counterpartiesresult=counterparty.get_all_counterparties()FXfx=auth.fx()Generate quotepayload={"source_currency":"NGN","target_currency":"USD","amount":"500",}result=fx.generate_quote(payload)Exchange currencyresult=fx.exchange_currency(quote_reference)Get FX historyresult=fx.get_fx_history()IDentityidentity=auth.identity()Verify Identityresult=identity.verify_identity(bvn)Institutioninstitution=auth.institution()Get all institutionsparams={"page":"1","pageSize":"10","type":"bank","country":"US"}result=institution.get_all_institutions(params)Resolve institutionpayload={"account_number":"1234567890","bank_code":"ABC123"}result=institution.resolve_institution(payload)Issuingissuing=auth.issuing()Create a Cardpayload={"customer_id":"123456789","type":"VIRTUAL","currency":"USD","auto_approve":True,"brand":"VISA","amount":1000,"card_pin":1234}result=issuing.create_card(payload)Create business cardpayload={"customer_id":"123456789","type":CardType.PHYSICAL.value,"currency":"USD","auto_approve":True,"brand":"MASTERCARD","amount":2000,"card_pin":5678,"name":"Business Card"}result=issuing.create_business_card(payload)Set Card pinresult=issuing.set_card_pin(cardID,pin)Get Cardresult=issuing.get_card(cardID)Get all Cardsresult=issuing.get_all_cards()Get card transactionsparams={"page":"1","pageSize":"10","type":"purchase","status":"success"}result=issuing.get_card_transactions(cardID,params)Fund Cardamount=1000result=issuing.fund_card(cardID,amount)Withdraw from cardresult=issuing.withdraw_from_card(cardID,amount)Freeze cardresult=issuing.freeze_card(cardID)Unfreeze cardresult=issuing.unfreeze_card(cardID)Miscmisc=auth.misc()Get currenciesresult=misc.get_currencies()Get countriesresult=misc.get_countries()Credit test walletpayload={"amount":"100","currency":"USD"}result=misc.credit_test_wallet(payload)Transactionstransactions=auth.transactions()Get all transactionsresult=transactions.get_all_transactions()Get a transactionresult=transactions.get_transaction("transaction_id")Verify a collection transactionresult=transactions.verify_collection_transaction("transaction_id")Transferstransfers=auth.transfer()Naira transferpayload={"account_number":"string","amount":45454545,"bank_code":"string","currency":"NGN",}result=transfers.naira_transfer(payload)DOM transferpayload={"account_number":"1234567890","amount":1000.0,"bank_code":"ABC","currency":"USD","meta":{"scheme":"DOM","sender":{"first_name":"John","last_name":"Doe","phone_number":"1234567890","address":"123 Main Street","country":"USA"},"counterparty":{"first_name":"Jane","last_name":"Smith","phone_number":"9876543210","address":"456 Elm Street","country":"Canada","identity":"12345"}},"reason":"Payment","reference":"ABC123"}result=transfers.dom_transfer(payload)Cash Pickuppayload={"account_number":"1234567890","amount":1000.0,"bank_code":"ABC","currency":"USD","meta":{"scheme":"CASHPICKUP","sender":{"first_name":"John","last_name":"Doe","phone_number":"1234567890","address":"123 Main Street","country":"USA"},"counterparty":{"first_name":"Jane","last_name":"Smith","phone_number":"9876543210","address":"456 Elm Street","country":"Canada","identity":"12345"}},"reason":"Payment","reference":"ABC123"}result=transfers.cash_pickup_transfer(payload)Get a transferresult=transfers.get_transfer("transfer_id")Get all transfersresult=transfers.get_all_transfers()Walletwallets=auth.wallet()Get walletsresult=wallets.get_wallets()Get wallet historyresult=wallets.get_wallets_history()Get wallet history by currencyresult=wallets.get_wallets_history_by_currency("USD")Contact DeveloperTwitter:1madvirusLinkedIN:Edwin Beshel AyabieEmail:edwinayabie1@gmail.com