https://github.com/cashfree/react-native-cashfree-pg-sdk
Sample app demonstrating integration of Cashfree's payment gateway in your React native project
https://github.com/cashfree/react-native-cashfree-pg-sdk
bnpl card cardless-emi cashfree emi net-banking payment-gateway payment-integration payments upi wallets
Last synced: 4 months ago
JSON representation
Sample app demonstrating integration of Cashfree's payment gateway in your React native project
- Host: GitHub
- URL: https://github.com/cashfree/react-native-cashfree-pg-sdk
- Owner: cashfree
- License: mit
- Created: 2022-06-21T10:42:32.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2025-06-26T12:24:10.000Z (4 months ago)
- Last Synced: 2025-06-26T13:28:03.885Z (4 months ago)
- Topics: bnpl, card, cardless-emi, cashfree, emi, net-banking, payment-gateway, payment-integration, payments, upi, wallets
- Language: JavaScript
- Homepage: https://docs.cashfree.com/docs/react-native-integration
- Size: 838 KB
- Stars: 10
- Watchers: 2
- Forks: 12
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# react-native-cashfree-pg-sdk
      
The Cashfree React Native SDK allows you to integrate Cashfree Payment Gateway into your application and start collecting payments from your customers. The React Native SDK has been designed to minimise the complexity of handling and integrating payments in your React Native project.
Click [here](https://docs.cashfree.com/docs/react-native-integration) for more Documentation.
## Installation
```sh
npm install react-native-cashfree-pg-sdk
```
### iOS
Add the following code to application's info.plist file.
```xml
LSApplicationCategoryType
LSApplicationQueriesSchemes
phonepe
tez
paytm
bhim
```
## Usage
```js
import {
CFCallback,
CFErrorResponse,
CFPaymentGatewayService,
} from 'react-native-cashfree-pg-sdk';
import {
CFDropCheckoutPayment,
CFEnvironment,
CFSession,
CFThemeBuilder,
} from 'cashfree-pg-api-contract';
// ...
try {
const session = new CFSession(
'order_token',
'order_id',
CFEnvironment.SANDBOX
);
const theme = new CFThemeBuilder()
.setNavigationBarBackgroundColor('#E64A19')
.setNavigationBarTextColor('#FFFFFF')
.setButtonBackgroundColor('#FFC107')
.setButtonTextColor('#FFFFFF')
.setPrimaryTextColor('#212121')
.setSecondaryTextColor('#757575')
.build();
const dropPayment = new CFDropCheckoutPayment(session, null, theme);
CFPaymentGatewayService.doPayment(dropPayment);
} catch (e: any) {
console.log(e.message);
}
```
## Contributing
If you want to contribute please read the [Contributing](CONTRIBUTING.md) guidelines.
## License
The Cashfree React Native SDK is licensed under the MIT License.
See the LICENSE file distributed with this work for additional
information regarding copyright ownership.
Except as contained in the LICENSE file, the name(s) of the above copyright
holders shall not be used in advertising or otherwise to promote the sale,
use or other dealings in this Software without prior written authorization.