PhonePe
QP Integration option
This integration option supports the following operations:
Payment
Request
Info
Confirm supported currencies and countries with your manager.
Send a payment request with the following data:
Parameter | Type | Description |
---|---|---|
method | object | A section of the payment method. |
type * required |
string | phone_pe |
customer | object | A section of information about your customer. |
first_name * required |
string | The customer's first name. |
last_name * required |
string | The customer's last name. |
email * required |
string | The customer's email address. |
Response
The phone_pe
response section will have parameters copied from the request. Additionally, you'll get the form
parameter to build a form where the customer should be redirected to finalize the payment.
GP Integration option
Payment flow
- Customer initiates PhonePe payment on the merchant's website.
- Merchant sends the payment request to Constantpos
- Constantpos returns a payment link to the merchant.
- The merchant redirects the customer to the payment link that opens in the corresponding application on the customer's device.
- The customer confirms the payment.
- Constantpos sends a webhook notification to the merchant.
Info
This integration option only supports INR
currency.
Payment
Request
Send a payment request with the following additional parameters:
Parameter | Type | Description |
---|---|---|
request | object | |
amount * required |
bigInteger | Transaction amount, must be an integer amount specified in minimal currency units, for example, 50000 (500 rupees). The submitted value must end in 00 . |
return_url * required |
string | URL to return the customer to when the transaction is completed. |
method | object | A section of the payment method. |
type * required |
string | phone_pe |
Request example
{
"request": {
"amount": 20000,
"currency": "INR",
"description": "description",
"test": false,
"return_url": "https://your_return_url.com",
"method": {
"type": "phone_pe"
}
}
}
Response
The phone_pe
response section will have parameters copied from the request. Additionally, you'll get the form
parameter to build a form where the customer should be redirected to finalize the payment.
Response example
{
"transaction": {
"uid": "20935610-518e-4c43-8fb8-6ff365868b67",
"type": "payment",
"status": "pending",
"amount": 20000,
"currency": "INR",
"description": "description",
"created_at": "2023-12-26T15:37:36Z",
"updated_at": "2023-12-26T15:37:37Z",
"method_type": "phone_pe",
"receipt_url": "https://my.constantpos.com/customer/transactions/20935610-518e-4c43-8fb8-6ff365868b67/019400668ab48cc40a10e1c06b0d38faac2e9c9dfe66e23b9def5cf1028d4c46",
"payment": {
"status": "pending",
"gateway_id": 3572,
"ref_id": "FSVTBJ2023122690736",
"message": "Transaction Initiated Successfully",
"bank_code": "200"
},
"phone_pe": {
"type": "phone_pe"
},
"customer": {
"email": null,
"ip": null
},
"manually_corrected_at": null,
"message": "Transaction Initiated Successfully",
"test": false,
"additional_data": {
"payment_method": {
"type": "alternative"
}
},
"gateway": {
"iframe": true
},
"form": {
"action": "phonepe://pay?ver=01&mode=15&am=200.00&mam=200.00&cu=INR&pa=payee1@example1&pn=1SHOP&mc=5816&tr=PAYEE1PPTG7yW0tdjk2QFEx2khguHC&mid=PARB6332&msid=WES-4382&mtid=WES-4382&tn=PRB",
"method": "GET",
"fields": [
{
"name": "deep_link",
"value": "phonepe://pay?ver=01&mode=15&am=200.00&mam=200.00&cu=INR&pa=payee1@example1&pn=1SHOP&mc=5816&tr=PAYEE1PPTG7yW0tdjk2QFEx2khguHC&mid=PARB6332&msid=WES-4382&mtid=WES-4382&tn=PRB"
}
]
}
}
}