devRaphael13 / py4paystack

MIT License
1 stars 0 forks source link

Production Ready #3

Closed Nneji123 closed 1 year ago

Nneji123 commented 1 year ago

I'd like to use this package to initiate payments to my paystack account and transfer money from my paystack accounts to user bank accounts(like a wallet feature with funding and withdrawal in Django). Could you write a proper documentation on how to achieve this? Also is this package production ready?

Thank you and I await your response

devRaphael13 commented 1 year ago

To accept payments follow this Tutorial after creating an account with paystack and you have your secret key.

devRaphael13 commented 1 year ago

To transfer automatically you might have to turn off otp on the preferences tab on your paystack dashboard.

  1. Get the list of supported banks and their code. I suggest you provide your country. Miscellaneous.list_banks(country=your_country). Miscellaneous

  2. Verify the account number you are transferring to. Use Verification.resolve_acct_number. Verification

  3. Create Transfer Recipient for the user, provide the recipient_type (nuban in this case since you're using account number), name, account_number, bank code & currency. Use TransferRecipient.create.TransferRecipient

  4. You can now initiate transfer, provide the source (balance is the only option right now), recipient (the code gotten from last step, reference (provide if you want to create your own reference code, paystack will create for you if left blank), generate_reference (if you want py4paystack to generate a reference code for you).Transfer

Nneji123 commented 1 year ago

Thank you so much I'll try and implement these steps and see if I can make progress.

devRaphael13 commented 1 year ago

Yes, it's suitable for production. Thanks for using my program.