Skip to main content

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

Project description

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
Parameter Type Description
salt Key string Required. Your salt Key
Salt Index int Required. Your salt Index
Merchant Id string Required. Your Merchant Id is Required.

Check Payment Status

  GET https://api-preprod.phonepe.com/apis/pg-sandbox/pg/v1/status/${merchant_id}/${transaction_id}"
Parameter Type Description
merchant Id string Required. Your Merchant Id is Required.
Transaction Id string Required. Id of the Transaction is Required to Check status.
salt Key string Required. Your salt Key
Salt Index int Required. 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...

🔗 Links

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:-

Paramater Type Required/optional Description
user_id string/int Required Required for user verification
amount int Required amount in rupees
Mobile Number Number Required mobile Number of user is Required
RedirectUrl http Optional Redirect Url is optional to redirect user after payment is Done
CallbackUrl http optional Callback Url is optional to send the payment status
Salt_key string optional this is optional but required for production as default using test key
Transaction_id string optional Automatically generated by the system
merchant_id string optional this is optional but required for production as default using test merchant id
payment_page_redirect boolean optional this is optional by default is is using False to not to open the payment page
  • CheckPaymentStatus()

args Required:-

Paramater Type Required/optional Description
Transaction_id string optional Required same as the transaction id generated in while InitalizePayment()
merchant_id string optional this is optional but required for production as default using test merchant id
Salt_key string optional this is optional but required for production as default using test key

License

MIT

Support

For support, email devpancholigt2004@gmail.com

Authors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

phonepe_transaction-1.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phonepe_transaction-1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file phonepe_transaction-1.0.tar.gz.

File metadata

  • Download URL: phonepe_transaction-1.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for phonepe_transaction-1.0.tar.gz
Algorithm Hash digest
SHA256 5c4a6ad54bfdd18c6758a20f06cac2ba706831444e4e89cd7028afe034b8b2f2
MD5 446f7869b5933435a5bc7cc9dff6ef9e
BLAKE2b-256 8aed123a6d0d38ffaf0e0e5d341cb10ac73a733b2e6649bca54d9a48f6a4e323

See more details on using hashes here.

File details

Details for the file phonepe_transaction-1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for phonepe_transaction-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8f55d7f7a107af49b7cd707a55779eef70b34a299d1753b5f8ab06a69de9a1e6
MD5 19770760ef06a5d180934cd297b5b110
BLAKE2b-256 306fbaa3a87051e3ea59c4206df905f7b46127381460d50a72da4904fc867bd7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page