{
"info": {
"author": "Tofunmi Kupoluyi",
"author_email": "tofunmi@flutterwavego.com",
"bugtrack_url": null,
"classifiers": [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3"
],
"description": "# Python_Rave\n\n## Introduction\nThis is a Python wrapper around the [API](https://flutterwavedevelopers.readme.io/v2.0/reference) for [Rave by Flutterwave](https://rave.flutterwave.com).\n#### Payment types implemented:\n* Card Payments\n* Bank Account Payments\n* Ghana Mobile Money Payments\n* Mpesa\n* USSD Payments\n## Installation\nTo install, run\n\n``` pip install python_rave```\n\nNote: This is currently under active development\n## Import Package\nThe base class for this package is 'Rave'. To use this class, add:\n\n``` from python_rave import Rave ```\n\n## Initialization\n\n#### To instantiate in sandbox:\nTo use Rave, instantiate the Rave class with your public key. We recommend that you store your secret key in an environment variable named, ```RAVE_SECRET_KEY```. Instantiating your rave object is therefore as simple as:\n\n``` rave = Rave(\"YOUR_PUBLIC_KEY\")```\n\n#### To instantiate without environment variables (Sandbox):\nIf you choose not to store your secret key in an environment variable, we do provide a ```usingEnv``` flag which can be set to ```False```, but please be warned, do not use this package without environment variables in production\n\n``` rave = Rave(\"YOUR_PUBLIC_KEY\", \"YOUR_SECRET_KEY\", usingEnv = False) ```\n\n\n#### To instantiate in production:\nTo initialize in production, simply set the ```production``` flag to ```True```. It is highly discouraged but if you choose to not use environment variables, you can do so in the same way mentioned above.\n\n``` rave = Rave(\"YOUR_PUBLIC_KEY\", production=True)```\n\n# Rave Objects\nThis is the documentation for all of the components of python_rave\n\n\n## ```rave.Account```\nThis is used to facilitate account transactions.\n\n**Functions included:**\n\n* ```.charge```\n\n* ```.validate```\n\n* ```.verify```\n\n
\n\n### ```.charge(payload)```\nThis is called to start an account transaction. The payload should be a dictionary containing card information. It should have the parameters:\n\n* ```accountbank```, \n\n* ```accountnumber```, \n\n* ```amount```, \n\n* ```email```, \n\n* ```phonenumber```, \n\n* ```IP```\n\nOptionally, you can add a custom transaction reference using the ```txRef``` parameter. Note that if you do not specify one, it would be automatically generated. We do provide a function for generating transaction references in the Misc library (add link).\n\n\nA sample call is:\n\n``` res = rave.Account.charge(payload) ```\n\n#### Returns\n\nThis call returns a dictionary. A sample response is:\n\n ```{'error': False, 'validationRequired': True, 'txRef': 'MC-1530899106006', 'flwRef': 'ACHG-1530899109682', 'authUrl': None} ```\n\n This call raises an ```AccountChargeError``` if there was a problem processing your transaction. The ```AccountChargeError``` contains some information about your transaction. You can handle this as such:\n\n```\ntry: \n #Your charge call\nexcept RaveExceptions.AccountChargeError as e:\n print(e.err[\"errMsg\"])\n print(e.err[\"flwRef\"])\n```\n\nA sample ``` e.err ``` contains:\n\n```{'error': True, 'txRef': 'MC-1530897824739', 'flwRef': None, 'errMsg': 'Sorry, that account number is invalid, please check and try again'}```\n\n
\n\n### ```.validate(txRef)```\n\nAfter a successful charge, most times you will be asked to verify with OTP. To check if this is required, check the ```validationRequired``` key in the ```res``` of the charge call.\n\nIn the case that an ```authUrl``` is returned from your charge call, you may skip the validation step and simply pass your authUrl to the end-user. \n\n```authUrl = res['authUrl'] ```\n\nTo validate, you need to pass the ```flwRef``` from the ```res``` of the charge call as well as the OTP.\n\nA sample validate call is: \n\n```res2 = rave.Account.validate(res[\"flwRef\"], \"12345\")```\n\n\n#### Returns\n\nThis call returns a dictionary containing the ```txRef```, ```flwRef``` among others if successful.\n\nThis call raises a ```TransactionValidationError``` if the OTP is not correct or there was a problem processing your request. \n\nTo handle this, write:\n\n```\ntry:\n # Your charge call\nexcept RaveExceptions.TransactionValidationError as e:\n print(e.err[\"errMsg\"])\n print(e.err[\"flwRef\"])\n```\n\nA sample ``` e.err ``` contains:\n\n```{'error': True, 'txRef': 'MC-1530899869968', 'flwRef': 'ACHG-1530899873118', 'errMsg': 'Pending OTP validation'}```\n\n\n\n
\n\n### ```.verify(txRef)```\n\nYou can call this to check if your transaction was completed successfully. You have to pass the transaction reference generated at the point of charging. This is the ```txRef``` in the ```res``` parameter returned any of the calls (```charge``` or ```validate```). \n\nA sample verify call is:\n\n``` res = rave.Account.verify(data[\"txRef\"]) ```\n\n#### Returns\n\nThis call returns a dict with ```txRef```, ```flwRef``` and ```transactionComplete``` which indicates whether the transaction was completed successfully. \n\nIf your call could not be completed successfully, a ```TransactionVerificationError``` is raised.\n\n\n\n
\n\n### Complete account flow\n\n```\nfrom python_rave import Rave, RaveExceptions, Misc\nrave = Rave(\"ENTER_YOUR_PUBLIC_KEY\", \"ENTER_YOUR_SECRET_KEY\", usingEnv = False)\n# account payload\npayload = {\n \"accountbank\": \"232\",# get the bank code from the bank list endpoint.\n \"accountnumber\": \"0061333471\",\n \"currency\": \"NGN\",\n \"country\": \"NG\",\n \"amount\": \"100\",\n \"email\": \"test@test.com\",\n \"phonenumber\": \"0902620185\",\n \"IP\": \"355426087298442\",\n}\n\ntry:\n res = rave.Account.charge(payload)\n if res[\"authUrl\"]:\n print(res[\"authUrl\"])\n\n elif res[\"validationRequired\"]:\n rave.Account.validate(res[\"flwRef\"], \"1234\")\n\n res = rave.Account.verify(res[\"txRef\"])\n print(res)\n\nexcept RaveExceptions.AccountChargeError as e:\n print(e.err)\n print(e.err[\"flwRef\"])\n\nexcept RaveExceptions.TransactionValidationError as e:\n print(e.err)\n print(e.err[\"flwRef\"])\n\nexcept RaveExceptions.TransactionVerificationError as e:\n print(e.err[\"errMsg\"])\n print(e.err[\"txRef\"])\n\n\n```\n
\n## ```rave.Card```\nThis is used to facilitate card transactions.\n\n**Functions included:**\n\n* ```.charge```\n\n* ```.validate```\n\n* ```.verify```\n\n* ```.getTypeOfArgsRequired```\n\n* ```.updatePayload```\n\n
\n\n### ```.charge(payload)```\nThis is called to start a card transaction. The payload should be a dictionary containing card information. It should have the parameters:\n\n* ```cardno```,\n\n* ```cvv```, \n\n* ```expirymonth```, \n\n* ```expiryyear```, \n\n* ```amount```, \n\n* ```email```, \n\n* ```phonenumber```,\n\n* ```firstname```, \n\n* ```lastname```, \n\n* ```IP```\n\nOptionally, you can add a custom transaction reference using the ```txRef``` parameter. Note that if you do not specify one, it would be automatically generated. We do provide a function for generating transaction references in the Misc library (add link).\n\n\nA sample call is:\n\n``` res = rave.Card.charge(payload) ```\n\n#### Returns\n\nThis call returns a dictionary. A sample response is:\n\n ```{'error': False, 'validationRequired': True, 'txRef': 'MC-1530899106006', 'flwRef': 'ACHG-1530899109682', 'suggestedAuth': None} ```\n\n This call raises an ```CardChargeError``` if there was a problem processing your transaction. The ```CardChargeError``` contains some information about your transaction. You can handle this as such:\n\n```\ntry: \n #Your charge call\nexcept RaveExceptions.CardChargeError as e:\n print(e.err[\"errMsg\"])\n print(e.err[\"flwRef\"])\n```\n\nA sample ``` e.err ``` contains:\n\n```{'error': True, 'txRef': 'MC-1530897824739', 'flwRef': None, 'errMsg': 'Sorry, that card number is invalid, please check and try again'}```\n\n
\n\n### ```rave.Misc.updatePayload(authMethod, payload, arg)```\n\nDepending on the suggestedAuth from the charge call, you may need to update the payload with a pin or address. To know which type of authentication you would require, simply call ```rave.Card.getTypeOfArgsRequired(suggestedAuth)```. This returns either ```pin``` or ```address```. \n\nIn the case of ```pin```, you are required to call ```rave.Card.updatePayload(suggestedAuth, payload, pin=\"THE_CUSTOMER_PIN\")```. \n\nIn the case of ```address```, you are required to call ```rave.Card.updatePayload(suggestedAuth, payload, address={ THE_ADDRESS_DICTIONARY })```\n\nA typical address dictionary includes the following parameters:\n\n```billingzip```, \n\n```billingcity```,\n\n```billingaddress```, \n\n```billingstate```,\n\n```billingcountry```\n\n**Note:**\n```suggestedAuth``` is the suggestedAuth returned from the initial charge call and ```payload``` is the original payload\n\n
\n\n### ```.validate(txRef)```\n\nAfter a successful charge, most times you will be asked to verify with OTP. To check if this is required, check the ```validationRequired``` key in the ```res``` of the charge call.\n\nTo validate, you need to pass the ```flwRef``` from the ```res``` of the charge call as well as the OTP.\n\nA sample validate call is: \n\n```res2 = rave.Card.validate(res[\"flwRef\"], \"12345\")```\n\n#### Returns\n\nThis call returns a dictionary containing the ```txRef```, ```flwRef``` among others if successful.\n\nThis call raises a ```TransactionValidationError``` if the OTP is not correct or there was a problem processing your request. \n\nTo handle this, write:\n\n```\ntry:\n # Your charge call\nexcept RaveExceptions.TransactionValidationError as e:\n print(e.err[\"errMsg\"])\n print(e.err[\"flwRef\"])\n```\n\nA sample ``` e.err ``` contains:\n\n```{'error': True, 'txRef': None, 'flwRef': 'FLW-MOCK-a7911408bd7f55f89f0211819d6fd370', 'errMsg': 'otp is required'}```\n\n
\n\n### ```.verify(txRef)```\n\nYou can call this to check if your transaction was completed successfully. You have to pass the transaction reference generated at the point of charging. This is the ```txRef``` in the ```res``` parameter returned any of the calls (```charge``` or ```validate```). \n\nA sample verify call is:\n\n``` res = rave.Card.verify(data[\"txRef\"]) ```\n\n#### Returns\n\nThis call returns a dict with ```txRef```, ```flwRef``` and ```transactionComplete``` which indicates whether the transaction was completed successfully. \n\nIf your call could not be completed successfully, a ```TransactionVerificationError``` is raised.\n\n### Complete card charge flow\n\n```\n\nfrom python_rave import Rave\nrave = Rave(\"YOUR_PUBLIC_KEY\", \"YOUR_SECRET_KEY\", usingEnv = False)\n\n# Payload with pin\npayload = {\n \"cardno\": \"5438898014560229\",\n \"cvv\": \"890\",\n \"expirymonth\": \"09\",\n \"expiryyear\": \"19\",\n \"amount\": \"10\",\n \"email\": \"user@gmail.com\",\n \"phonenumber\": \"0902620185\",\n \"firstname\": \"temi\",\n \"lastname\": \"desola\",\n \"IP\": \"355426087298442\",\n}\n\ntry:\n res = rave.Card.charge(payload)\n\n if res[\"suggestedAuth\"]:\n arg = Misc.getTypeOfArgsRequired(res[\"suggestedAuth\"])\n\n if arg == \"pin\":\n Misc.updatePayload(res[\"suggestedAuth\"], payload, pin=\"3310\")\n if arg == \"address\":\n Misc.updatePayload(res[\"suggestedAuth\"], payload, address= {\"billingzip\": \"07205\", \"billingcity\": \"Hillside\", \"billingaddress\": \"470 Mundet PI\", \"billingstate\": \"NJ\", \"billingcountry\": \"US\"})\n\n res = rave.Card.charge(payload)\n\n if res[\"validationRequired\"]:\n rave.Card.validate(res[\"flwRef\"], \"\")\n\n res = rave.Card.verify(res[\"txRef\"])\n print(res[\"transactionComplete\"])\n\nexcept RaveExceptions.CardChargeError as e:\n print(e.err[\"errMsg\"])\n print(e.err[\"flwRef\"])\n\nexcept RaveExceptions.TransactionValidationError as e:\n print(e.err)\n print(e.err[\"flwRef\"])\n\nexcept RaveExceptions.TransactionVerificationError as e:\n print(e.err[\"errMsg\"])\n print(e.err[\"txRef\"])\n\n```\n\n
\n## ```rave.Mpesa```\nThis is used to facilitate Mpesa transactions.\n\n**Functions included:**\n\n* ```.charge```\n\n\n* ```.verify```\n\n
\n\n### ```.charge(payload)```\nThis is called to start an Mpesa transaction. The payload should be a dictionary containing account information. It should have the parameters:\n\n* ```account```, \n\n* ```email```, \n\n* ```phonenumber```, \n\n* ```IP```\n\nOptionally, you can add a custom transaction reference using the ```txRef``` parameter. Note that if you do not specify one, it would be automatically generated. We do provide a function for generating transaction references in the Misc library (add link).\n\n\nA sample call is:\n\n``` res = rave.Mpesa.charge(payload) ```\n\n#### Returns\n\nThis call returns a dictionary. A sample response is:\n\n ```{'error': False, 'validationRequired': True, 'txRef': 'MC-1530910216380', 'flwRef': 'N/A'} ```\n\n This call raises an ```TransactionChargeError``` if there was a problem processing your transaction. The ```TransactionChargeError``` contains some information about your transaction. You can handle this as such:\n\n```\ntry: \n #Your charge call\nexcept RaveExceptions.TransactionChargeError as e:\n print(e.err[\"errMsg\"])\n print(e.err[\"flwRef\"])\n\n```\n\nA sample ``` e.err ``` contains:\n\n```{'error': True, 'txRef': 'MC-1530910109929', 'flwRef': None, 'errMsg': 'email is required'}```\n\n\n
\n\n### ```.verify(txRef)```\n\nYou can call this to check if your transaction was completed successfully. You have to pass the transaction reference generated at the point of charging. This is the ```txRef``` in the ```res``` parameter returned any of the calls (```charge``` or ```validate```). \n\nA sample verify call is:\n\n``` res = rave.Mpesa.verify(data[\"txRef\"]) ```\n\n#### Returns\n\nThis call returns a dict with ```txRef```, ```flwRef``` and ```transactionComplete``` which indicates whether the transaction was completed successfully. \n\nIf your call could not be completed successfully, a ```TransactionVerificationError``` is raised.\n\n
\n\n### Complete Mpesa charge flow\n\n```\nfrom python_rave import Rave, RaveExceptions, Misc\nrave = Rave(\"ENTIRE_YOUR_PUBLIC_KEY\", \"ENTIRE_YOUR_SECRET_KEY\", usingEnv = False)\n\n# mobile payload\npayload = {\n \"amount\": \"100\",\n \"phonenumber\": \"0926420185\",\n \"email\": \"user@exampe.com\",\n \"IP\": \"40.14.290\",\n \"narration\": \"funds payment\",\n}\n\ntry:\n res = rave.Mpesa.charge(payload)\n res = rave.Mpesa.verify(res[\"txRef\"])\n print(res)\n\nexcept RaveExceptions.TransactionChargeError as e:\n print(e.err[\"errMsg\"])\n print(e.err[\"flwRef\"])\n\nexcept RaveExceptions.TransactionVerificationError as e:\n print(e.err[\"errMsg\"])\n print(e.err[\"txRef\"])\n\n\n```\n\n
\n\n## ```rave.GhMobile```\nThis is used to facilitate Ghana mobile money transactions.\n\n**Functions included:**\n\n* ```.charge```\n\n\n* ```.verify```\n\n
\n\n### ```.charge(payload)```\nThis is called to start an Ghana mobile money transaction. The payload should be a dictionary containing account information. It should have the parameters:\n\n* ```amount```,\n\n* ```email```, \n\n* ```phonenumber```,\n\n* ```network```,\n\n* ```IP```,\n\n* ```redirect_url```\n\nOptionally, you can add a custom transaction reference using the ```txRef``` parameter. Note that if you do not specify one, it would be automatically generated. We do provide a function for generating transaction references in the Misc library (add link).\n\n\nA sample call is:\n\n``` res = rave.GhMobile.charge(payload) ```\n\n#### Returns\n\nThis call returns a dictionary. A sample response is:\n\n ```{'error': False, 'validationRequired': True, 'txRef': 'MC-1530910216380', 'flwRef': 'N/A'} ```\n\n This call raises an ```TransactionChargeError``` if there was a problem processing your transaction. The ```TransactionChargeError``` contains some information about your transaction. You can handle this as such:\n\n```\ntry: \n #Your charge call\nexcept RaveExceptions.TransactionChargeError as e:\n print(e.err[\"errMsg\"])\n print(e.err[\"flwRef\"])\n\n```\n\nA sample ``` e.err ``` contains:\n\n```{'error': True, 'txRef': 'MC-1530911537060', 'flwRef': None, 'errMsg': None}```\n\n\n
\n\n### ```.verify(txRef)```\n\nYou can call this to check if your transaction was completed successfully. You have to pass the transaction reference generated at the point of charging. This is the ```txRef``` in the ```res``` parameter returned any of the calls (```charge``` or ```validate```). \n\nA sample verify call is:\n\n``` res = rave.GhMobile.verify(data[\"txRef\"]) ```\n\n#### Returns\n\nThis call returns a dict with ```txRef```, ```flwRef``` and ```transactionComplete``` which indicates whether the transaction was completed successfully. \n\nIf your call could not be completed successfully, a ```TransactionVerificationError``` is raised.\n\n
\n\n### Complete GhMobile charge flow\n\n```\nfrom python_rave import Rave, RaveExceptions, Misc\nrave = Rave(\"ENTER_YOUR_PUBLIC_KEY\", \"ENTER_YOUR_SECRET_KEY\", usingEnv = False)\n\n# mobile payload\npayload = {\n \"amount\": \"50\",\n \"email\": \"\",\n \"phonenumber\": \"054709929220\",\n \"network\": \"MTN\",\n \"redirect_url\": \"https://rave-webhook.herokuapp.com/receivepayment\",\n \"IP\":\"\"\n}\n\ntry:\n res = rave.GhMobile.charge(payload)\n res = rave.GhMobile.verify(res[\"txRef\"])\n print(res)\n\nexcept RaveExceptions.TransactionChargeError as e:\n print(e.err)\n print(e.err[\"flwRef\"])\n\nexcept RaveExceptions.TransactionVerificationError as e:\n print(e.err[\"errMsg\"])\n print(e.err[\"txRef\"])\n\n\n```\n\n\n
\n## ```rave.Ussd```\nThis is used to facilitate USSD transactions.\n\n**Functions included:**\n\n* ```.charge```\n\n\n* ```.verify```\n\n
\n\n### ```.charge(payload)```\nThis is called to start a USSD transaction. The payload should be a dictionary containing payment information. It should have the parameters:\n\n* ```accountbank```,\n\n* ```accountnumber```, \n\n* ```amount```, \n\n* ```email```,\n\n* ```phonenumber```,\n\n* ```IP```\n\nOptionally, you can add a custom transaction reference using the ```txRef``` parameter. Note that if you do not specify one, it would be automatically generated. We do provide a function for generating transaction references in the Misc library (add link).\n\n\nA sample call is:\n\n``` furtherActionRequired, action = rave.Ussd.charge(payload) ```\n\n#### Returns\n\nThis call returns two responses. The first variable indicates whether further action is required to complete the transaction. The second variable is what was returned from the server on the call.\n\n
\n\n### ```.verify(txRef)```\n\nYou can call this to check if your transaction was completed successfully. You have to pass the transaction reference generated at the point of charging. This is the ```txRef``` in the ```action``` parameter returned any of the calls (```charge``` or ```validate```). \n\nA sample verify call is:\n\n``` success, data = rave.Ussd.verify(data[\"txRef\"]) ```\n\n
\n\n### Complete USSD charge flow\n\n```\nfrom python_rave import Rave, RaveExceptions, Misc\nrave = Rave(\"YOUR_PUBLIC KEY\", \"YOUR_SECRET_KEY\", production=True, usingEnv = False)\n\nzenithPayload = {\n \"accountbank\": \"057\",\n \"accountnumber\": \"0691008392\",#collect the customers account number for Zenith\n \"currency\": \"NGN\",\n \"country\": \"NG\",\n \"amount\": \"10\",\n \"email\": \"desola.ade1@gmail.com\",\n \"phonenumber\": \"0902620185\", \n \"IP\": \"355426087298442\",\n}\n\nfurtherActionNeeded, action = rave.Ussd.charge(zenithPayload)\nif furtherActionNeeded:\n completed = False\n while not completed:\n try:\n completed = rave.Ussd.verify(zenithPayload[\"txRef\"])\n except RaveExceptions.TransactionVerificationError:\n print(action)\n\nsuccess, data = rave.Ussd.verify(zenithPayload[\"txRef\"])\nprint(success)\n\n```\n\n
\n## ```rave.Preauth```\nThis is used to facilitate preauthorized card transactions. This inherits the Card class so any task you can do on Card, you can do with preauth.\n\n**Functions included:**\n\n* ```.charge```\n\n* ```.validate```\n\n* ```.verify```\n\n* ```.getTypeOfArgsRequired```\n\n* ```.updatePayload```\n\n
\n\n\n\n### ```.capture(flwRef)```\n\nThis is used to capture the funds held in the account. Similar to the validate call, it requires you to pass the ```flwRef```. The flwRef can be gotten from the by searching for the ```flwRef``` in the ```action``` (second returned variable) of the initial charge call.\n\n\nA sample capture call is:\n\n``` rave.Preauth.capture(data[\"flwRef\"])```\n\n
\n\n### ```.void(flwRef)```\n\nThis is used to void a preauth transaction. Similar to the validate call, it requires you to pass the ```flwRef```. The flwRef can be gotten from the by searching for the ```flwRef``` in the ```action``` (second returned variable) of the initial charge call.\n\n\nA sample capture call is:\n\n```rave.Preauth.void(data[\"flwRef\"]) ```\n\n
\n\n### ```.refund(flwRef)```\n\nThis is used to refund a preauth transaction. Similar to the validate call, it requires you to pass the ```flwRef```. The flwRef can be gotten from the by searching for the ```flwRef``` in the ```action``` (second returned variable) of the initial charge call.\n\n\nA sample capture call is:\n\n```rave.Preauth.refund(data[\"flwRef\"]) ```\n\n
\n\n\n### Complete preauth charge flow\n\n```\nfrom python_rave import Rave\nrave = Rave(\"YOUR_PUBLIC_KEY\", \"YOUR_SECRET_KEY\", usingEnv = False)\n\n# Payload with pin\npayload = {\n \"cardno\": \"4751763236699647\",\n \"cvv\": \"890\",\n \"expirymonth\": \"09\",\n \"expiryyear\": \"21\",\n \"amount\": \"10\",\n \"email\": \"user@gmail.com\",\n \"phonenumber\": \"0902620185\",\n \"firstname\": \"temi\",\n \"lastname\": \"desola\",\n \"IP\": \"355426087298442\",\n}\n\ntry:\n res = rave.Preauth.charge(payload)\n\n if res[\"suggestedAuth\"]:\n arg = Misc.getTypeOfArgsRequired(res[\"suggestedAuth\"])\n\n if arg == \"pin\":\n Misc.updatePayload(res[\"suggestedAuth\"], payload, pin=\"3310\")\n if arg == \"address\":\n Misc.updatePayload(res[\"suggestedAuth\"], payload, address= {\"billingzip\": \"07205\", \"billingcity\": \"Hillside\", \"billingaddress\": \"470 Mundet PI\", \"billingstate\": \"NJ\", \"billingcountry\": \"US\"})\n\n res = rave.Preauth.charge(payload)\n\n if res[\"validationRequired\"]:\n rave.Preauth.validate(res[\"flwRef\"], \"12345\")\n\n res = rave.Preauth.capture(res[\"flwRef\"])\n res = rave.Preauth.verify(res[\"txRef\"])\n print(res[\"transactionComplete\"])\n\nexcept RaveExceptions.CardChargeError as e:\n print(e.err[\"errMsg\"])\n print(e.err[\"flwRef\"])\n\nexcept RaveExceptions.TransactionValidationError as e:\n print(e.err[\"errMsg\"])\n print(e.err[\"flwRef\"])\n\nexcept RaveExceptions.TransactionVerificationError as e:\n print(e.err[\"errMsg\"])\n print(e.err[\"txRef\"])\n\n\n```\n\n## ```rave.Transfer```\n\nThis is used to initiate and manage payouts\n\n\n**Functions included:**\n\n* ```.initiate```\n\n* ```.bulk```\n\n* ```.fetch```\n\n* ```.getFee```\n\n* ```.getBalance```\n\n
\n\n### Complete transfer flow\n\n```\nfrom python_rave import Rave, RaveExceptions\ntry:\n rave = Rave(\"ENTER_YOUR_PUBLIC_KEY\", \"ENTER_YOUR_SECRET_KEY\", usingEnv = False)\n\n res = rave.Transfer.initiate({\n \"account_bank\": \"044\",\n \"account_number\": \"0690000044\",\n \"amount\": 500,\n \"narration\": \"New transfer\",\n \"currency\": \"NGN\",\n })\n\n res2 = rave.Transfer.bulk({\n \"title\": \"test\",\n \"bulk_data\":[\n ]\n })\n print(res)\n rave.Transfer.getBalance()\n\nexcept RaveExceptions.IncompletePaymentDetailsError as e:\n print(e)\n\nexcept RaveExceptions.InitiateTransferError as e:\n print(e.err)\n\nexcept RaveExceptions.TransferFetchError as e:\n print(e.err)\n\nexcept RaveExceptions.ServerError as e:\n print(e.err)\n\n\n```\n\n",
"description_content_type": "text/markdown",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/TofunmiKupoluyi/python_rave",
"keywords": "",
"license": "",
"maintainer": "",
"maintainer_email": "",
"name": "python-rave",
"package_url": "https://pypi.org/project/python-rave/",
"platform": "",
"project_url": "https://pypi.org/project/python-rave/",
"project_urls": {
"Homepage": "https://github.com/TofunmiKupoluyi/python_rave"
},
"release_url": "https://pypi.org/project/python-rave/1.0.10a0/",
"requires_dist": [
"PyCrypto",
"requests"
],
"requires_python": "",
"summary": "A python wrapper for Flutterwave's Rave",
"version": "1.0.10a0"
},
"last_serial": 4107432,
"releases": {
"1.0.10a0": [
{
"comment_text": "",
"digests": {
"md5": "202f39579243db8c1b980e2d1fe914e1",
"sha256": "987a19ad4adfb8ef43b6d8724908ec7aa0e4c7d38298b14d9a8bc7d1d1f01706"
},
"downloads": -1,
"filename": "python_rave-1.0.10a0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "202f39579243db8c1b980e2d1fe914e1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 21941,
"upload_time": "2018-07-27T05:26:34",
"url": "https://files.pythonhosted.org/packages/57/62/f9e58341cc7513d267258fea20674d7af45d5dc0150bed3bddbbb978a9eb/python_rave-1.0.10a0-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "d7415bd4c92cb76e198462dfc2e64a30",
"sha256": "4204399af0d1b5b9c5da9a8a1698e70667ea3619ca8cea7b92a877c4214f2271"
},
"downloads": -1,
"filename": "python_rave-1.0.10a0.tar.gz",
"has_sig": false,
"md5_digest": "d7415bd4c92cb76e198462dfc2e64a30",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 16978,
"upload_time": "2018-07-27T05:26:37",
"url": "https://files.pythonhosted.org/packages/b3/87/b57db8c602077f82deaf4095371b5f6d520f9be5ca97994f1d9edee8c476/python_rave-1.0.10a0.tar.gz"
}
],
"1.0.7a0": [
{
"comment_text": "",
"digests": {
"md5": "3f1ab17fe6f713a95fa64f1de03ab1ba",
"sha256": "71107a910f755aeb2b08e81293b6f3661540b1d03a5e473e91b6d80f4ec24acc"
},
"downloads": -1,
"filename": "python_rave-1.0.7a0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3f1ab17fe6f713a95fa64f1de03ab1ba",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 23328,
"upload_time": "2018-07-03T01:54:50",
"url": "https://files.pythonhosted.org/packages/cf/19/a9a50894c691aab3d4c9d0aefed7e5ec7e3c188d07e0258ef8be042759c6/python_rave-1.0.7a0-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "9fe02507659a224377b26784d38be6c3",
"sha256": "4d1fb0b15bbc677f08b1cf8ac686be5c82c8b71f3b597c0dbf24f9af2048192e"
},
"downloads": -1,
"filename": "python_rave-1.0.7a0.tar.gz",
"has_sig": false,
"md5_digest": "9fe02507659a224377b26784d38be6c3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 15871,
"upload_time": "2018-07-03T01:54:52",
"url": "https://files.pythonhosted.org/packages/df/80/edf864c09fd5a2f88ba33d0bad8959123f4fb23fa6acf11e6929a57dc0d1/python_rave-1.0.7a0.tar.gz"
}
],
"1.0.8a0": [
{
"comment_text": "",
"digests": {
"md5": "7d633ee467e57ef3bf0e04b344763c0c",
"sha256": "08307c74ed7dc846021c95360dba40f3b816217bf9d517527fda6ad9c7b3a6c1"
},
"downloads": -1,
"filename": "python_rave-1.0.8a0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7d633ee467e57ef3bf0e04b344763c0c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 20897,
"upload_time": "2018-07-06T21:48:33",
"url": "https://files.pythonhosted.org/packages/0a/64/073af01fd75d1f1d419af7e1182a420d13dc60f801f4011b83c2ab4e5470/python_rave-1.0.8a0-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "b5215d08c6343461471f74881e0d1c23",
"sha256": "da927b6cb46f0f44021f91d5e38ea654ced22385731ae77a7909e950474c9a87"
},
"downloads": -1,
"filename": "python_rave-1.0.8a0.tar.gz",
"has_sig": false,
"md5_digest": "b5215d08c6343461471f74881e0d1c23",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 15504,
"upload_time": "2018-07-06T21:48:35",
"url": "https://files.pythonhosted.org/packages/0a/47/fb175fa449f6ceb7c61a7dbc7761a206299d864b9d38f2e1c8709f64a27c/python_rave-1.0.8a0.tar.gz"
}
],
"1.0.9a0": [
{
"comment_text": "",
"digests": {
"md5": "6c5831e13dcfbee39e37be5a6a048f9a",
"sha256": "0d7da6089ef08911e0abe08b0b8069b5217d41d34ecf55427c288aedcafd0c53"
},
"downloads": -1,
"filename": "python_rave-1.0.9a0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6c5831e13dcfbee39e37be5a6a048f9a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 20219,
"upload_time": "2018-07-07T01:25:08",
"url": "https://files.pythonhosted.org/packages/64/34/166bad05abf9607efe42b34be2cb81d568ee4b9076ad418358461c7c2fbe/python_rave-1.0.9a0-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "1107e010b7761109b3d8f250ffcbc2df",
"sha256": "16a9f3b0f26bb18991e8ead4812cf9c2462a00edfc0dd6bfe13d2b6ad0b45497"
},
"downloads": -1,
"filename": "python_rave-1.0.9a0.tar.gz",
"has_sig": false,
"md5_digest": "1107e010b7761109b3d8f250ffcbc2df",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 15365,
"upload_time": "2018-07-07T01:25:10",
"url": "https://files.pythonhosted.org/packages/d0/09/c1f7c3301ff7c44e109c61d6504af81c0b262e30e4fff410d08a8ee3e06d/python_rave-1.0.9a0.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "202f39579243db8c1b980e2d1fe914e1",
"sha256": "987a19ad4adfb8ef43b6d8724908ec7aa0e4c7d38298b14d9a8bc7d1d1f01706"
},
"downloads": -1,
"filename": "python_rave-1.0.10a0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "202f39579243db8c1b980e2d1fe914e1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 21941,
"upload_time": "2018-07-27T05:26:34",
"url": "https://files.pythonhosted.org/packages/57/62/f9e58341cc7513d267258fea20674d7af45d5dc0150bed3bddbbb978a9eb/python_rave-1.0.10a0-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "d7415bd4c92cb76e198462dfc2e64a30",
"sha256": "4204399af0d1b5b9c5da9a8a1698e70667ea3619ca8cea7b92a877c4214f2271"
},
"downloads": -1,
"filename": "python_rave-1.0.10a0.tar.gz",
"has_sig": false,
"md5_digest": "d7415bd4c92cb76e198462dfc2e64a30",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 16978,
"upload_time": "2018-07-27T05:26:37",
"url": "https://files.pythonhosted.org/packages/b3/87/b57db8c602077f82deaf4095371b5f6d520f9be5ca97994f1d9edee8c476/python_rave-1.0.10a0.tar.gz"
}
]
}