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
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
Support
For support, email devpancholigt2004@gmail.com
Authors
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24e07c08a2313a7e3720ac0eda08cb3afbd27c1900d0fdb37cacba4780ac1728
|
|
| MD5 |
ffa3601feb545d9a7e32c2f27d9b0b89
|
|
| BLAKE2b-256 |
6ac3ff959e9038304e9269d6507deba745254ff2ad7cf1aeb9eaf6214d1620a4
|
File details
Details for the file phonepe_transaction-1.1-py3-none-any.whl.
File metadata
- Download URL: phonepe_transaction-1.1-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d01a32ba1778355a0071b031b66ac074a83b8bded52a8fa98f2f3734a14d9b76
|
|
| MD5 |
72fdb8b8c17d4b0828ca4e12e86590f7
|
|
| BLAKE2b-256 |
62a153f48d2f8701cf32f48cc5b742b735ce19a75de73bf283683dc58bd88156
|