> For the complete documentation index, see [llms.txt](https://docs.pgecom.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pgecom.com/api-endpoint/payment/pg-pay.md).

# 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&amp;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&amp;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&amp;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&amp;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 🎉
