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.1.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.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: phonepe_transaction-1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 24e07c08a2313a7e3720ac0eda08cb3afbd27c1900d0fdb37cacba4780ac1728
MD5 ffa3601feb545d9a7e32c2f27d9b0b89
BLAKE2b-256 6ac3ff959e9038304e9269d6507deba745254ff2ad7cf1aeb9eaf6214d1620a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for phonepe_transaction-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d01a32ba1778355a0071b031b66ac074a83b8bded52a8fa98f2f3734a14d9b76
MD5 72fdb8b8c17d4b0828ca4e12e86590f7
BLAKE2b-256 62a153f48d2f8701cf32f48cc5b742b735ce19a75de73bf283683dc58bd88156

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