Google Pay Alternative
GP Integration option
Payment flow
- Customer initiates Google Pay 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 | google_pay_alt |
Request example
{
"request": {
"amount": 20000,
"currency": "INR",
"description": "description",
"test": false,
"return_url": "https://your_return_url.com",
"method": {
"type": "google_pay_alt"
}
}
}
Response
The google_pay_alt
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": "f4d1aae3-d5c6-4d7e-b2bb-f1f5bcef811f",
"type": "payment",
"status": "pending",
"amount": 20000,
"currency": "INR",
"description": "description",
"created_at": "2023-12-27T08:51:43Z",
"updated_at": "2023-12-27T08:51:44Z",
"method_type": "google_pay_alt",
"receipt_url": "https://my.constantpos.com/customer/transactions/f4d1aae3-d5c6-4d7e-b2bb-f1f5bcef811f/99147ccaef3b6ae127c8df239324f393aa3cde5a8ee3c9f40e6dbc1e182f8580",
"payment": {
"status": "pending",
"gateway_id": 3572,
"ref_id": "26UCR92023122722143",
"message": "Transaction Initiated Successfully",
"bank_code": "200"
},
"google_pay_alt": {
"type": "google_pay_alt"
},
"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": "tez://upi/pay?ver=01&mode=15&am=200.00&mam=200.00&cu=INR&pa=payee1@example1&pn=1SHOP&mc=5816&tr=PAYEE1PPTMKRohKRxJqlRB0QGjHoGv&mid=PARB6332&msid=WES-4382&mtid=WES-4382&tn=PRB",
"method": "GET",
"fields": [
{
"name": "deep_link",
"value": "tez://upi/pay?ver=01&mode=15&am=200.00&mam=200.00&cu=INR&pa=payee1@example1&pn=1SHOP&mc=5816&tr=PAYEE1PPTMKRohKRxJqlRB0QGjHoGv&mid=PARB6332&msid=WES-4382&mtid=WES-4382&tn=PRB"
}
]
}
}
}