You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

phonepe-transaction

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

phonepe-transaction

A simplified way to integrate payments into websites and applications using API responses.

1.1
PyPI
Maintainers
1

PhonePe Payment Processing

A simple Python Package to integrate Phonepe payments in your application.

What is Phonepe

It is a UPI powered payment System which provide various api to process payment in this we have used the test api provided the phonepe for payment processing.

API Reference

Initialize Payment
  POST https://api-preprod.phonepe.com/apis/pg-sandbox/pg/v1/pay
ParameterTypeDescription
salt KeystringRequired. Your salt Key
Salt IndexintRequired. Your salt Index
Merchant IdstringRequired. Your Merchant Id is Required.
Check Payment Status
  GET https://api-preprod.phonepe.com/apis/pg-sandbox/pg/v1/status/${merchant_id}/${transaction_id}"
ParameterTypeDescription
merchant IdstringRequired. Your Merchant Id is Required.
Transaction IdstringRequired. Id of the Transaction is Required to Check status.
salt KeystringRequired. Your salt Key
Salt IndexintRequired. Your salt Index

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

Salt_Key

API KEY

Merchant Id

Features

  • Payment Integration
  • Initialize Payment
  • Check Status
  • Cross platform

🚀 About Me

I'm a full stack developer...

linkedin

Installtion

install phonepe-payment using pip

pip install phonepe-payment

start project

Initialize of Payment class is Required

Function can be used

  • InitalizePayment()

args Required:-

ParamaterTypeRequired/optionalDescription
user_idstring/intRequiredRequired for user verification
amountintRequiredamount in rupees
Mobile NumberNumberRequiredmobile Number of user is Required
RedirectUrlhttpOptionalRedirect Url is optional to redirect user after payment is Done
CallbackUrlhttpoptionalCallback Url is optional to send the payment status
Salt_keystringoptionalthis is optional but required for production as default using test key
Transaction_idstringoptionalAutomatically generated by the system
merchant_idstringoptionalthis is optional but required for production as default using test merchant id
payment_page_redirectbooleanoptionalthis is optional by default is is using False to not to open the payment page
  • CheckPaymentStatus()

args Required:-

ParamaterTypeRequired/optionalDescription
Transaction_idstringoptionalRequired same as the transaction id generated in while InitalizePayment()
merchant_idstringoptionalthis is optional but required for production as default using test merchant id
Salt_keystringoptionalthis is optional but required for production as default using test key

License

MIT

Support

For support, email devpancholigt2004@gmail.com

Authors

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts