# PG Pay

You can now accept Payment on your website with PG Pay which allows buyer to purchase your product with their PGecom balance

{% embed url="<https://youtu.be/hF3emAEIB0o?si=iVs8-THCSBvDP8Mb>" %}
PGPay Integration
{% endembed %}

Once you create your PGPay Payment request, you'll receive a redirect URL in the response

<figure><img src="https://2078312875-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNoNIWRBSpPI3RWl7Qz-1703796690%2Fuploads%2FMo1q99DmM3i2Z1LXTgTu%2FScreenshot%202024-01-01%20at%2011.43.43%E2%80%AFAM.png?alt=media&#x26;token=c0c52d08-f076-4244-8873-78f217b1625c" alt=""><figcaption><p>redirect url</p></figcaption></figure>

Once you redirect the user, they'll view something like this to complete their purchase

If you include a phone in the payload, it will automatically fill in the input form

<figure><img src="https://2078312875-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNoNIWRBSpPI3RWl7Qz-1703796690%2Fuploads%2FpXOrqPwqDvK4HIzmHXuN%2Fpg_pay_step_one.png?alt=media&#x26;token=dda476f1-9c0b-44f0-9571-3384604b61da" alt=""><figcaption><p>PG Pay Checkout Flow - User not logged in</p></figcaption></figure>

The pg pay integration will automatically detect if the user is already logged in and make the checkout process even easier to complete the purchase

<figure><img src="https://2078312875-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNoNIWRBSpPI3RWl7Qz-1703796690%2Fuploads%2FOTDYflbXIwzMzN2aLXp5%2FScreenshot%202024-01-01%20at%2012.50.22%E2%80%AFPM.png?alt=media&#x26;token=a9355774-f25f-4cbf-96fd-b7175ed6d8b0" alt=""><figcaption><p>PG Pay Checkout Flow - User already logged in</p></figcaption></figure>

The moment you create a checkout session for a customer

PGPay will start tracking that transaction until its completion

It will also register the customer information for future targeting

<figure><img src="https://2078312875-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNoNIWRBSpPI3RWl7Qz-1703796690%2Fuploads%2FD3dNeZOB7oSEsjLgJXPa%2Fpg_pay_pending_transaction.png?alt=media&#x26;token=e0d4f2e9-a400-4cc9-9f63-9e8ed877334c" alt=""><figcaption><p>PG Pay Pending and Complete transaction</p></figcaption></figure>

I hope you enjoy the PG Pay integration as much as we enjoy building it 🎉


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pgecom.com/api-endpoint/payment/pg-pay.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
