Skip to content

cashfree/pg-samples

Repository files navigation

Payment Gateway Sample Apps

GitHub License Discord

This repository contains sample applications that demonstrate how to integrate Cashfree Payments Payment Gateway across backend frameworks, frontend stacks, mobile-friendly web apps, and language-specific SDK examples.

Each sample lives in its own folder and usually includes setup steps, required credentials, and a basic payment flow using Cashfree PG test mode.

Getting Started

  1. Clone this repository.
  2. Open the sample folder that matches your preferred tech stack.
  3. Follow the setup instructions in that sample's local README.md.
  4. Add your Cashfree PG credentials and run the app locally.

Current Repository Structure

pg-samples/
├── Android_Webview/
├── Asp.net Webforms/
├── cashfree_pg_mobile_sdk/
│   ├── cashfree_PG_Android_Native_SDK/
│   ├── cashfree_PG_Flutter_SDK/
│   └── cashfree_PG_React_Native_SDK/
├── dotnet-core/
├── element-js/
├── go/
│   ├── echo/
│   ├── gin/
│   └── htmx/
├── java/
│   ├── hibernate/
│   └── java_sdk_pg_Springboot/
├── node/
│   ├── express/
│   ├── hono/
│   ├── koa/
│   └── nest/
├── node-js(express)/
│   └── server/
├── php/
│   ├── codeigniter/
│   ├── laravel/
│   └── PHP_SDK_Sample/
├── python/
│   ├── django/
│   └── flask/
├── ruby/
│   └── ror/
├── sub-sample/
│   └── node/
└── web/
    ├── angular/
    ├── next/
    ├── nuxt/
    └── sveltekit/

Sample Links

Category Sample Path
Mobile Android WebView Android_Webview
Mobile SDK Android Native SDK cashfree_pg_mobile_sdk/cashfree_PG_Android_Native_SDK
Mobile SDK Flutter SDK cashfree_pg_mobile_sdk/cashfree_PG_Flutter_SDK
Mobile SDK React Native SDK cashfree_pg_mobile_sdk/cashfree_PG_React_Native_SDK/CashfreeHybridApp
.NET ASP.NET Webforms Asp.net Webforms
.NET .NET Core dotnet-core
Frontend Element JS element-js
Go Echo go/echo
Go Gin go/gin
Go HTMX go/htmx
Java Hibernate java/hibernate
Java Java SDK PG Spring Boot java/java_sdk_pg_Springboot
Node.js Express node/express
Node.js Hono node/hono
Node.js Koa node/koa
Node.js Nest node/nest
Node.js Legacy Express Server node-js(express)/server
PHP CodeIgniter php/codeigniter
PHP Laravel php/laravel
PHP PHP SDK Sample php/PHP_SDK_Sample
Python Django python/django
Python Flask python/flask
Ruby Ruby on Rails ruby/ror
Sub Sample Node Express sub-sample/node
Web Angular web/angular
Web Next.js web/next
Web Nuxt web/nuxt
Web SvelteKit web/sveltekit

What You'll Typically Find In A Sample

  • Local setup instructions
  • Environment or config placeholders for Cashfree credentials
  • Server-side order creation flow
  • Frontend checkout initiation using Cashfree
  • Success and failure handling
  • Return URL or payment status verification examples

Contribution Guidelines

We welcome new PG sample apps and improvements to existing ones.

Minimum Expectations

  • Add the project in the appropriate tech-stack directory
  • Include a clear README.md with setup and usage instructions
  • Use Cashfree PG test credentials and test environment defaults
  • Demonstrate an end-to-end payment flow

Suggested Flow

  1. Fork this repository.
  2. Create or update a sample in the relevant folder.
  3. Test the integration locally.
  4. Commit your changes and push to your fork.
  5. Open a pull request.

Support

About

Sample Apps demonstrating the integration of Cashfree Payments’ Payment Gateway (PG)

Topics

Resources

License

Stars

Watchers

Forks

Contributors